From e23f3a586f43cccca1785e29e9e80eb50a59293f Mon Sep 17 00:00:00 2001 From: jackpot51 Date: Wed, 5 Jun 2024 14:16:57 +0000 Subject: [PATCH] deploy: 39c4e3e02b8927efdde306a60c1653d7046a11e9 --- cosmic_text/enum.Action.html | 11 +- cosmic_text/enum.Affinity.html | 11 +- cosmic_text/enum.Align.html | 13 +- cosmic_text/enum.BufferRef.html | 11 +- cosmic_text/enum.Command.html | 11 +- cosmic_text/enum.Family.html | 11 +- cosmic_text/enum.FamilyOwned.html | 11 +- cosmic_text/enum.LineEnding.html | 11 +- cosmic_text/enum.Motion.html | 11 +- cosmic_text/enum.Selection.html | 11 +- cosmic_text/enum.Shaping.html | 11 +- cosmic_text/enum.Stretch.html | 11 +- cosmic_text/enum.Style.html | 11 +- cosmic_text/enum.SubpixelBin.html | 11 +- cosmic_text/enum.SwashContent.html | 11 +- cosmic_text/enum.Wrap.html | 11 +- cosmic_text/struct.Angle.html | 11 +- cosmic_text/struct.Attrs.html | 11 +- cosmic_text/struct.AttrsList.html | 11 +- cosmic_text/struct.AttrsOwned.html | 11 +- cosmic_text/struct.BidiParagraphs.html | 13 +- .../struct.BorrowedWithFontSystem.html | 15 +- cosmic_text/struct.Buffer.html | 11 +- cosmic_text/struct.BufferLine.html | 11 +- cosmic_text/struct.CacheKey.html | 11 +- cosmic_text/struct.CacheKeyFlags.html | 27 +- cosmic_text/struct.Change.html | 11 +- cosmic_text/struct.ChangeItem.html | 11 +- cosmic_text/struct.Color.html | 11 +- cosmic_text/struct.Cursor.html | 11 +- cosmic_text/struct.Editor.html | 11 +- cosmic_text/struct.Font.html | 11 +- cosmic_text/struct.FontMatchAttrs.html | 11 +- cosmic_text/struct.FontMatchKey.html | 11 +- cosmic_text/struct.FontSystem.html | 22 +- cosmic_text/struct.LayoutCursor.html | 11 +- cosmic_text/struct.LayoutGlyph.html | 11 +- cosmic_text/struct.LayoutLine.html | 11 +- cosmic_text/struct.LayoutRun.html | 11 +- cosmic_text/struct.LayoutRunIter.html | 13 +- cosmic_text/struct.LineIter.html | 13 +- cosmic_text/struct.Metrics.html | 11 +- cosmic_text/struct.PhysicalGlyph.html | 11 +- cosmic_text/struct.Placement.html | 11 +- cosmic_text/struct.Scroll.html | 11 +- cosmic_text/struct.ShapeBuffer.html | 11 +- cosmic_text/struct.ShapeGlyph.html | 11 +- cosmic_text/struct.ShapeLine.html | 11 +- cosmic_text/struct.ShapeRunCache.html | 11 +- cosmic_text/struct.ShapeRunKey.html | 11 +- cosmic_text/struct.ShapeSpan.html | 11 +- cosmic_text/struct.ShapeWord.html | 11 +- cosmic_text/struct.SwashCache.html | 11 +- cosmic_text/struct.SwashImage.html | 11 +- cosmic_text/struct.Transform.html | 11 +- cosmic_text/struct.Weight.html | 11 +- crates.js | 2 +- crossbeam_deque/all.html | 2 + crossbeam_deque/deque/enum.Steal.html | 11 + crossbeam_deque/deque/struct.Injector.html | 11 + crossbeam_deque/deque/struct.Stealer.html | 11 + crossbeam_deque/deque/struct.Worker.html | 11 + crossbeam_deque/enum.Steal.html | 96 + crossbeam_deque/index.html | 67 + crossbeam_deque/sidebar-items.js | 1 + crossbeam_deque/struct.Injector.html | 163 + crossbeam_deque/struct.Stealer.html | 165 + crossbeam_deque/struct.Worker.html | 102 + crossbeam_epoch/all.html | 2 + crossbeam_epoch/atomic/struct.Atomic.html | 11 + .../atomic/struct.CompareExchangeError.html | 11 + crossbeam_epoch/atomic/struct.Owned.html | 11 + crossbeam_epoch/atomic/struct.Shared.html | 11 + .../atomic/trait.CompareAndSetOrdering.html | 11 + crossbeam_epoch/atomic/trait.Pointable.html | 11 + crossbeam_epoch/atomic/trait.Pointer.html | 11 + .../atomic/type.CompareAndSetError.html | 11 + .../collector/struct.Collector.html | 11 + .../collector/struct.LocalHandle.html | 11 + .../default/fn.default_collector.html | 11 + crossbeam_epoch/default/fn.is_pinned.html | 11 + crossbeam_epoch/default/fn.pin.html | 11 + crossbeam_epoch/fn.default_collector.html | 3 + crossbeam_epoch/fn.is_pinned.html | 3 + crossbeam_epoch/fn.pin.html | 3 + crossbeam_epoch/fn.unprotected.html | 70 + crossbeam_epoch/guard/fn.unprotected.html | 11 + crossbeam_epoch/guard/struct.Guard.html | 11 + crossbeam_epoch/index.html | 39 + crossbeam_epoch/sidebar-items.js | 1 + crossbeam_epoch/struct.Atomic.html | 417 + crossbeam_epoch/struct.Collector.html | 19 + .../struct.CompareExchangeError.html | 24 + crossbeam_epoch/struct.Guard.html | 266 + crossbeam_epoch/struct.LocalHandle.html | 16 + crossbeam_epoch/struct.Owned.html | 87 + crossbeam_epoch/struct.Shared.html | 201 + .../trait.CompareAndSetOrdering.html | 20 + crossbeam_epoch/trait.Pointable.html | 55 + crossbeam_epoch/trait.Pointer.html | 12 + crossbeam_epoch/type.CompareAndSetError.html | 8 + crossbeam_utils/all.html | 2 + .../atomic/atomic_cell/struct.AtomicCell.html | 11 + .../atomic/consume/trait.AtomicConsume.html | 11 + crossbeam_utils/atomic/index.html | 7 + crossbeam_utils/atomic/sidebar-items.js | 1 + crossbeam_utils/atomic/struct.AtomicCell.html | 1002 +++ .../atomic/trait.AtomicConsume.html | 21 + crossbeam_utils/backoff/struct.Backoff.html | 11 + .../cache_padded/struct.CachePadded.html | 11 + crossbeam_utils/index.html | 21 + crossbeam_utils/sidebar-items.js | 1 + crossbeam_utils/struct.Backoff.html | 172 + crossbeam_utils/struct.CachePadded.html | 80 + crossbeam_utils/sync/index.html | 8 + .../sync/parker/struct.Parker.html | 11 + .../sync/parker/struct.Unparker.html | 11 + .../sync/sharded_lock/struct.ShardedLock.html | 11 + .../struct.ShardedLockReadGuard.html | 11 + .../struct.ShardedLockWriteGuard.html | 11 + crossbeam_utils/sync/sidebar-items.js | 1 + crossbeam_utils/sync/struct.Parker.html | 114 + crossbeam_utils/sync/struct.ShardedLock.html | 172 + .../sync/struct.ShardedLockReadGuard.html | 16 + .../sync/struct.ShardedLockWriteGuard.html | 14 + crossbeam_utils/sync/struct.Unparker.html | 50 + crossbeam_utils/sync/struct.WaitGroup.html | 73 + .../sync/wait_group/struct.WaitGroup.html | 11 + crossbeam_utils/thread/fn.scope.html | 20 + crossbeam_utils/thread/index.html | 92 + crossbeam_utils/thread/sidebar-items.js | 1 + crossbeam_utils/thread/struct.Scope.html | 50 + .../thread/struct.ScopedJoinHandle.html | 44 + .../thread/struct.ScopedThreadBuilder.html | 83 + either/all.html | 2 + either/enum.Either.html | 706 ++ either/index.html | 20 + either/into_either/trait.IntoEither.html | 11 + either/iterator/struct.IterEither.html | 11 + either/macro.for_both!.html | 11 + either/macro.for_both.html | 22 + either/macro.try_left!.html | 11 + either/macro.try_left.html | 21 + either/macro.try_right!.html | 11 + either/macro.try_right.html | 5 + either/sidebar-items.js | 1 + either/struct.IterEither.html | 217 + either/trait.IntoEither.html | 38 + rayon/all.html | 2 + rayon/array/index.html | 5 + rayon/array/sidebar-items.js | 1 + rayon/array/struct.IntoIter.html | 289 + rayon/collections/binary_heap/index.html | 6 + .../collections/binary_heap/sidebar-items.js | 1 + .../collections/binary_heap/struct.Drain.html | 286 + .../binary_heap/struct.IntoIter.html | 288 + .../collections/binary_heap/struct.Iter.html | 286 + rayon/collections/btree_map/index.html | 5 + rayon/collections/btree_map/sidebar-items.js | 1 + .../btree_map/struct.IntoIter.html | 197 + rayon/collections/btree_map/struct.Iter.html | 194 + .../collections/btree_map/struct.IterMut.html | 192 + rayon/collections/btree_set/index.html | 5 + rayon/collections/btree_set/sidebar-items.js | 1 + .../btree_set/struct.IntoIter.html | 193 + rayon/collections/btree_set/struct.Iter.html | 192 + rayon/collections/hash_map/index.html | 6 + rayon/collections/hash_map/sidebar-items.js | 1 + rayon/collections/hash_map/struct.Drain.html | 196 + .../collections/hash_map/struct.IntoIter.html | 197 + rayon/collections/hash_map/struct.Iter.html | 194 + .../collections/hash_map/struct.IterMut.html | 192 + rayon/collections/hash_set/index.html | 6 + rayon/collections/hash_set/sidebar-items.js | 1 + rayon/collections/hash_set/struct.Drain.html | 193 + .../collections/hash_set/struct.IntoIter.html | 193 + rayon/collections/hash_set/struct.Iter.html | 192 + rayon/collections/index.html | 19 + rayon/collections/linked_list/index.html | 5 + .../collections/linked_list/sidebar-items.js | 1 + .../linked_list/struct.IntoIter.html | 194 + .../collections/linked_list/struct.Iter.html | 192 + .../linked_list/struct.IterMut.html | 191 + rayon/collections/sidebar-items.js | 1 + rayon/collections/vec_deque/index.html | 6 + rayon/collections/vec_deque/sidebar-items.js | 1 + rayon/collections/vec_deque/struct.Drain.html | 286 + .../vec_deque/struct.IntoIter.html | 288 + rayon/collections/vec_deque/struct.Iter.html | 286 + .../collections/vec_deque/struct.IterMut.html | 285 + rayon/enum.Yield.html | 28 + rayon/fn.broadcast.html | 10 + rayon/fn.current_num_threads.html | 15 + rayon/fn.current_thread_index.html | 17 + rayon/fn.in_place_scope.html | 21 + rayon/fn.in_place_scope_fifo.html | 21 + rayon/fn.join.html | 74 + rayon/fn.join_context.html | 13 + rayon/fn.max_num_threads.html | 6 + rayon/fn.scope.html | 191 + rayon/fn.scope_fifo.html | 67 + rayon/fn.spawn.html | 40 + rayon/fn.spawn_broadcast.html | 8 + rayon/fn.spawn_fifo.html | 20 + rayon/fn.yield_local.html | 9 + rayon/fn.yield_now.html | 11 + rayon/index.html | 121 + .../iter/blocks/struct.ExponentialBlocks.html | 11 + rayon/iter/blocks/struct.UniformBlocks.html | 11 + rayon/iter/chain/struct.Chain.html | 11 + rayon/iter/chunks/struct.Chunks.html | 11 + rayon/iter/cloned/struct.Cloned.html | 11 + rayon/iter/copied/struct.Copied.html | 11 + rayon/iter/empty/fn.empty.html | 11 + rayon/iter/empty/struct.Empty.html | 11 + rayon/iter/enum.Either.html | 1019 +++ rayon/iter/enumerate/struct.Enumerate.html | 11 + rayon/iter/filter/struct.Filter.html | 11 + rayon/iter/filter_map/struct.FilterMap.html | 11 + rayon/iter/flat_map/struct.FlatMap.html | 11 + .../flat_map_iter/struct.FlatMapIter.html | 11 + rayon/iter/flatten/struct.Flatten.html | 11 + .../iter/flatten_iter/struct.FlattenIter.html | 11 + rayon/iter/fn.empty.html | 14 + rayon/iter/fn.once.html | 17 + rayon/iter/fn.repeat.html | 12 + rayon/iter/fn.repeatn.html | 9 + rayon/iter/fn.split.html | 86 + rayon/iter/fn.walk_tree.html | 33 + rayon/iter/fn.walk_tree_postfix.html | 93 + rayon/iter/fn.walk_tree_prefix.html | 94 + rayon/iter/fold/struct.Fold.html | 11 + rayon/iter/fold/struct.FoldWith.html | 11 + rayon/iter/fold_chunks/struct.FoldChunks.html | 11 + .../struct.FoldChunksWith.html | 11 + rayon/iter/index.html | 133 + rayon/iter/inspect/struct.Inspect.html | 11 + rayon/iter/interleave/struct.Interleave.html | 11 + .../struct.InterleaveShortest.html | 11 + .../iter/intersperse/struct.Intersperse.html | 11 + rayon/iter/len/struct.MaxLen.html | 11 + rayon/iter/len/struct.MinLen.html | 11 + rayon/iter/map/struct.Map.html | 11 + rayon/iter/map_with/struct.MapInit.html | 11 + rayon/iter/map_with/struct.MapWith.html | 11 + rayon/iter/multizip/struct.MultiZip.html | 11 + rayon/iter/once/fn.once.html | 11 + rayon/iter/once/struct.Once.html | 11 + rayon/iter/panic_fuse/struct.PanicFuse.html | 11 + rayon/iter/par_bridge/struct.IterBridge.html | 11 + .../iter/par_bridge/trait.ParallelBridge.html | 11 + rayon/iter/plumbing/fn.bridge.html | 11 + .../plumbing/fn.bridge_producer_consumer.html | 16 + rayon/iter/plumbing/fn.bridge_unindexed.html | 5 + rayon/iter/plumbing/index.html | 46 + rayon/iter/plumbing/sidebar-items.js | 1 + rayon/iter/plumbing/trait.Consumer.html | 31 + rayon/iter/plumbing/trait.Folder.html | 29 + rayon/iter/plumbing/trait.Producer.html | 60 + .../iter/plumbing/trait.ProducerCallback.html | 17 + rayon/iter/plumbing/trait.Reducer.html | 12 + .../plumbing/trait.UnindexedConsumer.html | 20 + .../plumbing/trait.UnindexedProducer.html | 21 + rayon/iter/positions/struct.Positions.html | 11 + rayon/iter/repeat/fn.repeat.html | 11 + rayon/iter/repeat/fn.repeatn.html | 11 + rayon/iter/repeat/struct.Repeat.html | 11 + rayon/iter/repeat/struct.RepeatN.html | 11 + rayon/iter/rev/struct.Rev.html | 11 + rayon/iter/sidebar-items.js | 1 + rayon/iter/skip/struct.Skip.html | 11 + rayon/iter/skip_any/struct.SkipAny.html | 11 + .../skip_any_while/struct.SkipAnyWhile.html | 11 + rayon/iter/splitter/fn.split.html | 11 + rayon/iter/splitter/struct.Split.html | 11 + rayon/iter/step_by/struct.StepBy.html | 11 + rayon/iter/struct.Chain.html | 305 + rayon/iter/struct.Chunks.html | 295 + rayon/iter/struct.Cloned.html | 294 + rayon/iter/struct.Copied.html | 294 + rayon/iter/struct.Empty.html | 288 + rayon/iter/struct.Enumerate.html | 291 + rayon/iter/struct.ExponentialBlocks.html | 199 + rayon/iter/struct.Filter.html | 204 + rayon/iter/struct.FilterMap.html | 205 + rayon/iter/struct.FlatMap.html | 205 + rayon/iter/struct.FlatMapIter.html | 206 + rayon/iter/struct.Flatten.html | 198 + rayon/iter/struct.FlattenIter.html | 199 + rayon/iter/struct.Fold.html | 213 + rayon/iter/struct.FoldChunks.html | 313 + rayon/iter/struct.FoldChunksWith.html | 311 + rayon/iter/struct.FoldWith.html | 212 + rayon/iter/struct.Inspect.html | 301 + rayon/iter/struct.Interleave.html | 306 + rayon/iter/struct.InterleaveShortest.html | 308 + rayon/iter/struct.Intersperse.html | 306 + rayon/iter/struct.IterBridge.html | 199 + rayon/iter/struct.Map.html | 302 + rayon/iter/struct.MapInit.html | 310 + rayon/iter/struct.MapWith.html | 310 + rayon/iter/struct.MaxLen.html | 291 + rayon/iter/struct.MinLen.html | 291 + rayon/iter/struct.MultiZip.html | 3389 ++++++++ rayon/iter/struct.Once.html | 289 + rayon/iter/struct.PanicFuse.html | 293 + rayon/iter/struct.Positions.html | 205 + rayon/iter/struct.Repeat.html | 206 + rayon/iter/struct.RepeatN.html | 291 + rayon/iter/struct.Rev.html | 291 + rayon/iter/struct.Skip.html | 292 + rayon/iter/struct.SkipAny.html | 197 + rayon/iter/struct.SkipAnyWhile.html | 205 + rayon/iter/struct.Split.html | 205 + rayon/iter/struct.StepBy.html | 291 + rayon/iter/struct.Take.html | 292 + rayon/iter/struct.TakeAny.html | 197 + rayon/iter/struct.TakeAnyWhile.html | 205 + rayon/iter/struct.TryFold.html | 218 + rayon/iter/struct.TryFoldWith.html | 215 + rayon/iter/struct.UniformBlocks.html | 199 + rayon/iter/struct.Update.html | 301 + rayon/iter/struct.WalkTree.html | 206 + rayon/iter/struct.WalkTreePostfix.html | 205 + rayon/iter/struct.WalkTreePrefix.html | 206 + rayon/iter/struct.WhileSome.html | 199 + rayon/iter/struct.Zip.html | 300 + rayon/iter/struct.ZipEq.html | 301 + rayon/iter/take/struct.Take.html | 11 + rayon/iter/take_any/struct.TakeAny.html | 11 + .../take_any_while/struct.TakeAnyWhile.html | 11 + rayon/iter/trait.FromParallelIterator.html | 153 + rayon/iter/trait.IndexedParallelIterator.html | 669 ++ rayon/iter/trait.IntoParallelIterator.html | 499 ++ rayon/iter/trait.IntoParallelRefIterator.html | 31 + .../trait.IntoParallelRefMutIterator.html | 27 + rayon/iter/trait.ParallelBridge.html | 40 + rayon/iter/trait.ParallelDrainFull.html | 35 + rayon/iter/trait.ParallelDrainRange.html | 67 + rayon/iter/trait.ParallelExtend.html | 132 + rayon/iter/trait.ParallelIterator.html | 1642 ++++ rayon/iter/try_fold/struct.TryFold.html | 11 + rayon/iter/try_fold/struct.TryFoldWith.html | 11 + rayon/iter/update/struct.Update.html | 11 + rayon/iter/walk_tree/fn.walk_tree.html | 11 + .../iter/walk_tree/fn.walk_tree_postfix.html | 11 + rayon/iter/walk_tree/fn.walk_tree_prefix.html | 11 + rayon/iter/walk_tree/struct.WalkTree.html | 11 + .../walk_tree/struct.WalkTreePostfix.html | 11 + .../iter/walk_tree/struct.WalkTreePrefix.html | 11 + rayon/iter/while_some/struct.WhileSome.html | 11 + rayon/iter/zip/struct.Zip.html | 11 + rayon/iter/zip_eq/struct.ZipEq.html | 11 + rayon/option/index.html | 5 + rayon/option/sidebar-items.js | 1 + rayon/option/struct.IntoIter.html | 291 + rayon/option/struct.Iter.html | 288 + rayon/option/struct.IterMut.html | 287 + rayon/prelude/index.html | 5 + rayon/prelude/sidebar-items.js | 1 + rayon/range/index.html | 14 + rayon/range/sidebar-items.js | 1 + rayon/range/struct.Iter.html | 580 ++ rayon/range_inclusive/index.html | 14 + rayon/range_inclusive/sidebar-items.js | 1 + rayon/range_inclusive/struct.Iter.html | 580 ++ rayon/result/index.html | 5 + rayon/result/sidebar-items.js | 1 + rayon/result/struct.IntoIter.html | 289 + rayon/result/struct.Iter.html | 286 + rayon/result/struct.IterMut.html | 285 + rayon/sidebar-items.js | 1 + rayon/slice/chunk_by/struct.ChunkBy.html | 11 + rayon/slice/chunk_by/struct.ChunkByMut.html | 11 + rayon/slice/chunks/struct.Chunks.html | 11 + rayon/slice/chunks/struct.ChunksExact.html | 11 + rayon/slice/chunks/struct.ChunksExactMut.html | 11 + rayon/slice/chunks/struct.ChunksMut.html | 11 + rayon/slice/index.html | 8 + rayon/slice/rchunks/struct.RChunks.html | 11 + rayon/slice/rchunks/struct.RChunksExact.html | 11 + .../slice/rchunks/struct.RChunksExactMut.html | 11 + rayon/slice/rchunks/struct.RChunksMut.html | 11 + rayon/slice/sidebar-items.js | 1 + rayon/slice/struct.ChunkBy.html | 203 + rayon/slice/struct.ChunkByMut.html | 201 + rayon/slice/struct.Chunks.html | 286 + rayon/slice/struct.ChunksExact.html | 289 + rayon/slice/struct.ChunksExactMut.html | 301 + rayon/slice/struct.ChunksMut.html | 285 + rayon/slice/struct.Iter.html | 286 + rayon/slice/struct.IterMut.html | 285 + rayon/slice/struct.RChunks.html | 286 + rayon/slice/struct.RChunksExact.html | 289 + rayon/slice/struct.RChunksExactMut.html | 301 + rayon/slice/struct.RChunksMut.html | 285 + rayon/slice/struct.Split.html | 202 + rayon/slice/struct.SplitInclusive.html | 203 + rayon/slice/struct.SplitInclusiveMut.html | 200 + rayon/slice/struct.SplitMut.html | 199 + rayon/slice/struct.Windows.html | 286 + rayon/slice/trait.ParallelSlice.html | 95 + rayon/slice/trait.ParallelSliceMut.html | 337 + rayon/str/index.html | 10 + rayon/str/sidebar-items.js | 1 + rayon/str/struct.Bytes.html | 190 + rayon/str/struct.CharIndices.html | 190 + rayon/str/struct.Chars.html | 190 + rayon/str/struct.EncodeUtf16.html | 190 + rayon/str/struct.Lines.html | 190 + rayon/str/struct.MatchIndices.html | 194 + rayon/str/struct.Matches.html | 194 + rayon/str/struct.Split.html | 194 + rayon/str/struct.SplitAsciiWhitespace.html | 190 + rayon/str/struct.SplitInclusive.html | 194 + rayon/str/struct.SplitTerminator.html | 194 + rayon/str/struct.SplitWhitespace.html | 190 + rayon/str/trait.ParallelString.html | 180 + rayon/string/index.html | 6 + rayon/string/sidebar-items.js | 1 + rayon/string/struct.Drain.html | 190 + rayon/struct.BroadcastContext.html | 26 + rayon/struct.FnContext.html | 22 + rayon/struct.Scope.html | 67 + rayon/struct.ScopeFifo.html | 37 + rayon/struct.ThreadBuilder.html | 26 + rayon/struct.ThreadPool.html | 206 + rayon/struct.ThreadPoolBuildError.html | 21 + rayon/struct.ThreadPoolBuilder.html | 236 + rayon/vec/index.html | 5 + rayon/vec/sidebar-items.js | 1 + rayon/vec/struct.Drain.html | 285 + rayon/vec/struct.IntoIter.html | 288 + rayon_core/all.html | 2 + rayon_core/broadcast/fn.broadcast.html | 11 + rayon_core/broadcast/fn.spawn_broadcast.html | 11 + .../broadcast/struct.BroadcastContext.html | 11 + rayon_core/enum.Yield.html | 21 + rayon_core/fn.broadcast.html | 10 + rayon_core/fn.current_num_threads.html | 15 + .../fn.current_thread_has_pending_tasks.html | 6 + rayon_core/fn.current_thread_index.html | 17 + rayon_core/fn.in_place_scope.html | 21 + rayon_core/fn.in_place_scope_fifo.html | 21 + rayon_core/fn.initialize.html | 3 + rayon_core/fn.join.html | 74 + rayon_core/fn.join_context.html | 13 + rayon_core/fn.max_num_threads.html | 6 + rayon_core/fn.scope.html | 191 + rayon_core/fn.scope_fifo.html | 67 + rayon_core/fn.spawn.html | 40 + rayon_core/fn.spawn_broadcast.html | 8 + rayon_core/fn.spawn_fifo.html | 20 + rayon_core/fn.yield_local.html | 9 + rayon_core/fn.yield_now.html | 11 + rayon_core/index.html | 100 + rayon_core/join/fn.join.html | 11 + rayon_core/join/fn.join_context.html | 11 + rayon_core/registry/struct.ThreadBuilder.html | 11 + rayon_core/scope/fn.in_place_scope.html | 11 + rayon_core/scope/fn.in_place_scope_fifo.html | 11 + rayon_core/scope/fn.scope.html | 11 + rayon_core/scope/fn.scope_fifo.html | 11 + rayon_core/scope/struct.Scope.html | 11 + rayon_core/scope/struct.ScopeFifo.html | 11 + rayon_core/sidebar-items.js | 1 + rayon_core/spawn/fn.spawn.html | 11 + rayon_core/spawn/fn.spawn_fifo.html | 11 + rayon_core/struct.BroadcastContext.html | 19 + rayon_core/struct.Configuration.html | 26 + rayon_core/struct.FnContext.html | 15 + rayon_core/struct.Scope.html | 60 + rayon_core/struct.ScopeFifo.html | 30 + rayon_core/struct.ThreadBuilder.html | 19 + rayon_core/struct.ThreadPool.html | 199 + rayon_core/struct.ThreadPoolBuildError.html | 14 + rayon_core/struct.ThreadPoolBuilder.html | 229 + rayon_core/thread_pool/enum.Yield.html | 11 + .../fn.current_thread_has_pending_tasks.html | 11 + .../thread_pool/fn.current_thread_index.html | 11 + rayon_core/thread_pool/fn.yield_local.html | 11 + rayon_core/thread_pool/fn.yield_now.html | 11 + rayon_core/thread_pool/struct.ThreadPool.html | 11 + search-index.js | 8 +- src-files.js | 6 + src/cosmic_text/font/mod.rs.html | 40 + src/cosmic_text/font/system.rs.html | 84 +- src/crossbeam_deque/deque.rs.html | 4405 ++++++++++ src/crossbeam_deque/lib.rs.html | 209 + src/crossbeam_epoch/atomic.rs.html | 3407 ++++++++ src/crossbeam_epoch/collector.rs.html | 931 +++ src/crossbeam_epoch/default.rs.html | 189 + src/crossbeam_epoch/deferred.rs.html | 295 + src/crossbeam_epoch/epoch.rs.html | 267 + src/crossbeam_epoch/guard.rs.html | 1049 +++ src/crossbeam_epoch/internal.rs.html | 1203 +++ src/crossbeam_epoch/lib.rs.html | 335 + src/crossbeam_epoch/sync/list.rs.html | 977 +++ src/crossbeam_epoch/sync/mod.rs.html | 17 + src/crossbeam_epoch/sync/once_lock.rs.html | 179 + src/crossbeam_epoch/sync/queue.rs.html | 939 +++ .../atomic/atomic_cell.rs.html | 2367 ++++++ src/crossbeam_utils/atomic/consume.rs.html | 225 + src/crossbeam_utils/atomic/mod.rs.html | 67 + src/crossbeam_utils/atomic/seq_lock.rs.html | 227 + src/crossbeam_utils/backoff.rs.html | 577 ++ src/crossbeam_utils/cache_padded.rs.html | 433 + src/crossbeam_utils/lib.rs.html | 223 + src/crossbeam_utils/sync/mod.rs.html | 37 + src/crossbeam_utils/sync/once_lock.rs.html | 179 + src/crossbeam_utils/sync/parker.rs.html | 833 ++ src/crossbeam_utils/sync/sharded_lock.rs.html | 1279 +++ src/crossbeam_utils/sync/wait_group.rs.html | 293 + src/crossbeam_utils/thread.rs.html | 1225 +++ src/either/into_either.rs.html | 131 + src/either/iterator.rs.html | 633 ++ src/either/lib.rs.html | 3041 +++++++ src/rayon/array.rs.html | 173 + src/rayon/collections/binary_heap.rs.html | 243 + src/rayon/collections/btree_map.rs.html | 135 + src/rayon/collections/btree_set.rs.html | 107 + src/rayon/collections/hash_map.rs.html | 195 + src/rayon/collections/hash_set.rs.html | 163 + src/rayon/collections/linked_list.rs.html | 135 + src/rayon/collections/mod.rs.html | 171 + src/rayon/collections/vec_deque.rs.html | 321 + .../cannot_collect_filtermap_data.rs.html | 31 + .../cannot_zip_filtered_data.rs.html | 31 + src/rayon/compile_fail/cell_par_iter.rs.html | 29 + src/rayon/compile_fail/mod.rs.html | 17 + src/rayon/compile_fail/must_use.rs.html | 145 + .../compile_fail/no_send_par_iter.rs.html | 119 + src/rayon/compile_fail/rc_par_iter.rs.html | 33 + src/rayon/delegate.rs.html | 221 + src/rayon/iter/blocks.rs.html | 265 + src/rayon/iter/chain.rs.html | 537 ++ src/rayon/iter/chunks.rs.html | 451 + src/rayon/iter/cloned.rs.html | 449 + src/rayon/iter/collect/consumer.rs.html | 375 + src/rayon/iter/collect/mod.rs.html | 235 + src/rayon/iter/copied.rs.html | 449 + src/rayon/iter/empty.rs.html | 211 + src/rayon/iter/enumerate.rs.html | 269 + src/rayon/iter/extend.rs.html | 1241 +++ src/rayon/iter/filter.rs.html | 285 + src/rayon/iter/filter_map.rs.html | 287 + src/rayon/iter/find.rs.html | 243 + src/rayon/iter/find_first_last/mod.rs.html | 463 ++ src/rayon/iter/flat_map.rs.html | 311 + src/rayon/iter/flat_map_iter.rs.html | 297 + src/rayon/iter/flatten.rs.html | 283 + src/rayon/iter/flatten_iter.rs.html | 267 + src/rayon/iter/fold.rs.html | 607 ++ src/rayon/iter/fold_chunks.rs.html | 475 ++ src/rayon/iter/fold_chunks_with.rs.html | 465 ++ src/rayon/iter/for_each.rs.html | 157 + src/rayon/iter/from_par_iter.rs.html | 623 ++ src/rayon/iter/inspect.rs.html | 517 ++ src/rayon/iter/interleave.rs.html | 673 ++ src/rayon/iter/interleave_shortest.rs.html | 173 + src/rayon/iter/intersperse.rs.html | 823 ++ src/rayon/iter/len.rs.html | 543 ++ src/rayon/iter/map.rs.html | 521 ++ src/rayon/iter/map_with.rs.html | 1149 +++ src/rayon/iter/mod.rs.html | 7315 +++++++++++++++++ src/rayon/iter/multizip.rs.html | 679 ++ src/rayon/iter/noop.rs.html | 121 + src/rayon/iter/once.rs.html | 139 + src/rayon/iter/panic_fuse.rs.html | 687 ++ src/rayon/iter/par_bridge.rs.html | 321 + src/rayon/iter/plumbing/mod.rs.html | 969 +++ src/rayon/iter/positions.rs.html | 277 + src/rayon/iter/product.rs.html | 231 + src/rayon/iter/reduce.rs.html | 235 + src/rayon/iter/repeat.rs.html | 485 ++ src/rayon/iter/rev.rs.html | 249 + src/rayon/iter/skip.rs.html | 191 + src/rayon/iter/skip_any.rs.html | 291 + src/rayon/iter/skip_any_while.rs.html | 335 + src/rayon/iter/splitter.rs.html | 351 + src/rayon/iter/step_by.rs.html | 285 + src/rayon/iter/sum.rs.html | 223 + src/rayon/iter/take.rs.html | 173 + src/rayon/iter/take_any.rs.html | 291 + src/rayon/iter/take_any_while.rs.html | 335 + src/rayon/iter/try_fold.rs.html | 599 ++ src/rayon/iter/try_reduce.rs.html | 265 + src/rayon/iter/try_reduce_with.rs.html | 267 + src/rayon/iter/unzip.rs.html | 1053 +++ src/rayon/iter/update.rs.html | 657 ++ src/rayon/iter/walk_tree.rs.html | 1061 +++ src/rayon/iter/while_some.rs.html | 311 + src/rayon/iter/zip.rs.html | 319 + src/rayon/iter/zip_eq.rs.html | 147 + src/rayon/lib.rs.html | 323 + src/rayon/math.rs.html | 111 + src/rayon/option.rs.html | 409 + src/rayon/par_either.rs.html | 151 + src/rayon/prelude.rs.html | 37 + src/rayon/private.rs.html | 55 + src/rayon/range.rs.html | 911 ++ src/rayon/range_inclusive.rs.html | 765 ++ src/rayon/result.rs.html | 267 + src/rayon/slice/chunk_by.rs.html | 491 ++ src/rayon/slice/chunks.rs.html | 779 ++ src/rayon/slice/mergesort.rs.html | 1513 ++++ src/rayon/slice/mod.rs.html | 2455 ++++++ src/rayon/slice/quicksort.rs.html | 1807 ++++ src/rayon/slice/rchunks.rs.html | 775 ++ src/rayon/split_producer.rs.html | 307 + src/rayon/str.rs.html | 2023 +++++ src/rayon/string.rs.html | 99 + src/rayon/vec.rs.html | 569 ++ src/rayon_core/broadcast/mod.rs.html | 303 + src/rayon_core/compile_fail/mod.rs.html | 17 + .../compile_fail/quicksort_race1.rs.html | 59 + .../compile_fail/quicksort_race2.rs.html | 59 + .../compile_fail/quicksort_race3.rs.html | 59 + src/rayon_core/compile_fail/rc_return.rs.html | 37 + src/rayon_core/compile_fail/rc_upvar.rs.html | 21 + .../compile_fail/scope_join_bad.rs.html | 51 + src/rayon_core/job.rs.html | 543 ++ src/rayon_core/join/mod.rs.html | 379 + src/rayon_core/latch.rs.html | 925 +++ src/rayon_core/lib.rs.html | 1753 ++++ src/rayon_core/private.rs.html | 55 + src/rayon_core/registry.rs.html | 1995 +++++ src/rayon_core/scope/mod.rs.html | 1541 ++++ src/rayon_core/sleep/counters.rs.html | 557 ++ src/rayon_core/sleep/mod.rs.html | 653 ++ src/rayon_core/spawn/mod.rs.html | 329 + src/rayon_core/thread_pool/mod.rs.html | 1019 +++ src/rayon_core/unwind.rs.html | 65 + trait.impl/core/borrow/trait.Borrow.js | 1 + trait.impl/core/borrow/trait.BorrowMut.js | 1 + trait.impl/core/clone/trait.Clone.js | 6 + trait.impl/core/cmp/trait.Eq.js | 5 + trait.impl/core/cmp/trait.Ord.js | 2 + trait.impl/core/cmp/trait.PartialEq.js | 5 + trait.impl/core/cmp/trait.PartialOrd.js | 2 + trait.impl/core/convert/trait.AsMut.js | 2 + trait.impl/core/convert/trait.AsRef.js | 2 + trait.impl/core/convert/trait.From.js | 3 + trait.impl/core/convert/trait.Into.js | 1 + trait.impl/core/default/trait.Default.js | 4 + trait.impl/core/error/trait.Error.js | 1 + trait.impl/core/fmt/trait.Debug.js | 6 + trait.impl/core/fmt/trait.Display.js | 3 + trait.impl/core/fmt/trait.Pointer.js | 1 + trait.impl/core/future/future/trait.Future.js | 3 + trait.impl/core/hash/trait.Hash.js | 2 + .../core/iter/traits/collect/trait.Extend.js | 1 + .../iter/traits/collect/trait.FromIterator.js | 1 + .../double_ended/trait.DoubleEndedIterator.js | 1 + .../exact_size/trait.ExactSizeIterator.js | 1 + .../iter/traits/iterator/trait.Iterator.js | 1 + .../iter/traits/marker/trait.FusedIterator.js | 1 + trait.impl/core/marker/trait.Copy.js | 5 + trait.impl/core/marker/trait.Freeze.js | 6 + trait.impl/core/marker/trait.Send.js | 6 + .../core/marker/trait.StructuralPartialEq.js | 4 + trait.impl/core/marker/trait.Sync.js | 6 + trait.impl/core/marker/trait.Unpin.js | 6 + trait.impl/core/ops/deref/trait.Deref.js | 3 + trait.impl/core/ops/deref/trait.DerefMut.js | 3 + trait.impl/core/ops/drop/trait.Drop.js | 5 + .../panic/unwind_safe/trait.RefUnwindSafe.js | 6 + .../panic/unwind_safe/trait.UnwindSafe.js | 6 + .../atomic/trait.CompareAndSetOrdering.js | 3 + .../crossbeam_epoch/atomic/trait.Pointable.js | 3 + .../crossbeam_epoch/atomic/trait.Pointer.js | 3 + .../atomic/consume/trait.AtomicConsume.js | 3 + .../either/into_either/trait.IntoEither.js | 3 + .../iter/par_bridge/trait.ParallelBridge.js | 3 + .../rayon/iter/trait.FromParallelIterator.js | 3 + .../iter/trait.IndexedParallelIterator.js | 3 + .../rayon/iter/trait.IntoParallelIterator.js | 3 + .../iter/trait.IntoParallelRefIterator.js | 3 + .../iter/trait.IntoParallelRefMutIterator.js | 3 + .../rayon/iter/trait.ParallelDrainFull.js | 3 + .../rayon/iter/trait.ParallelDrainRange.js | 3 + trait.impl/rayon/iter/trait.ParallelExtend.js | 3 + .../rayon/iter/trait.ParallelIterator.js | 3 + trait.impl/rayon/slice/trait.ParallelSlice.js | 3 + .../rayon/slice/trait.ParallelSliceMut.js | 3 + trait.impl/rayon/str/trait.ParallelString.js | 3 + .../std/os/unix/thread/trait.JoinHandleExt.js | 3 + .../struct.CompareExchangeError.js | 3 + 688 files changed, 132650 insertions(+), 134 deletions(-) create mode 100644 crossbeam_deque/all.html create mode 100644 crossbeam_deque/deque/enum.Steal.html create mode 100644 crossbeam_deque/deque/struct.Injector.html create mode 100644 crossbeam_deque/deque/struct.Stealer.html create mode 100644 crossbeam_deque/deque/struct.Worker.html create mode 100644 crossbeam_deque/enum.Steal.html create mode 100644 crossbeam_deque/index.html create mode 100644 crossbeam_deque/sidebar-items.js create mode 100644 crossbeam_deque/struct.Injector.html create mode 100644 crossbeam_deque/struct.Stealer.html create mode 100644 crossbeam_deque/struct.Worker.html create mode 100644 crossbeam_epoch/all.html create mode 100644 crossbeam_epoch/atomic/struct.Atomic.html create mode 100644 crossbeam_epoch/atomic/struct.CompareExchangeError.html create mode 100644 crossbeam_epoch/atomic/struct.Owned.html create mode 100644 crossbeam_epoch/atomic/struct.Shared.html create mode 100644 crossbeam_epoch/atomic/trait.CompareAndSetOrdering.html create mode 100644 crossbeam_epoch/atomic/trait.Pointable.html create mode 100644 crossbeam_epoch/atomic/trait.Pointer.html create mode 100644 crossbeam_epoch/atomic/type.CompareAndSetError.html create mode 100644 crossbeam_epoch/collector/struct.Collector.html create mode 100644 crossbeam_epoch/collector/struct.LocalHandle.html create mode 100644 crossbeam_epoch/default/fn.default_collector.html create mode 100644 crossbeam_epoch/default/fn.is_pinned.html create mode 100644 crossbeam_epoch/default/fn.pin.html create mode 100644 crossbeam_epoch/fn.default_collector.html create mode 100644 crossbeam_epoch/fn.is_pinned.html create mode 100644 crossbeam_epoch/fn.pin.html create mode 100644 crossbeam_epoch/fn.unprotected.html create mode 100644 crossbeam_epoch/guard/fn.unprotected.html create mode 100644 crossbeam_epoch/guard/struct.Guard.html create mode 100644 crossbeam_epoch/index.html create mode 100644 crossbeam_epoch/sidebar-items.js create mode 100644 crossbeam_epoch/struct.Atomic.html create mode 100644 crossbeam_epoch/struct.Collector.html create mode 100644 crossbeam_epoch/struct.CompareExchangeError.html create mode 100644 crossbeam_epoch/struct.Guard.html create mode 100644 crossbeam_epoch/struct.LocalHandle.html create mode 100644 crossbeam_epoch/struct.Owned.html create mode 100644 crossbeam_epoch/struct.Shared.html create mode 100644 crossbeam_epoch/trait.CompareAndSetOrdering.html create mode 100644 crossbeam_epoch/trait.Pointable.html create mode 100644 crossbeam_epoch/trait.Pointer.html create mode 100644 crossbeam_epoch/type.CompareAndSetError.html create mode 100644 crossbeam_utils/all.html create mode 100644 crossbeam_utils/atomic/atomic_cell/struct.AtomicCell.html create mode 100644 crossbeam_utils/atomic/consume/trait.AtomicConsume.html create mode 100644 crossbeam_utils/atomic/index.html create mode 100644 crossbeam_utils/atomic/sidebar-items.js create mode 100644 crossbeam_utils/atomic/struct.AtomicCell.html create mode 100644 crossbeam_utils/atomic/trait.AtomicConsume.html create mode 100644 crossbeam_utils/backoff/struct.Backoff.html create mode 100644 crossbeam_utils/cache_padded/struct.CachePadded.html create mode 100644 crossbeam_utils/index.html create mode 100644 crossbeam_utils/sidebar-items.js create mode 100644 crossbeam_utils/struct.Backoff.html create mode 100644 crossbeam_utils/struct.CachePadded.html create mode 100644 crossbeam_utils/sync/index.html create mode 100644 crossbeam_utils/sync/parker/struct.Parker.html create mode 100644 crossbeam_utils/sync/parker/struct.Unparker.html create mode 100644 crossbeam_utils/sync/sharded_lock/struct.ShardedLock.html create mode 100644 crossbeam_utils/sync/sharded_lock/struct.ShardedLockReadGuard.html create mode 100644 crossbeam_utils/sync/sharded_lock/struct.ShardedLockWriteGuard.html create mode 100644 crossbeam_utils/sync/sidebar-items.js create mode 100644 crossbeam_utils/sync/struct.Parker.html create mode 100644 crossbeam_utils/sync/struct.ShardedLock.html create mode 100644 crossbeam_utils/sync/struct.ShardedLockReadGuard.html create mode 100644 crossbeam_utils/sync/struct.ShardedLockWriteGuard.html create mode 100644 crossbeam_utils/sync/struct.Unparker.html create mode 100644 crossbeam_utils/sync/struct.WaitGroup.html create mode 100644 crossbeam_utils/sync/wait_group/struct.WaitGroup.html create mode 100644 crossbeam_utils/thread/fn.scope.html create mode 100644 crossbeam_utils/thread/index.html create mode 100644 crossbeam_utils/thread/sidebar-items.js create mode 100644 crossbeam_utils/thread/struct.Scope.html create mode 100644 crossbeam_utils/thread/struct.ScopedJoinHandle.html create mode 100644 crossbeam_utils/thread/struct.ScopedThreadBuilder.html create mode 100644 either/all.html create mode 100644 either/enum.Either.html create mode 100644 either/index.html create mode 100644 either/into_either/trait.IntoEither.html create mode 100644 either/iterator/struct.IterEither.html create mode 100644 either/macro.for_both!.html create mode 100644 either/macro.for_both.html create mode 100644 either/macro.try_left!.html create mode 100644 either/macro.try_left.html create mode 100644 either/macro.try_right!.html create mode 100644 either/macro.try_right.html create mode 100644 either/sidebar-items.js create mode 100644 either/struct.IterEither.html create mode 100644 either/trait.IntoEither.html create mode 100644 rayon/all.html create mode 100644 rayon/array/index.html create mode 100644 rayon/array/sidebar-items.js create mode 100644 rayon/array/struct.IntoIter.html create mode 100644 rayon/collections/binary_heap/index.html create mode 100644 rayon/collections/binary_heap/sidebar-items.js create mode 100644 rayon/collections/binary_heap/struct.Drain.html create mode 100644 rayon/collections/binary_heap/struct.IntoIter.html create mode 100644 rayon/collections/binary_heap/struct.Iter.html create mode 100644 rayon/collections/btree_map/index.html create mode 100644 rayon/collections/btree_map/sidebar-items.js create mode 100644 rayon/collections/btree_map/struct.IntoIter.html create mode 100644 rayon/collections/btree_map/struct.Iter.html create mode 100644 rayon/collections/btree_map/struct.IterMut.html create mode 100644 rayon/collections/btree_set/index.html create mode 100644 rayon/collections/btree_set/sidebar-items.js create mode 100644 rayon/collections/btree_set/struct.IntoIter.html create mode 100644 rayon/collections/btree_set/struct.Iter.html create mode 100644 rayon/collections/hash_map/index.html create mode 100644 rayon/collections/hash_map/sidebar-items.js create mode 100644 rayon/collections/hash_map/struct.Drain.html create mode 100644 rayon/collections/hash_map/struct.IntoIter.html create mode 100644 rayon/collections/hash_map/struct.Iter.html create mode 100644 rayon/collections/hash_map/struct.IterMut.html create mode 100644 rayon/collections/hash_set/index.html create mode 100644 rayon/collections/hash_set/sidebar-items.js create mode 100644 rayon/collections/hash_set/struct.Drain.html create mode 100644 rayon/collections/hash_set/struct.IntoIter.html create mode 100644 rayon/collections/hash_set/struct.Iter.html create mode 100644 rayon/collections/index.html create mode 100644 rayon/collections/linked_list/index.html create mode 100644 rayon/collections/linked_list/sidebar-items.js create mode 100644 rayon/collections/linked_list/struct.IntoIter.html create mode 100644 rayon/collections/linked_list/struct.Iter.html create mode 100644 rayon/collections/linked_list/struct.IterMut.html create mode 100644 rayon/collections/sidebar-items.js create mode 100644 rayon/collections/vec_deque/index.html create mode 100644 rayon/collections/vec_deque/sidebar-items.js create mode 100644 rayon/collections/vec_deque/struct.Drain.html create mode 100644 rayon/collections/vec_deque/struct.IntoIter.html create mode 100644 rayon/collections/vec_deque/struct.Iter.html create mode 100644 rayon/collections/vec_deque/struct.IterMut.html create mode 100644 rayon/enum.Yield.html create mode 100644 rayon/fn.broadcast.html create mode 100644 rayon/fn.current_num_threads.html create mode 100644 rayon/fn.current_thread_index.html create mode 100644 rayon/fn.in_place_scope.html create mode 100644 rayon/fn.in_place_scope_fifo.html create mode 100644 rayon/fn.join.html create mode 100644 rayon/fn.join_context.html create mode 100644 rayon/fn.max_num_threads.html create mode 100644 rayon/fn.scope.html create mode 100644 rayon/fn.scope_fifo.html create mode 100644 rayon/fn.spawn.html create mode 100644 rayon/fn.spawn_broadcast.html create mode 100644 rayon/fn.spawn_fifo.html create mode 100644 rayon/fn.yield_local.html create mode 100644 rayon/fn.yield_now.html create mode 100644 rayon/index.html create mode 100644 rayon/iter/blocks/struct.ExponentialBlocks.html create mode 100644 rayon/iter/blocks/struct.UniformBlocks.html create mode 100644 rayon/iter/chain/struct.Chain.html create mode 100644 rayon/iter/chunks/struct.Chunks.html create mode 100644 rayon/iter/cloned/struct.Cloned.html create mode 100644 rayon/iter/copied/struct.Copied.html create mode 100644 rayon/iter/empty/fn.empty.html create mode 100644 rayon/iter/empty/struct.Empty.html create mode 100644 rayon/iter/enum.Either.html create mode 100644 rayon/iter/enumerate/struct.Enumerate.html create mode 100644 rayon/iter/filter/struct.Filter.html create mode 100644 rayon/iter/filter_map/struct.FilterMap.html create mode 100644 rayon/iter/flat_map/struct.FlatMap.html create mode 100644 rayon/iter/flat_map_iter/struct.FlatMapIter.html create mode 100644 rayon/iter/flatten/struct.Flatten.html create mode 100644 rayon/iter/flatten_iter/struct.FlattenIter.html create mode 100644 rayon/iter/fn.empty.html create mode 100644 rayon/iter/fn.once.html create mode 100644 rayon/iter/fn.repeat.html create mode 100644 rayon/iter/fn.repeatn.html create mode 100644 rayon/iter/fn.split.html create mode 100644 rayon/iter/fn.walk_tree.html create mode 100644 rayon/iter/fn.walk_tree_postfix.html create mode 100644 rayon/iter/fn.walk_tree_prefix.html create mode 100644 rayon/iter/fold/struct.Fold.html create mode 100644 rayon/iter/fold/struct.FoldWith.html create mode 100644 rayon/iter/fold_chunks/struct.FoldChunks.html create mode 100644 rayon/iter/fold_chunks_with/struct.FoldChunksWith.html create mode 100644 rayon/iter/index.html create mode 100644 rayon/iter/inspect/struct.Inspect.html create mode 100644 rayon/iter/interleave/struct.Interleave.html create mode 100644 rayon/iter/interleave_shortest/struct.InterleaveShortest.html create mode 100644 rayon/iter/intersperse/struct.Intersperse.html create mode 100644 rayon/iter/len/struct.MaxLen.html create mode 100644 rayon/iter/len/struct.MinLen.html create mode 100644 rayon/iter/map/struct.Map.html create mode 100644 rayon/iter/map_with/struct.MapInit.html create mode 100644 rayon/iter/map_with/struct.MapWith.html create mode 100644 rayon/iter/multizip/struct.MultiZip.html create mode 100644 rayon/iter/once/fn.once.html create mode 100644 rayon/iter/once/struct.Once.html create mode 100644 rayon/iter/panic_fuse/struct.PanicFuse.html create mode 100644 rayon/iter/par_bridge/struct.IterBridge.html create mode 100644 rayon/iter/par_bridge/trait.ParallelBridge.html create mode 100644 rayon/iter/plumbing/fn.bridge.html create mode 100644 rayon/iter/plumbing/fn.bridge_producer_consumer.html create mode 100644 rayon/iter/plumbing/fn.bridge_unindexed.html create mode 100644 rayon/iter/plumbing/index.html create mode 100644 rayon/iter/plumbing/sidebar-items.js create mode 100644 rayon/iter/plumbing/trait.Consumer.html create mode 100644 rayon/iter/plumbing/trait.Folder.html create mode 100644 rayon/iter/plumbing/trait.Producer.html create mode 100644 rayon/iter/plumbing/trait.ProducerCallback.html create mode 100644 rayon/iter/plumbing/trait.Reducer.html create mode 100644 rayon/iter/plumbing/trait.UnindexedConsumer.html create mode 100644 rayon/iter/plumbing/trait.UnindexedProducer.html create mode 100644 rayon/iter/positions/struct.Positions.html create mode 100644 rayon/iter/repeat/fn.repeat.html create mode 100644 rayon/iter/repeat/fn.repeatn.html create mode 100644 rayon/iter/repeat/struct.Repeat.html create mode 100644 rayon/iter/repeat/struct.RepeatN.html create mode 100644 rayon/iter/rev/struct.Rev.html create mode 100644 rayon/iter/sidebar-items.js create mode 100644 rayon/iter/skip/struct.Skip.html create mode 100644 rayon/iter/skip_any/struct.SkipAny.html create mode 100644 rayon/iter/skip_any_while/struct.SkipAnyWhile.html create mode 100644 rayon/iter/splitter/fn.split.html create mode 100644 rayon/iter/splitter/struct.Split.html create mode 100644 rayon/iter/step_by/struct.StepBy.html create mode 100644 rayon/iter/struct.Chain.html create mode 100644 rayon/iter/struct.Chunks.html create mode 100644 rayon/iter/struct.Cloned.html create mode 100644 rayon/iter/struct.Copied.html create mode 100644 rayon/iter/struct.Empty.html create mode 100644 rayon/iter/struct.Enumerate.html create mode 100644 rayon/iter/struct.ExponentialBlocks.html create mode 100644 rayon/iter/struct.Filter.html create mode 100644 rayon/iter/struct.FilterMap.html create mode 100644 rayon/iter/struct.FlatMap.html create mode 100644 rayon/iter/struct.FlatMapIter.html create mode 100644 rayon/iter/struct.Flatten.html create mode 100644 rayon/iter/struct.FlattenIter.html create mode 100644 rayon/iter/struct.Fold.html create mode 100644 rayon/iter/struct.FoldChunks.html create mode 100644 rayon/iter/struct.FoldChunksWith.html create mode 100644 rayon/iter/struct.FoldWith.html create mode 100644 rayon/iter/struct.Inspect.html create mode 100644 rayon/iter/struct.Interleave.html create mode 100644 rayon/iter/struct.InterleaveShortest.html create mode 100644 rayon/iter/struct.Intersperse.html create mode 100644 rayon/iter/struct.IterBridge.html create mode 100644 rayon/iter/struct.Map.html create mode 100644 rayon/iter/struct.MapInit.html create mode 100644 rayon/iter/struct.MapWith.html create mode 100644 rayon/iter/struct.MaxLen.html create mode 100644 rayon/iter/struct.MinLen.html create mode 100644 rayon/iter/struct.MultiZip.html create mode 100644 rayon/iter/struct.Once.html create mode 100644 rayon/iter/struct.PanicFuse.html create mode 100644 rayon/iter/struct.Positions.html create mode 100644 rayon/iter/struct.Repeat.html create mode 100644 rayon/iter/struct.RepeatN.html create mode 100644 rayon/iter/struct.Rev.html create mode 100644 rayon/iter/struct.Skip.html create mode 100644 rayon/iter/struct.SkipAny.html create mode 100644 rayon/iter/struct.SkipAnyWhile.html create mode 100644 rayon/iter/struct.Split.html create mode 100644 rayon/iter/struct.StepBy.html create mode 100644 rayon/iter/struct.Take.html create mode 100644 rayon/iter/struct.TakeAny.html create mode 100644 rayon/iter/struct.TakeAnyWhile.html create mode 100644 rayon/iter/struct.TryFold.html create mode 100644 rayon/iter/struct.TryFoldWith.html create mode 100644 rayon/iter/struct.UniformBlocks.html create mode 100644 rayon/iter/struct.Update.html create mode 100644 rayon/iter/struct.WalkTree.html create mode 100644 rayon/iter/struct.WalkTreePostfix.html create mode 100644 rayon/iter/struct.WalkTreePrefix.html create mode 100644 rayon/iter/struct.WhileSome.html create mode 100644 rayon/iter/struct.Zip.html create mode 100644 rayon/iter/struct.ZipEq.html create mode 100644 rayon/iter/take/struct.Take.html create mode 100644 rayon/iter/take_any/struct.TakeAny.html create mode 100644 rayon/iter/take_any_while/struct.TakeAnyWhile.html create mode 100644 rayon/iter/trait.FromParallelIterator.html create mode 100644 rayon/iter/trait.IndexedParallelIterator.html create mode 100644 rayon/iter/trait.IntoParallelIterator.html create mode 100644 rayon/iter/trait.IntoParallelRefIterator.html create mode 100644 rayon/iter/trait.IntoParallelRefMutIterator.html create mode 100644 rayon/iter/trait.ParallelBridge.html create mode 100644 rayon/iter/trait.ParallelDrainFull.html create mode 100644 rayon/iter/trait.ParallelDrainRange.html create mode 100644 rayon/iter/trait.ParallelExtend.html create mode 100644 rayon/iter/trait.ParallelIterator.html create mode 100644 rayon/iter/try_fold/struct.TryFold.html create mode 100644 rayon/iter/try_fold/struct.TryFoldWith.html create mode 100644 rayon/iter/update/struct.Update.html create mode 100644 rayon/iter/walk_tree/fn.walk_tree.html create mode 100644 rayon/iter/walk_tree/fn.walk_tree_postfix.html create mode 100644 rayon/iter/walk_tree/fn.walk_tree_prefix.html create mode 100644 rayon/iter/walk_tree/struct.WalkTree.html create mode 100644 rayon/iter/walk_tree/struct.WalkTreePostfix.html create mode 100644 rayon/iter/walk_tree/struct.WalkTreePrefix.html create mode 100644 rayon/iter/while_some/struct.WhileSome.html create mode 100644 rayon/iter/zip/struct.Zip.html create mode 100644 rayon/iter/zip_eq/struct.ZipEq.html create mode 100644 rayon/option/index.html create mode 100644 rayon/option/sidebar-items.js create mode 100644 rayon/option/struct.IntoIter.html create mode 100644 rayon/option/struct.Iter.html create mode 100644 rayon/option/struct.IterMut.html create mode 100644 rayon/prelude/index.html create mode 100644 rayon/prelude/sidebar-items.js create mode 100644 rayon/range/index.html create mode 100644 rayon/range/sidebar-items.js create mode 100644 rayon/range/struct.Iter.html create mode 100644 rayon/range_inclusive/index.html create mode 100644 rayon/range_inclusive/sidebar-items.js create mode 100644 rayon/range_inclusive/struct.Iter.html create mode 100644 rayon/result/index.html create mode 100644 rayon/result/sidebar-items.js create mode 100644 rayon/result/struct.IntoIter.html create mode 100644 rayon/result/struct.Iter.html create mode 100644 rayon/result/struct.IterMut.html create mode 100644 rayon/sidebar-items.js create mode 100644 rayon/slice/chunk_by/struct.ChunkBy.html create mode 100644 rayon/slice/chunk_by/struct.ChunkByMut.html create mode 100644 rayon/slice/chunks/struct.Chunks.html create mode 100644 rayon/slice/chunks/struct.ChunksExact.html create mode 100644 rayon/slice/chunks/struct.ChunksExactMut.html create mode 100644 rayon/slice/chunks/struct.ChunksMut.html create mode 100644 rayon/slice/index.html create mode 100644 rayon/slice/rchunks/struct.RChunks.html create mode 100644 rayon/slice/rchunks/struct.RChunksExact.html create mode 100644 rayon/slice/rchunks/struct.RChunksExactMut.html create mode 100644 rayon/slice/rchunks/struct.RChunksMut.html create mode 100644 rayon/slice/sidebar-items.js create mode 100644 rayon/slice/struct.ChunkBy.html create mode 100644 rayon/slice/struct.ChunkByMut.html create mode 100644 rayon/slice/struct.Chunks.html create mode 100644 rayon/slice/struct.ChunksExact.html create mode 100644 rayon/slice/struct.ChunksExactMut.html create mode 100644 rayon/slice/struct.ChunksMut.html create mode 100644 rayon/slice/struct.Iter.html create mode 100644 rayon/slice/struct.IterMut.html create mode 100644 rayon/slice/struct.RChunks.html create mode 100644 rayon/slice/struct.RChunksExact.html create mode 100644 rayon/slice/struct.RChunksExactMut.html create mode 100644 rayon/slice/struct.RChunksMut.html create mode 100644 rayon/slice/struct.Split.html create mode 100644 rayon/slice/struct.SplitInclusive.html create mode 100644 rayon/slice/struct.SplitInclusiveMut.html create mode 100644 rayon/slice/struct.SplitMut.html create mode 100644 rayon/slice/struct.Windows.html create mode 100644 rayon/slice/trait.ParallelSlice.html create mode 100644 rayon/slice/trait.ParallelSliceMut.html create mode 100644 rayon/str/index.html create mode 100644 rayon/str/sidebar-items.js create mode 100644 rayon/str/struct.Bytes.html create mode 100644 rayon/str/struct.CharIndices.html create mode 100644 rayon/str/struct.Chars.html create mode 100644 rayon/str/struct.EncodeUtf16.html create mode 100644 rayon/str/struct.Lines.html create mode 100644 rayon/str/struct.MatchIndices.html create mode 100644 rayon/str/struct.Matches.html create mode 100644 rayon/str/struct.Split.html create mode 100644 rayon/str/struct.SplitAsciiWhitespace.html create mode 100644 rayon/str/struct.SplitInclusive.html create mode 100644 rayon/str/struct.SplitTerminator.html create mode 100644 rayon/str/struct.SplitWhitespace.html create mode 100644 rayon/str/trait.ParallelString.html create mode 100644 rayon/string/index.html create mode 100644 rayon/string/sidebar-items.js create mode 100644 rayon/string/struct.Drain.html create mode 100644 rayon/struct.BroadcastContext.html create mode 100644 rayon/struct.FnContext.html create mode 100644 rayon/struct.Scope.html create mode 100644 rayon/struct.ScopeFifo.html create mode 100644 rayon/struct.ThreadBuilder.html create mode 100644 rayon/struct.ThreadPool.html create mode 100644 rayon/struct.ThreadPoolBuildError.html create mode 100644 rayon/struct.ThreadPoolBuilder.html create mode 100644 rayon/vec/index.html create mode 100644 rayon/vec/sidebar-items.js create mode 100644 rayon/vec/struct.Drain.html create mode 100644 rayon/vec/struct.IntoIter.html create mode 100644 rayon_core/all.html create mode 100644 rayon_core/broadcast/fn.broadcast.html create mode 100644 rayon_core/broadcast/fn.spawn_broadcast.html create mode 100644 rayon_core/broadcast/struct.BroadcastContext.html create mode 100644 rayon_core/enum.Yield.html create mode 100644 rayon_core/fn.broadcast.html create mode 100644 rayon_core/fn.current_num_threads.html create mode 100644 rayon_core/fn.current_thread_has_pending_tasks.html create mode 100644 rayon_core/fn.current_thread_index.html create mode 100644 rayon_core/fn.in_place_scope.html create mode 100644 rayon_core/fn.in_place_scope_fifo.html create mode 100644 rayon_core/fn.initialize.html create mode 100644 rayon_core/fn.join.html create mode 100644 rayon_core/fn.join_context.html create mode 100644 rayon_core/fn.max_num_threads.html create mode 100644 rayon_core/fn.scope.html create mode 100644 rayon_core/fn.scope_fifo.html create mode 100644 rayon_core/fn.spawn.html create mode 100644 rayon_core/fn.spawn_broadcast.html create mode 100644 rayon_core/fn.spawn_fifo.html create mode 100644 rayon_core/fn.yield_local.html create mode 100644 rayon_core/fn.yield_now.html create mode 100644 rayon_core/index.html create mode 100644 rayon_core/join/fn.join.html create mode 100644 rayon_core/join/fn.join_context.html create mode 100644 rayon_core/registry/struct.ThreadBuilder.html create mode 100644 rayon_core/scope/fn.in_place_scope.html create mode 100644 rayon_core/scope/fn.in_place_scope_fifo.html create mode 100644 rayon_core/scope/fn.scope.html create mode 100644 rayon_core/scope/fn.scope_fifo.html create mode 100644 rayon_core/scope/struct.Scope.html create mode 100644 rayon_core/scope/struct.ScopeFifo.html create mode 100644 rayon_core/sidebar-items.js create mode 100644 rayon_core/spawn/fn.spawn.html create mode 100644 rayon_core/spawn/fn.spawn_fifo.html create mode 100644 rayon_core/struct.BroadcastContext.html create mode 100644 rayon_core/struct.Configuration.html create mode 100644 rayon_core/struct.FnContext.html create mode 100644 rayon_core/struct.Scope.html create mode 100644 rayon_core/struct.ScopeFifo.html create mode 100644 rayon_core/struct.ThreadBuilder.html create mode 100644 rayon_core/struct.ThreadPool.html create mode 100644 rayon_core/struct.ThreadPoolBuildError.html create mode 100644 rayon_core/struct.ThreadPoolBuilder.html create mode 100644 rayon_core/thread_pool/enum.Yield.html create mode 100644 rayon_core/thread_pool/fn.current_thread_has_pending_tasks.html create mode 100644 rayon_core/thread_pool/fn.current_thread_index.html create mode 100644 rayon_core/thread_pool/fn.yield_local.html create mode 100644 rayon_core/thread_pool/fn.yield_now.html create mode 100644 rayon_core/thread_pool/struct.ThreadPool.html create mode 100644 src/crossbeam_deque/deque.rs.html create mode 100644 src/crossbeam_deque/lib.rs.html create mode 100644 src/crossbeam_epoch/atomic.rs.html create mode 100644 src/crossbeam_epoch/collector.rs.html create mode 100644 src/crossbeam_epoch/default.rs.html create mode 100644 src/crossbeam_epoch/deferred.rs.html create mode 100644 src/crossbeam_epoch/epoch.rs.html create mode 100644 src/crossbeam_epoch/guard.rs.html create mode 100644 src/crossbeam_epoch/internal.rs.html create mode 100644 src/crossbeam_epoch/lib.rs.html create mode 100644 src/crossbeam_epoch/sync/list.rs.html create mode 100644 src/crossbeam_epoch/sync/mod.rs.html create mode 100644 src/crossbeam_epoch/sync/once_lock.rs.html create mode 100644 src/crossbeam_epoch/sync/queue.rs.html create mode 100644 src/crossbeam_utils/atomic/atomic_cell.rs.html create mode 100644 src/crossbeam_utils/atomic/consume.rs.html create mode 100644 src/crossbeam_utils/atomic/mod.rs.html create mode 100644 src/crossbeam_utils/atomic/seq_lock.rs.html create mode 100644 src/crossbeam_utils/backoff.rs.html create mode 100644 src/crossbeam_utils/cache_padded.rs.html create mode 100644 src/crossbeam_utils/lib.rs.html create mode 100644 src/crossbeam_utils/sync/mod.rs.html create mode 100644 src/crossbeam_utils/sync/once_lock.rs.html create mode 100644 src/crossbeam_utils/sync/parker.rs.html create mode 100644 src/crossbeam_utils/sync/sharded_lock.rs.html create mode 100644 src/crossbeam_utils/sync/wait_group.rs.html create mode 100644 src/crossbeam_utils/thread.rs.html create mode 100644 src/either/into_either.rs.html create mode 100644 src/either/iterator.rs.html create mode 100644 src/either/lib.rs.html create mode 100644 src/rayon/array.rs.html create mode 100644 src/rayon/collections/binary_heap.rs.html create mode 100644 src/rayon/collections/btree_map.rs.html create mode 100644 src/rayon/collections/btree_set.rs.html create mode 100644 src/rayon/collections/hash_map.rs.html create mode 100644 src/rayon/collections/hash_set.rs.html create mode 100644 src/rayon/collections/linked_list.rs.html create mode 100644 src/rayon/collections/mod.rs.html create mode 100644 src/rayon/collections/vec_deque.rs.html create mode 100644 src/rayon/compile_fail/cannot_collect_filtermap_data.rs.html create mode 100644 src/rayon/compile_fail/cannot_zip_filtered_data.rs.html create mode 100644 src/rayon/compile_fail/cell_par_iter.rs.html create mode 100644 src/rayon/compile_fail/mod.rs.html create mode 100644 src/rayon/compile_fail/must_use.rs.html create mode 100644 src/rayon/compile_fail/no_send_par_iter.rs.html create mode 100644 src/rayon/compile_fail/rc_par_iter.rs.html create mode 100644 src/rayon/delegate.rs.html create mode 100644 src/rayon/iter/blocks.rs.html create mode 100644 src/rayon/iter/chain.rs.html create mode 100644 src/rayon/iter/chunks.rs.html create mode 100644 src/rayon/iter/cloned.rs.html create mode 100644 src/rayon/iter/collect/consumer.rs.html create mode 100644 src/rayon/iter/collect/mod.rs.html create mode 100644 src/rayon/iter/copied.rs.html create mode 100644 src/rayon/iter/empty.rs.html create mode 100644 src/rayon/iter/enumerate.rs.html create mode 100644 src/rayon/iter/extend.rs.html create mode 100644 src/rayon/iter/filter.rs.html create mode 100644 src/rayon/iter/filter_map.rs.html create mode 100644 src/rayon/iter/find.rs.html create mode 100644 src/rayon/iter/find_first_last/mod.rs.html create mode 100644 src/rayon/iter/flat_map.rs.html create mode 100644 src/rayon/iter/flat_map_iter.rs.html create mode 100644 src/rayon/iter/flatten.rs.html create mode 100644 src/rayon/iter/flatten_iter.rs.html create mode 100644 src/rayon/iter/fold.rs.html create mode 100644 src/rayon/iter/fold_chunks.rs.html create mode 100644 src/rayon/iter/fold_chunks_with.rs.html create mode 100644 src/rayon/iter/for_each.rs.html create mode 100644 src/rayon/iter/from_par_iter.rs.html create mode 100644 src/rayon/iter/inspect.rs.html create mode 100644 src/rayon/iter/interleave.rs.html create mode 100644 src/rayon/iter/interleave_shortest.rs.html create mode 100644 src/rayon/iter/intersperse.rs.html create mode 100644 src/rayon/iter/len.rs.html create mode 100644 src/rayon/iter/map.rs.html create mode 100644 src/rayon/iter/map_with.rs.html create mode 100644 src/rayon/iter/mod.rs.html create mode 100644 src/rayon/iter/multizip.rs.html create mode 100644 src/rayon/iter/noop.rs.html create mode 100644 src/rayon/iter/once.rs.html create mode 100644 src/rayon/iter/panic_fuse.rs.html create mode 100644 src/rayon/iter/par_bridge.rs.html create mode 100644 src/rayon/iter/plumbing/mod.rs.html create mode 100644 src/rayon/iter/positions.rs.html create mode 100644 src/rayon/iter/product.rs.html create mode 100644 src/rayon/iter/reduce.rs.html create mode 100644 src/rayon/iter/repeat.rs.html create mode 100644 src/rayon/iter/rev.rs.html create mode 100644 src/rayon/iter/skip.rs.html create mode 100644 src/rayon/iter/skip_any.rs.html create mode 100644 src/rayon/iter/skip_any_while.rs.html create mode 100644 src/rayon/iter/splitter.rs.html create mode 100644 src/rayon/iter/step_by.rs.html create mode 100644 src/rayon/iter/sum.rs.html create mode 100644 src/rayon/iter/take.rs.html create mode 100644 src/rayon/iter/take_any.rs.html create mode 100644 src/rayon/iter/take_any_while.rs.html create mode 100644 src/rayon/iter/try_fold.rs.html create mode 100644 src/rayon/iter/try_reduce.rs.html create mode 100644 src/rayon/iter/try_reduce_with.rs.html create mode 100644 src/rayon/iter/unzip.rs.html create mode 100644 src/rayon/iter/update.rs.html create mode 100644 src/rayon/iter/walk_tree.rs.html create mode 100644 src/rayon/iter/while_some.rs.html create mode 100644 src/rayon/iter/zip.rs.html create mode 100644 src/rayon/iter/zip_eq.rs.html create mode 100644 src/rayon/lib.rs.html create mode 100644 src/rayon/math.rs.html create mode 100644 src/rayon/option.rs.html create mode 100644 src/rayon/par_either.rs.html create mode 100644 src/rayon/prelude.rs.html create mode 100644 src/rayon/private.rs.html create mode 100644 src/rayon/range.rs.html create mode 100644 src/rayon/range_inclusive.rs.html create mode 100644 src/rayon/result.rs.html create mode 100644 src/rayon/slice/chunk_by.rs.html create mode 100644 src/rayon/slice/chunks.rs.html create mode 100644 src/rayon/slice/mergesort.rs.html create mode 100644 src/rayon/slice/mod.rs.html create mode 100644 src/rayon/slice/quicksort.rs.html create mode 100644 src/rayon/slice/rchunks.rs.html create mode 100644 src/rayon/split_producer.rs.html create mode 100644 src/rayon/str.rs.html create mode 100644 src/rayon/string.rs.html create mode 100644 src/rayon/vec.rs.html create mode 100644 src/rayon_core/broadcast/mod.rs.html create mode 100644 src/rayon_core/compile_fail/mod.rs.html create mode 100644 src/rayon_core/compile_fail/quicksort_race1.rs.html create mode 100644 src/rayon_core/compile_fail/quicksort_race2.rs.html create mode 100644 src/rayon_core/compile_fail/quicksort_race3.rs.html create mode 100644 src/rayon_core/compile_fail/rc_return.rs.html create mode 100644 src/rayon_core/compile_fail/rc_upvar.rs.html create mode 100644 src/rayon_core/compile_fail/scope_join_bad.rs.html create mode 100644 src/rayon_core/job.rs.html create mode 100644 src/rayon_core/join/mod.rs.html create mode 100644 src/rayon_core/latch.rs.html create mode 100644 src/rayon_core/lib.rs.html create mode 100644 src/rayon_core/private.rs.html create mode 100644 src/rayon_core/registry.rs.html create mode 100644 src/rayon_core/scope/mod.rs.html create mode 100644 src/rayon_core/sleep/counters.rs.html create mode 100644 src/rayon_core/sleep/mod.rs.html create mode 100644 src/rayon_core/spawn/mod.rs.html create mode 100644 src/rayon_core/thread_pool/mod.rs.html create mode 100644 src/rayon_core/unwind.rs.html create mode 100644 trait.impl/core/future/future/trait.Future.js create mode 100644 trait.impl/crossbeam_epoch/atomic/trait.CompareAndSetOrdering.js create mode 100644 trait.impl/crossbeam_epoch/atomic/trait.Pointable.js create mode 100644 trait.impl/crossbeam_epoch/atomic/trait.Pointer.js create mode 100644 trait.impl/crossbeam_utils/atomic/consume/trait.AtomicConsume.js create mode 100644 trait.impl/either/into_either/trait.IntoEither.js create mode 100644 trait.impl/rayon/iter/par_bridge/trait.ParallelBridge.js create mode 100644 trait.impl/rayon/iter/trait.FromParallelIterator.js create mode 100644 trait.impl/rayon/iter/trait.IndexedParallelIterator.js create mode 100644 trait.impl/rayon/iter/trait.IntoParallelIterator.js create mode 100644 trait.impl/rayon/iter/trait.IntoParallelRefIterator.js create mode 100644 trait.impl/rayon/iter/trait.IntoParallelRefMutIterator.js create mode 100644 trait.impl/rayon/iter/trait.ParallelDrainFull.js create mode 100644 trait.impl/rayon/iter/trait.ParallelDrainRange.js create mode 100644 trait.impl/rayon/iter/trait.ParallelExtend.js create mode 100644 trait.impl/rayon/iter/trait.ParallelIterator.js create mode 100644 trait.impl/rayon/slice/trait.ParallelSlice.js create mode 100644 trait.impl/rayon/slice/trait.ParallelSliceMut.js create mode 100644 trait.impl/rayon/str/trait.ParallelString.js create mode 100644 trait.impl/std/os/unix/thread/trait.JoinHandleExt.js create mode 100644 type.impl/crossbeam_epoch/struct.CompareExchangeError.js diff --git a/cosmic_text/enum.Action.html b/cosmic_text/enum.Action.html index 0f34b86205..68351b2f6a 100644 --- a/cosmic_text/enum.Action.html +++ b/cosmic_text/enum.Action.html @@ -1,4 +1,4 @@ -Action in cosmic_text - Rust +Action in cosmic_text - Rust

Enum cosmic_text::Action

source ·
pub enum Action {
 
Show 13 variants Motion(Motion), Escape, @@ -49,7 +49,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Affinity.html b/cosmic_text/enum.Affinity.html index 08132945a4..980ce3f804 100644 --- a/cosmic_text/enum.Affinity.html +++ b/cosmic_text/enum.Affinity.html @@ -1,4 +1,4 @@ -Affinity in cosmic_text - Rust +Affinity in cosmic_text - Rust
pub enum Affinity {
     Before,
     After,
@@ -18,7 +18,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Align.html b/cosmic_text/enum.Align.html index 00aee867ed..094567c263 100644 --- a/cosmic_text/enum.Align.html +++ b/cosmic_text/enum.Align.html @@ -1,4 +1,4 @@ -Align in cosmic_text - Rust +Align in cosmic_text - Rust

Enum cosmic_text::Align

source ·
pub enum Align {
     Left,
     Right,
@@ -6,7 +6,7 @@
     Justified,
     End,
 }
Expand description

Align or justify

-

Variants§

§

Left

§

Right

§

Center

§

Justified

§

End

Trait Implementations§

source§

impl Clone for Align

source§

fn clone(&self) -> Align

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Align

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Align

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Align

source§

fn eq(&self, other: &Align) -> bool

This method tests for self and other values to be equal, and is used +

Variants§

§

Left

§

Right

§

Center

§

Justified

§

End

Trait Implementations§

source§

impl Clone for Align

source§

fn clone(&self) -> Align

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Align

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Align

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Align

source§

fn eq(&self, other: &Align) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Align

source§

impl Eq for Align

source§

impl StructuralPartialEq for Align

Auto Trait Implementations§

§

impl Freeze for Align

§

impl RefUnwindSafe for Align

§

impl Send for Align

§

impl Sync for Align

§

impl Unpin for Align

§

impl UnwindSafe for Align

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where @@ -16,7 +16,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where diff --git a/cosmic_text/enum.BufferRef.html b/cosmic_text/enum.BufferRef.html index a3a995d6e8..5a64031b08 100644 --- a/cosmic_text/enum.BufferRef.html +++ b/cosmic_text/enum.BufferRef.html @@ -1,4 +1,4 @@ -BufferRef in cosmic_text - Rust +BufferRef in cosmic_text - Rust
pub enum BufferRef<'buffer> {
     Owned(Buffer),
     Borrowed(&'buffer mut Buffer),
@@ -11,6 +11,13 @@
     U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Command.html b/cosmic_text/enum.Command.html index f2a587d742..59883e278a 100644 --- a/cosmic_text/enum.Command.html +++ b/cosmic_text/enum.Command.html @@ -1,4 +1,4 @@ -Command in cosmic_text - Rust +Command in cosmic_text - Rust

Enum cosmic_text::Command

source ·
pub enum Command {
     MoveTo(Vector),
     LineTo(Vector),
@@ -25,7 +25,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Family.html b/cosmic_text/enum.Family.html index c771d65203..9874eb4d05 100644 --- a/cosmic_text/enum.Family.html +++ b/cosmic_text/enum.Family.html @@ -1,4 +1,4 @@ -Family in cosmic_text - Rust +Family in cosmic_text - Rust

Enum cosmic_text::Family

source ·
pub enum Family<'a> {
     Name(&'a str),
     Serif,
@@ -34,7 +34,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.FamilyOwned.html b/cosmic_text/enum.FamilyOwned.html index 1fb0919c00..d24c82c215 100644 --- a/cosmic_text/enum.FamilyOwned.html +++ b/cosmic_text/enum.FamilyOwned.html @@ -1,4 +1,4 @@ -FamilyOwned in cosmic_text - Rust +FamilyOwned in cosmic_text - Rust
pub enum FamilyOwned {
     Name(String),
     Serif,
@@ -19,7 +19,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.LineEnding.html b/cosmic_text/enum.LineEnding.html index 59c3596b14..bfa09f98cf 100644 --- a/cosmic_text/enum.LineEnding.html +++ b/cosmic_text/enum.LineEnding.html @@ -1,4 +1,4 @@ -LineEnding in cosmic_text - Rust +LineEnding in cosmic_text - Rust
pub enum LineEnding {
     Lf,
     CrLf,
@@ -22,7 +22,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Motion.html b/cosmic_text/enum.Motion.html index f8b836d3b0..58e1395eb0 100644 --- a/cosmic_text/enum.Motion.html +++ b/cosmic_text/enum.Motion.html @@ -1,4 +1,4 @@ -Motion in cosmic_text - Rust +Motion in cosmic_text - Rust

Enum cosmic_text::Motion

source ·
pub enum Motion {
 
Show 22 variants LayoutCursor(LayoutCursor), Previous, @@ -55,7 +55,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Selection.html b/cosmic_text/enum.Selection.html index c5b51d1aba..f68edd9358 100644 --- a/cosmic_text/enum.Selection.html +++ b/cosmic_text/enum.Selection.html @@ -1,4 +1,4 @@ -Selection in cosmic_text - Rust +Selection in cosmic_text - Rust
pub enum Selection {
     None,
     Normal(Cursor),
@@ -19,7 +19,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Shaping.html b/cosmic_text/enum.Shaping.html index 1ebd795f01..720028782f 100644 --- a/cosmic_text/enum.Shaping.html +++ b/cosmic_text/enum.Shaping.html @@ -1,4 +1,4 @@ -Shaping in cosmic_text - Rust +Shaping in cosmic_text - Rust

Enum cosmic_text::Shaping

source ·
pub enum Shaping {
     Basic,
     Advanced,
@@ -24,7 +24,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Stretch.html b/cosmic_text/enum.Stretch.html index cf35e76599..73134ebd40 100644 --- a/cosmic_text/enum.Stretch.html +++ b/cosmic_text/enum.Stretch.html @@ -1,4 +1,4 @@ -Stretch in cosmic_text - Rust +Stretch in cosmic_text - Rust

Enum cosmic_text::Stretch

source ·
pub enum Stretch {
     UltraCondensed,
     ExtraCondensed,
@@ -29,7 +29,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Style.html b/cosmic_text/enum.Style.html index 531c5f7f39..80228f7431 100644 --- a/cosmic_text/enum.Style.html +++ b/cosmic_text/enum.Style.html @@ -1,4 +1,4 @@ -Style in cosmic_text - Rust +Style in cosmic_text - Rust

Enum cosmic_text::Style

source ·
pub enum Style {
     Normal,
     Italic,
@@ -20,7 +20,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.SubpixelBin.html b/cosmic_text/enum.SubpixelBin.html index 49d85aca8a..c2a35569da 100644 --- a/cosmic_text/enum.SubpixelBin.html +++ b/cosmic_text/enum.SubpixelBin.html @@ -1,4 +1,4 @@ -SubpixelBin in cosmic_text - Rust +SubpixelBin in cosmic_text - Rust
pub enum SubpixelBin {
     Zero,
     One,
@@ -22,7 +22,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.SwashContent.html b/cosmic_text/enum.SwashContent.html index acdef18ee8..1dcb726e18 100644 --- a/cosmic_text/enum.SwashContent.html +++ b/cosmic_text/enum.SwashContent.html @@ -1,4 +1,4 @@ -SwashContent in cosmic_text - Rust +SwashContent in cosmic_text - Rust
pub enum SwashContent {
     Mask,
     SubpixelMask,
@@ -17,7 +17,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/enum.Wrap.html b/cosmic_text/enum.Wrap.html index b1e2696a35..395459bdd4 100644 --- a/cosmic_text/enum.Wrap.html +++ b/cosmic_text/enum.Wrap.html @@ -1,4 +1,4 @@ -Wrap in cosmic_text - Rust +Wrap in cosmic_text - Rust

Enum cosmic_text::Wrap

source ·
pub enum Wrap {
     None,
     Glyph,
@@ -19,7 +19,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where diff --git a/cosmic_text/struct.Angle.html b/cosmic_text/struct.Angle.html index 09ebf808d9..1f26b7dfac 100644 --- a/cosmic_text/struct.Angle.html +++ b/cosmic_text/struct.Angle.html @@ -1,4 +1,4 @@ -Angle in cosmic_text - Rust +Angle in cosmic_text - Rust

Struct cosmic_text::Angle

source ·
pub struct Angle(/* private fields */);
Expand description

Represents an angle in degrees or radians.

Implementations§

source§

impl Angle

source

pub const ZERO: Angle = _

Angle of zero degrees.

source

pub fn from_degrees(degrees: f32) -> Angle

Creates a new angle from degrees.

@@ -17,7 +17,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Attrs.html b/cosmic_text/struct.Attrs.html index 14799753ed..916ffbbd1b 100644 --- a/cosmic_text/struct.Attrs.html +++ b/cosmic_text/struct.Attrs.html @@ -1,4 +1,4 @@ -Attrs in cosmic_text - Rust +Attrs in cosmic_text - Rust

Struct cosmic_text::Attrs

source ·
pub struct Attrs<'a> {
     pub color_opt: Option<Color>,
     pub family: Family<'a>,
@@ -31,7 +31,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.AttrsList.html b/cosmic_text/struct.AttrsList.html index 017ce03ba5..7c3cb6f24f 100644 --- a/cosmic_text/struct.AttrsList.html +++ b/cosmic_text/struct.AttrsList.html @@ -1,4 +1,4 @@ -AttrsList in cosmic_text - Rust +AttrsList in cosmic_text - Rust

Struct cosmic_text::AttrsList

source ·
pub struct AttrsList { /* private fields */ }
Expand description

List of text attributes to apply to a line

Implementations§

source§

impl AttrsList

source

pub fn new(defaults: Attrs<'_>) -> Self

Create a new attributes list with a set of default Attrs

source

pub fn defaults(&self) -> Attrs<'_>

Get the default Attrs

@@ -18,7 +18,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.AttrsOwned.html b/cosmic_text/struct.AttrsOwned.html index eb5a58d40a..ddf3239478 100644 --- a/cosmic_text/struct.AttrsOwned.html +++ b/cosmic_text/struct.AttrsOwned.html @@ -1,4 +1,4 @@ -AttrsOwned in cosmic_text - Rust +AttrsOwned in cosmic_text - Rust

Struct cosmic_text::AttrsOwned

source ·
pub struct AttrsOwned {
     pub color_opt: Option<Color>,
     pub family_owned: FamilyOwned,
@@ -20,7 +20,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.BidiParagraphs.html b/cosmic_text/struct.BidiParagraphs.html index 9c8ad57453..407673e6f7 100644 --- a/cosmic_text/struct.BidiParagraphs.html +++ b/cosmic_text/struct.BidiParagraphs.html @@ -1,4 +1,4 @@ -BidiParagraphs in cosmic_text - Rust +BidiParagraphs in cosmic_text - Rust
pub struct BidiParagraphs<'text> { /* private fields */ }
Expand description

An iterator over the paragraphs in the input text. It is equivalent to core::str::Lines but follows unicode-bidi behaviour.

Implementations§

source§

impl<'text> BidiParagraphs<'text>

source

pub fn new(text: &'text str) -> Self

Create an iterator to split the input text into paragraphs @@ -188,7 +188,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for I
where - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.BorrowedWithFontSystem.html b/cosmic_text/struct.BorrowedWithFontSystem.html index e0e5f80185..0142690245 100644 --- a/cosmic_text/struct.BorrowedWithFontSystem.html +++ b/cosmic_text/struct.BorrowedWithFontSystem.html @@ -1,5 +1,5 @@ -BorrowedWithFontSystem in cosmic_text - Rust -
pub struct BorrowedWithFontSystem<'a, T> { /* private fields */ }
Expand description

A value borrowed together with an FontSystem

+BorrowedWithFontSystem in cosmic_text - Rust +
pub struct BorrowedWithFontSystem<'a, T> { /* private fields */ }
Expand description

A value borrowed together with an FontSystem

Implementations§

source§

impl<'a> BorrowedWithFontSystem<'a, Buffer>

source

pub fn shape_until_cursor(&mut self, cursor: Cursor, prune: bool)

Shape lines until cursor, also scrolling to include cursor in view

source

pub fn shape_until_scroll(&mut self, prune: bool)

Shape lines until scroll

source

pub fn line_shape(&mut self, line_i: usize) -> Option<&ShapeLine>

Shape the provided line index and return the result

@@ -59,7 +59,7 @@
§Panics
) -> T

Get the internal Buffer, mutably

source

pub fn shape_as_needed(&mut self, prune: bool)

Shape lines until scroll, after adjusting scroll if the cursor moved

source

pub fn action(&mut self, action: Action)

Perform an Action on the editor

-

Trait Implementations§

source§

impl<'a, T: Debug> Debug for BorrowedWithFontSystem<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T> Deref for BorrowedWithFontSystem<'a, T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'a, T> DerefMut for BorrowedWithFontSystem<'a, T>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'a, T> Freeze for BorrowedWithFontSystem<'a, T>

§

impl<'a, T> !RefUnwindSafe for BorrowedWithFontSystem<'a, T>

§

impl<'a, T> Send for BorrowedWithFontSystem<'a, T>
where +

Trait Implementations§

source§

impl<'a, T: Debug> Debug for BorrowedWithFontSystem<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T> Deref for BorrowedWithFontSystem<'a, T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'a, T> DerefMut for BorrowedWithFontSystem<'a, T>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'a, T> Freeze for BorrowedWithFontSystem<'a, T>

§

impl<'a, T> !RefUnwindSafe for BorrowedWithFontSystem<'a, T>

§

impl<'a, T> Send for BorrowedWithFontSystem<'a, T>
where T: Send,

§

impl<'a, T> Sync for BorrowedWithFontSystem<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for BorrowedWithFontSystem<'a, T>

§

impl<'a, T> !UnwindSafe for BorrowedWithFontSystem<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where @@ -69,6 +69,13 @@
§Panics
U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Buffer.html b/cosmic_text/struct.Buffer.html index 93866b8f6d..aa00dce9e5 100644 --- a/cosmic_text/struct.Buffer.html +++ b/cosmic_text/struct.Buffer.html @@ -1,4 +1,4 @@ -Buffer in cosmic_text - Rust +Buffer in cosmic_text - Rust

Struct cosmic_text::Buffer

source ·
pub struct Buffer {
     pub lines: Vec<BufferLine>,
     /* private fields */
@@ -125,7 +125,14 @@ 
§Panics
U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.BufferLine.html b/cosmic_text/struct.BufferLine.html index df007b43d7..57e46bae5c 100644 --- a/cosmic_text/struct.BufferLine.html +++ b/cosmic_text/struct.BufferLine.html @@ -1,4 +1,4 @@ -BufferLine in cosmic_text - Rust +BufferLine in cosmic_text - Rust

Struct cosmic_text::BufferLine

source ·
pub struct BufferLine { /* private fields */ }
Expand description

A line (or paragraph) of text that is shaped and laid out

Implementations§

source§

impl BufferLine

source

pub fn new<T: Into<String>>( text: T, @@ -73,7 +73,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.CacheKey.html b/cosmic_text/struct.CacheKey.html index 7a8ed09998..178680cb48 100644 --- a/cosmic_text/struct.CacheKey.html +++ b/cosmic_text/struct.CacheKey.html @@ -1,4 +1,4 @@ -CacheKey in cosmic_text - Rust +CacheKey in cosmic_text - Rust

Struct cosmic_text::CacheKey

source ·
pub struct CacheKey {
     pub font_id: ID,
     pub glyph_id: u16,
@@ -36,7 +36,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.CacheKeyFlags.html b/cosmic_text/struct.CacheKeyFlags.html index e9a464bf5f..7152c27c5f 100644 --- a/cosmic_text/struct.CacheKeyFlags.html +++ b/cosmic_text/struct.CacheKeyFlags.html @@ -1,4 +1,4 @@ -CacheKeyFlags in cosmic_text - Rust +CacheKeyFlags in cosmic_text - Rust
pub struct CacheKeyFlags(/* private fields */);
Expand description

Flags that change rendering

Implementations§

source§

impl CacheKeyFlags

source

pub const FAKE_ITALIC: Self = _

Skew by 14 degrees to synthesize italic

source§

impl CacheKeyFlags

source

pub const fn empty() -> Self

Get a flags value with all bits unset.

@@ -35,13 +35,13 @@
source

pub const fn iter_names(&self) -> IterNames<CacheKeyFlags>

Yield a set of contained named flags values.

This method is like iter, except only yields bits in contained named flags. Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

-

Trait Implementations§

source§

impl Binary for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for CacheKeyFlags

source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

-
§

type Output = CacheKeyFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign for CacheKeyFlags

source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

+

Trait Implementations§

source§

impl Binary for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl BitAnd for CacheKeyFlags

source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

+
§

type Output = CacheKeyFlags

The resulting type after applying the & operator.
source§

impl BitAndAssign for CacheKeyFlags

source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

source§

impl BitOr for CacheKeyFlags

source§

fn bitor(self, other: CacheKeyFlags) -> Self

The bitwise or (|) of the bits in two flags values.

§

type Output = CacheKeyFlags

The resulting type after applying the | operator.
source§

impl BitOrAssign for CacheKeyFlags

source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

source§

impl BitXor for CacheKeyFlags

source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

-
§

type Output = CacheKeyFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for CacheKeyFlags

source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

-
source§

impl Clone for CacheKeyFlags

source§

fn clone(&self) -> CacheKeyFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<CacheKeyFlags> for CacheKeyFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

+
§

type Output = CacheKeyFlags

The resulting type after applying the ^ operator.
source§

impl BitXorAssign for CacheKeyFlags

source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

+
source§

impl Clone for CacheKeyFlags

source§

fn clone(&self) -> CacheKeyFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extend<CacheKeyFlags> for CacheKeyFlags

source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl Flags for CacheKeyFlags

source§

const FLAGS: &'static [Flag<CacheKeyFlags>] = _

The set of defined flags.
§

type Bits = u32

The underlying bits type.
source§

fn bits(&self) -> u32

Get the underlying bits value. Read more
source§

fn from_bits_retain(bits: u32) -> CacheKeyFlags

Convert from a bits value exactly.
source§

fn empty() -> Self

Get a flags value with all bits unset.
source§

fn all() -> Self

Get a flags value with all known bits set.
source§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
source§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
source§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
source§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
source§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
source§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
source§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
source§

fn intersects(&self, other: Self) -> bool
where Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
source§

fn contains(&self, other: Self) -> bool
where Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
source§

fn insert(&mut self, other: Self)
where @@ -51,8 +51,8 @@ Self: Sized,

Call Flags::insert when value is true or Flags::remove when value is false.
source§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
source§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
source§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
source§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
source§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
source§

impl FromIterator<CacheKeyFlags> for CacheKeyFlags

source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

source§

impl Hash for CacheKeyFlags

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoIterator for CacheKeyFlags

§

type Item = CacheKeyFlags

The type of the elements being iterated over.
§

type IntoIter = Iter<CacheKeyFlags>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl LowerHex for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for CacheKeyFlags

source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

-
§

type Output = CacheKeyFlags

The resulting type after applying the ! operator.
source§

impl Octal for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for CacheKeyFlags

source§

fn cmp(&self, other: &CacheKeyFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoIterator for CacheKeyFlags

§

type Item = CacheKeyFlags

The type of the elements being iterated over.
§

type IntoIter = Iter<CacheKeyFlags>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl LowerHex for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Not for CacheKeyFlags

source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

+
§

type Output = CacheKeyFlags

The resulting type after applying the ! operator.
source§

impl Octal for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Ord for CacheKeyFlags

source§

fn cmp(&self, other: &CacheKeyFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for CacheKeyFlags

source§

fn eq(&self, other: &CacheKeyFlags) -> bool

This method tests for self and other values to be equal, and is used @@ -62,10 +62,10 @@ operator. Read more
source§

impl PublicFlags for CacheKeyFlags

§

type Primitive = u32

The type of the underlying storage.
§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
source§

impl Sub for CacheKeyFlags

source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

-
§

type Output = CacheKeyFlags

The resulting type after applying the - operator.
source§

impl SubAssign for CacheKeyFlags

source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

+
§

type Output = CacheKeyFlags

The resulting type after applying the - operator.
source§

impl SubAssign for CacheKeyFlags

source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

-
source§

impl UpperHex for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for CacheKeyFlags

source§

impl Eq for CacheKeyFlags

source§

impl StructuralPartialEq for CacheKeyFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

source§

impl UpperHex for CacheKeyFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl Copy for CacheKeyFlags

source§

impl Eq for CacheKeyFlags

source§

impl StructuralPartialEq for CacheKeyFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

@@ -73,7 +73,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Change.html b/cosmic_text/struct.Change.html index 27a17369fa..d29e7a6752 100644 --- a/cosmic_text/struct.Change.html +++ b/cosmic_text/struct.Change.html @@ -1,4 +1,4 @@ -Change in cosmic_text - Rust +Change in cosmic_text - Rust

Struct cosmic_text::Change

source ·
pub struct Change {
     pub items: Vec<ChangeItem>,
 }
Expand description

A set of change items grouped into one logical change

@@ -11,7 +11,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ChangeItem.html b/cosmic_text/struct.ChangeItem.html index 1b54cda4dc..69f48707df 100644 --- a/cosmic_text/struct.ChangeItem.html +++ b/cosmic_text/struct.ChangeItem.html @@ -1,4 +1,4 @@ -ChangeItem in cosmic_text - Rust +ChangeItem in cosmic_text - Rust

Struct cosmic_text::ChangeItem

source ·
pub struct ChangeItem {
     pub start: Cursor,
     pub end: Cursor,
@@ -17,7 +17,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Color.html b/cosmic_text/struct.Color.html index d0b0f860e1..b65009e17f 100644 --- a/cosmic_text/struct.Color.html +++ b/cosmic_text/struct.Color.html @@ -1,4 +1,4 @@ -Color in cosmic_text - Rust +Color in cosmic_text - Rust

Struct cosmic_text::Color

source ·
pub struct Color(pub u32);
Expand description

Text color

Tuple Fields§

§0: u32

Implementations§

source§

impl Color

source

pub const fn rgb(r: u8, g: u8, b: u8) -> Self

Create new color with red, green, and blue components

source

pub const fn rgba(r: u8, g: u8, b: u8, a: u8) -> Self

Create new color with red, green, blue, and alpha components

@@ -25,7 +25,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Cursor.html b/cosmic_text/struct.Cursor.html index 8bc475f96f..f15194b1ba 100644 --- a/cosmic_text/struct.Cursor.html +++ b/cosmic_text/struct.Cursor.html @@ -1,4 +1,4 @@ -Cursor in cosmic_text - Rust +Cursor in cosmic_text - Rust

Struct cosmic_text::Cursor

source ·
pub struct Cursor {
     pub line: usize,
     pub index: usize,
@@ -29,7 +29,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Editor.html b/cosmic_text/struct.Editor.html index e79b130bbe..69f8c68b94 100644 --- a/cosmic_text/struct.Editor.html +++ b/cosmic_text/struct.Editor.html @@ -1,4 +1,4 @@ -Editor in cosmic_text - Rust +Editor in cosmic_text - Rust

Struct cosmic_text::Editor

source ·
pub struct Editor<'buffer> { /* private fields */ }
Expand description

A wrapper of [Buffer] for easy editing

Implementations§

source§

impl<'buffer> Editor<'buffer>

source

pub fn new(buffer: impl Into<BufferRef<'buffer>>) -> Self

Create a new Editor with the provided [Buffer]

source

pub fn draw<F>( @@ -29,6 +29,13 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Font.html b/cosmic_text/struct.Font.html index 67e20d9cd1..e1416a3012 100644 --- a/cosmic_text/struct.Font.html +++ b/cosmic_text/struct.Font.html @@ -1,4 +1,4 @@ -Font in cosmic_text - Rust +Font in cosmic_text - Rust

Struct cosmic_text::Font

source ·
pub struct Font { /* private fields */ }
Expand description

A font

Implementations§

source§

impl Font

source

pub fn id(&self) -> ID

source

pub fn monospace_em_width(&self) -> Option<f32>

source

pub fn scripts(&self) -> &[[u8; 4]]

source

pub fn unicode_codepoints(&self) -> &[u32]

source

pub fn data(&self) -> &[u8]

source

pub fn rustybuzz(&self) -> &RustybuzzFace<'_>

source

pub fn as_swash(&self) -> FontRef<'_>

source§

impl Font

source

pub fn new(db: &Database, id: ID) -> Option<Self>

Trait Implementations§

source§

impl Debug for Font

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Font

§

impl !RefUnwindSafe for Font

§

impl Send for Font

§

impl Sync for Font

§

impl Unpin for Font

§

impl !UnwindSafe for Font

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where @@ -8,6 +8,13 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.FontMatchAttrs.html b/cosmic_text/struct.FontMatchAttrs.html index 7ff767bc52..ef3c4d5778 100644 --- a/cosmic_text/struct.FontMatchAttrs.html +++ b/cosmic_text/struct.FontMatchAttrs.html @@ -1,4 +1,4 @@ -FontMatchAttrs in cosmic_text - Rust +FontMatchAttrs in cosmic_text - Rust
pub struct FontMatchAttrs { /* private fields */ }
Expand description

Font-specific part of Attrs to be used for matching

Trait Implementations§

source§

impl Clone for FontMatchAttrs

source§

fn clone(&self) -> FontMatchAttrs

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FontMatchAttrs

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<Attrs<'a>> for FontMatchAttrs

source§

fn from(attrs: Attrs<'a>) -> Self

Converts to this type from the input type.
source§

impl Hash for FontMatchAttrs

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, @@ -12,7 +12,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.FontMatchKey.html b/cosmic_text/struct.FontMatchKey.html index 23b790e163..6ae41045ae 100644 --- a/cosmic_text/struct.FontMatchKey.html +++ b/cosmic_text/struct.FontMatchKey.html @@ -1,4 +1,4 @@ -FontMatchKey in cosmic_text - Rust +FontMatchKey in cosmic_text - Rust
pub struct FontMatchKey { /* private fields */ }

Trait Implementations§

source§

impl Clone for FontMatchKey

source§

fn clone(&self) -> FontMatchKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FontMatchKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for FontMatchKey

source§

fn cmp(&self, other: &FontMatchKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where @@ -14,7 +14,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.FontSystem.html b/cosmic_text/struct.FontSystem.html index 29d6695bf3..c8dbfc0c83 100644 --- a/cosmic_text/struct.FontSystem.html +++ b/cosmic_text/struct.FontSystem.html @@ -1,6 +1,6 @@ -FontSystem in cosmic_text - Rust +FontSystem in cosmic_text - Rust

Struct cosmic_text::FontSystem

source ·
pub struct FontSystem { /* private fields */ }
Expand description

Access to the system fonts.

-

Implementations§

source§

impl FontSystem

source

pub fn new() -> Self

Create a new FontSystem, that allows access to any installed system fonts

+

Implementations§

source§

impl FontSystem

source

pub fn new() -> Self

Create a new FontSystem, that allows access to any installed system fonts

§Timing

This function takes some time to run. On the release build, it can take up to a second, while debug builds can take up to ten times longer. For this reason, it should only be @@ -11,15 +11,16 @@

§Timing
source

pub fn db(&self) -> &Database

Get the database.

source

pub fn db_mut(&mut self) -> &mut Database

Get a mutable reference to the database.

source

pub fn into_locale_and_db(self) -> (String, Database)

Consume this FontSystem and return the locale and database.

-
source

pub fn get_font(&mut self, id: ID) -> Option<Arc<Font>>

Get a font by its ID.

-
source

pub fn is_monospace(&self, id: ID) -> bool

source

pub fn get_monospace_ids_for_scripts( +

source

pub fn cache_fonts(&mut self, ids: Vec<ID>)

Concurrently cache fonts by id list

+
source

pub fn get_font(&mut self, id: ID) -> Option<Arc<Font>>

Get a font by its ID.

+
source

pub fn is_monospace(&self, id: ID) -> bool

source

pub fn get_monospace_ids_for_scripts( &self, scripts: impl Iterator<Item = [u8; 4]> -) -> Vec<ID>

source

pub fn get_font_supported_codepoints_in_word( +) -> Vec<ID>

source

pub fn get_font_supported_codepoints_in_word( &mut self, id: ID, word: &str -) -> Option<usize>

source

pub fn get_font_matches(&mut self, attrs: Attrs<'_>) -> Arc<Vec<FontMatchKey>>

Trait Implementations§

source§

impl Debug for FontSystem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Option<usize>

source

pub fn get_font_matches(&mut self, attrs: Attrs<'_>) -> Arc<Vec<FontMatchKey>>

Trait Implementations§

source§

impl Debug for FontSystem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

@@ -27,6 +28,13 @@
§Timing
U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.LayoutCursor.html b/cosmic_text/struct.LayoutCursor.html index 4579e18dd6..09d51efcd6 100644 --- a/cosmic_text/struct.LayoutCursor.html +++ b/cosmic_text/struct.LayoutCursor.html @@ -1,4 +1,4 @@ -LayoutCursor in cosmic_text - Rust +LayoutCursor in cosmic_text - Rust
pub struct LayoutCursor {
     pub line: usize,
     pub layout: usize,
@@ -23,7 +23,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.LayoutGlyph.html b/cosmic_text/struct.LayoutGlyph.html index def97c98ad..5575a3b103 100644 --- a/cosmic_text/struct.LayoutGlyph.html +++ b/cosmic_text/struct.LayoutGlyph.html @@ -1,4 +1,4 @@ -LayoutGlyph in cosmic_text - Rust +LayoutGlyph in cosmic_text - Rust
pub struct LayoutGlyph {
Show 14 fields pub start: usize, pub end: usize, @@ -47,7 +47,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.LayoutLine.html b/cosmic_text/struct.LayoutLine.html index 010400f380..03f700f200 100644 --- a/cosmic_text/struct.LayoutLine.html +++ b/cosmic_text/struct.LayoutLine.html @@ -1,4 +1,4 @@ -LayoutLine in cosmic_text - Rust +LayoutLine in cosmic_text - Rust

Struct cosmic_text::LayoutLine

source ·
pub struct LayoutLine {
     pub w: f32,
     pub max_ascent: f32,
@@ -17,7 +17,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.LayoutRun.html b/cosmic_text/struct.LayoutRun.html index df672bd4a5..2712138daa 100644 --- a/cosmic_text/struct.LayoutRun.html +++ b/cosmic_text/struct.LayoutRun.html @@ -1,4 +1,4 @@ -LayoutRun in cosmic_text - Rust +LayoutRun in cosmic_text - Rust

Struct cosmic_text::LayoutRun

source ·
pub struct LayoutRun<'a> {
     pub line_i: usize,
     pub text: &'a str,
@@ -31,6 +31,13 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.LayoutRunIter.html b/cosmic_text/struct.LayoutRunIter.html index b492ddacc9..d6783e7d5a 100644 --- a/cosmic_text/struct.LayoutRunIter.html +++ b/cosmic_text/struct.LayoutRunIter.html @@ -1,4 +1,4 @@ -LayoutRunIter in cosmic_text - Rust +LayoutRunIter in cosmic_text - Rust
pub struct LayoutRunIter<'b> { /* private fields */ }
Expand description

An iterator of visible text lines, see LayoutRun

Implementations§

source§

impl<'b> LayoutRunIter<'b>

source

pub fn new(buffer: &'b Buffer) -> Self

Trait Implementations§

source§

impl<'b> Debug for LayoutRunIter<'b>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'b> ExactSizeIterator for LayoutRunIter<'b>

1.0.0 · source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<'b> Iterator for LayoutRunIter<'b>

§

type Item = LayoutRun<'b>

The type of the elements being iterated over.
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( &mut self @@ -185,7 +185,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for I
where - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.LineIter.html b/cosmic_text/struct.LineIter.html index 5a64f72245..000ede8941 100644 --- a/cosmic_text/struct.LineIter.html +++ b/cosmic_text/struct.LineIter.html @@ -1,4 +1,4 @@ -LineIter in cosmic_text - Rust +LineIter in cosmic_text - Rust

Struct cosmic_text::LineIter

source ·
pub struct LineIter<'a> { /* private fields */ }
Expand description

Iterator over lines terminated by LineEnding

Implementations§

source§

impl<'a> LineIter<'a>

source

pub fn new(string: &'a str) -> Self

Create an iterator of lines in a string slice

Trait Implementations§

source§

impl<'a> Debug for LineIter<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Iterator for LineIter<'a>

§

type Item = (Range<usize>, LineEnding)

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( @@ -186,7 +186,14 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for I
where - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Metrics.html b/cosmic_text/struct.Metrics.html index a7310f861b..6cdf5f3593 100644 --- a/cosmic_text/struct.Metrics.html +++ b/cosmic_text/struct.Metrics.html @@ -1,4 +1,4 @@ -Metrics in cosmic_text - Rust +Metrics in cosmic_text - Rust

Struct cosmic_text::Metrics

source ·
pub struct Metrics {
     pub font_size: f32,
     pub line_height: f32,
@@ -15,7 +15,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where diff --git a/cosmic_text/struct.PhysicalGlyph.html b/cosmic_text/struct.PhysicalGlyph.html index 820a65fbda..8a894929ec 100644 --- a/cosmic_text/struct.PhysicalGlyph.html +++ b/cosmic_text/struct.PhysicalGlyph.html @@ -1,4 +1,4 @@ -PhysicalGlyph in cosmic_text - Rust +PhysicalGlyph in cosmic_text - Rust
pub struct PhysicalGlyph {
     pub cache_key: CacheKey,
     pub x: i32,
@@ -14,7 +14,14 @@
     U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Placement.html b/cosmic_text/struct.Placement.html index 215038118e..3ced42eabe 100644 --- a/cosmic_text/struct.Placement.html +++ b/cosmic_text/struct.Placement.html @@ -1,4 +1,4 @@ -Placement in cosmic_text - Rust +Placement in cosmic_text - Rust

Struct cosmic_text::Placement

source ·
pub struct Placement {
     pub left: i32,
     pub top: i32,
@@ -25,7 +25,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Scroll.html b/cosmic_text/struct.Scroll.html index c9b36f0391..37256d0ea8 100644 --- a/cosmic_text/struct.Scroll.html +++ b/cosmic_text/struct.Scroll.html @@ -1,4 +1,4 @@ -Scroll in cosmic_text - Rust +Scroll in cosmic_text - Rust

Struct cosmic_text::Scroll

source ·
pub struct Scroll {
     pub line: usize,
     pub layout: i32,
@@ -22,7 +22,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ShapeBuffer.html b/cosmic_text/struct.ShapeBuffer.html index 785f532dec..94b13f4a45 100644 --- a/cosmic_text/struct.ShapeBuffer.html +++ b/cosmic_text/struct.ShapeBuffer.html @@ -1,4 +1,4 @@ -ShapeBuffer in cosmic_text - Rust +ShapeBuffer in cosmic_text - Rust
pub struct ShapeBuffer { /* private fields */ }
Expand description

A set of buffers containing allocations for shaped text.

Trait Implementations§

source§

impl Debug for ShapeBuffer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ShapeBuffer

source§

fn default() -> ShapeBuffer

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where @@ -8,6 +8,13 @@ U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ShapeGlyph.html b/cosmic_text/struct.ShapeGlyph.html index d460a1b852..68799bbe8a 100644 --- a/cosmic_text/struct.ShapeGlyph.html +++ b/cosmic_text/struct.ShapeGlyph.html @@ -1,4 +1,4 @@ -ShapeGlyph in cosmic_text - Rust +ShapeGlyph in cosmic_text - Rust

Struct cosmic_text::ShapeGlyph

source ·
pub struct ShapeGlyph {
Show 14 fields pub start: usize, pub end: usize, @@ -23,7 +23,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ShapeLine.html b/cosmic_text/struct.ShapeLine.html index 4a991d199f..bd51666a04 100644 --- a/cosmic_text/struct.ShapeLine.html +++ b/cosmic_text/struct.ShapeLine.html @@ -1,4 +1,4 @@ -ShapeLine in cosmic_text - Rust +ShapeLine in cosmic_text - Rust

Struct cosmic_text::ShapeLine

source ·
pub struct ShapeLine {
     pub rtl: bool,
     pub spans: Vec<ShapeSpan>,
@@ -44,7 +44,14 @@ 
§Panics
U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ShapeRunCache.html b/cosmic_text/struct.ShapeRunCache.html index e6b1dbc06a..4db63eef6e 100644 --- a/cosmic_text/struct.ShapeRunCache.html +++ b/cosmic_text/struct.ShapeRunCache.html @@ -1,4 +1,4 @@ -ShapeRunCache in cosmic_text - Rust +ShapeRunCache in cosmic_text - Rust
pub struct ShapeRunCache { /* private fields */ }
Expand description

A helper structure for caching shape runs.

Implementations§

source§

impl ShapeRunCache

source

pub fn get(&mut self, key: &ShapeRunKey) -> Option<&Vec<ShapeGlyph>>

Get cache item, updating age if found

source

pub fn insert(&mut self, key: ShapeRunKey, glyphs: Vec<ShapeGlyph>)

Insert cache item with current age

@@ -11,7 +11,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ShapeRunKey.html b/cosmic_text/struct.ShapeRunKey.html index 521816e307..d150256920 100644 --- a/cosmic_text/struct.ShapeRunKey.html +++ b/cosmic_text/struct.ShapeRunKey.html @@ -1,4 +1,4 @@ -ShapeRunKey in cosmic_text - Rust +ShapeRunKey in cosmic_text - Rust
pub struct ShapeRunKey {
     pub text: String,
     pub default_attrs: AttrsOwned,
@@ -16,7 +16,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ShapeSpan.html b/cosmic_text/struct.ShapeSpan.html index 17613f821f..4ee953a0ef 100644 --- a/cosmic_text/struct.ShapeSpan.html +++ b/cosmic_text/struct.ShapeSpan.html @@ -1,4 +1,4 @@ -ShapeSpan in cosmic_text - Rust +ShapeSpan in cosmic_text - Rust

Struct cosmic_text::ShapeSpan

source ·
pub struct ShapeSpan {
     pub level: Level,
     pub words: Vec<ShapeWord>,
@@ -29,7 +29,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.ShapeWord.html b/cosmic_text/struct.ShapeWord.html index fe475dfe6a..c63ad638aa 100644 --- a/cosmic_text/struct.ShapeWord.html +++ b/cosmic_text/struct.ShapeWord.html @@ -1,4 +1,4 @@ -ShapeWord in cosmic_text - Rust +ShapeWord in cosmic_text - Rust

Struct cosmic_text::ShapeWord

source ·
pub struct ShapeWord {
     pub blank: bool,
     pub glyphs: Vec<ShapeGlyph>,
@@ -31,7 +31,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.SwashCache.html b/cosmic_text/struct.SwashCache.html index 9b488e893a..3192fab196 100644 --- a/cosmic_text/struct.SwashCache.html +++ b/cosmic_text/struct.SwashCache.html @@ -1,4 +1,4 @@ -SwashCache in cosmic_text - Rust +SwashCache in cosmic_text - Rust

Struct cosmic_text::SwashCache

source ·
pub struct SwashCache {
     pub image_cache: HashMap<CacheKey, Option<SwashImage>, BuildHasherDefault<FxHasher>>,
     pub outline_command_cache: HashMap<CacheKey, Option<Vec<Command>>, BuildHasherDefault<FxHasher>>,
@@ -34,6 +34,13 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.SwashImage.html b/cosmic_text/struct.SwashImage.html index 72500dbe99..cfb4e70b26 100644 --- a/cosmic_text/struct.SwashImage.html +++ b/cosmic_text/struct.SwashImage.html @@ -1,4 +1,4 @@ -SwashImage in cosmic_text - Rust +SwashImage in cosmic_text - Rust

Struct cosmic_text::SwashImage

source ·
pub struct SwashImage {
     pub source: Source,
     pub content: Content,
@@ -19,7 +19,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Transform.html b/cosmic_text/struct.Transform.html index c13e32c17e..23f8d57db7 100644 --- a/cosmic_text/struct.Transform.html +++ b/cosmic_text/struct.Transform.html @@ -1,4 +1,4 @@ -Transform in cosmic_text - Rust +Transform in cosmic_text - Rust

Struct cosmic_text::Transform

source ·
pub struct Transform {
     pub xx: f32,
     pub xy: f32,
@@ -40,7 +40,14 @@
     U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/cosmic_text/struct.Weight.html b/cosmic_text/struct.Weight.html index fb12d287a5..298fe7498d 100644 --- a/cosmic_text/struct.Weight.html +++ b/cosmic_text/struct.Weight.html @@ -1,4 +1,4 @@ -Weight in cosmic_text - Rust +Weight in cosmic_text - Rust

Struct cosmic_text::Weight

source ·
pub struct Weight(pub u16);
Expand description

Specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.

Tuple Fields§

§0: u16

Implementations§

source§

impl Weight

source

pub const THIN: Weight = _

Thin weight (100), the thinnest value.

source

pub const EXTRA_LIGHT: Weight = _

Extra light weight (200).

@@ -27,7 +27,14 @@ U: From<T>,
source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

-
source§

impl<T> ToOwned for T
where +

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crates.js b/crates.js index 74bfc6847a..8701141f14 100644 --- a/crates.js +++ b/crates.js @@ -1 +1 @@ -window.ALL_CRATES = ["bitflags","bytemuck","bytemuck_derive","cosmic_text","font_types","fontconfig_parser","fontdb","libc","libm","log","memmap2","proc_macro2","quote","rangemap","read_fonts","roxmltree","rustc_hash","rustybuzz","self_cell","slotmap","smallvec","swash","syn","sys_locale","tinyvec","tinyvec_macros","ttf_parser","unicode_bidi","unicode_bidi_mirroring","unicode_ccc","unicode_ident","unicode_linebreak","unicode_properties","unicode_script","unicode_segmentation","yazi","zeno"]; \ No newline at end of file +window.ALL_CRATES = ["bitflags","bytemuck","bytemuck_derive","cosmic_text","crossbeam_deque","crossbeam_epoch","crossbeam_utils","either","font_types","fontconfig_parser","fontdb","libc","libm","log","memmap2","proc_macro2","quote","rangemap","rayon","rayon_core","read_fonts","roxmltree","rustc_hash","rustybuzz","self_cell","slotmap","smallvec","swash","syn","sys_locale","tinyvec","tinyvec_macros","ttf_parser","unicode_bidi","unicode_bidi_mirroring","unicode_ccc","unicode_ident","unicode_linebreak","unicode_properties","unicode_script","unicode_segmentation","yazi","zeno"]; \ No newline at end of file diff --git a/crossbeam_deque/all.html b/crossbeam_deque/all.html new file mode 100644 index 0000000000..58164397d6 --- /dev/null +++ b/crossbeam_deque/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

\ No newline at end of file diff --git a/crossbeam_deque/deque/enum.Steal.html b/crossbeam_deque/deque/enum.Steal.html new file mode 100644 index 0000000000..d4574506e4 --- /dev/null +++ b/crossbeam_deque/deque/enum.Steal.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_deque/enum.Steal.html...

+ + + \ No newline at end of file diff --git a/crossbeam_deque/deque/struct.Injector.html b/crossbeam_deque/deque/struct.Injector.html new file mode 100644 index 0000000000..0ac93ba497 --- /dev/null +++ b/crossbeam_deque/deque/struct.Injector.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_deque/struct.Injector.html...

+ + + \ No newline at end of file diff --git a/crossbeam_deque/deque/struct.Stealer.html b/crossbeam_deque/deque/struct.Stealer.html new file mode 100644 index 0000000000..163c2648a8 --- /dev/null +++ b/crossbeam_deque/deque/struct.Stealer.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_deque/struct.Stealer.html...

+ + + \ No newline at end of file diff --git a/crossbeam_deque/deque/struct.Worker.html b/crossbeam_deque/deque/struct.Worker.html new file mode 100644 index 0000000000..a1368fba77 --- /dev/null +++ b/crossbeam_deque/deque/struct.Worker.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_deque/struct.Worker.html...

+ + + \ No newline at end of file diff --git a/crossbeam_deque/enum.Steal.html b/crossbeam_deque/enum.Steal.html new file mode 100644 index 0000000000..cb3d250482 --- /dev/null +++ b/crossbeam_deque/enum.Steal.html @@ -0,0 +1,96 @@ +Steal in crossbeam_deque - Rust +
pub enum Steal<T> {
+    Empty,
+    Success(T),
+    Retry,
+}
Expand description

Possible outcomes of a steal operation.

+

§Examples

+

There are lots of ways to chain results of steal operations together:

+ +
use crossbeam_deque::Steal::{self, Empty, Retry, Success};
+
+let collect = |v: Vec<Steal<i32>>| v.into_iter().collect::<Steal<i32>>();
+
+assert_eq!(collect(vec![Empty, Empty, Empty]), Empty);
+assert_eq!(collect(vec![Empty, Retry, Empty]), Retry);
+assert_eq!(collect(vec![Retry, Success(1), Empty]), Success(1));
+
+assert_eq!(collect(vec![Empty, Empty]).or_else(|| Retry), Retry);
+assert_eq!(collect(vec![Retry, Empty]).or_else(|| Success(1)), Success(1));
+

Variants§

§

Empty

The queue was empty at the time of stealing.

+
§

Success(T)

At least one task was successfully stolen.

+
§

Retry

The steal operation needs to be retried.

+

Implementations§

source§

impl<T> Steal<T>

source

pub fn is_empty(&self) -> bool

Returns true if the queue was empty at the time of stealing.

+
§Examples
+
use crossbeam_deque::Steal::{Empty, Retry, Success};
+
+assert!(!Success(7).is_empty());
+assert!(!Retry::<i32>.is_empty());
+
+assert!(Empty::<i32>.is_empty());
+
source

pub fn is_success(&self) -> bool

Returns true if at least one task was stolen.

+
§Examples
+
use crossbeam_deque::Steal::{Empty, Retry, Success};
+
+assert!(!Empty::<i32>.is_success());
+assert!(!Retry::<i32>.is_success());
+
+assert!(Success(7).is_success());
+
source

pub fn is_retry(&self) -> bool

Returns true if the steal operation needs to be retried.

+
§Examples
+
use crossbeam_deque::Steal::{Empty, Retry, Success};
+
+assert!(!Empty::<i32>.is_retry());
+assert!(!Success(7).is_retry());
+
+assert!(Retry::<i32>.is_retry());
+
source

pub fn success(self) -> Option<T>

Returns the result of the operation, if successful.

+
§Examples
+
use crossbeam_deque::Steal::{Empty, Retry, Success};
+
+assert_eq!(Empty::<i32>.success(), None);
+assert_eq!(Retry::<i32>.success(), None);
+
+assert_eq!(Success(7).success(), Some(7));
+
source

pub fn or_else<F>(self, f: F) -> Steal<T>
where + F: FnOnce() -> Steal<T>,

If no task was stolen, attempts another steal operation.

+

Returns this steal result if it is Success. Otherwise, closure f is invoked and then:

+
    +
  • If the second steal resulted in Success, it is returned.
  • +
  • If both steals were unsuccessful but any resulted in Retry, then Retry is returned.
  • +
  • If both resulted in None, then None is returned.
  • +
+
§Examples
+
use crossbeam_deque::Steal::{Empty, Retry, Success};
+
+assert_eq!(Success(1).or_else(|| Success(2)), Success(1));
+assert_eq!(Retry.or_else(|| Success(2)), Success(2));
+
+assert_eq!(Retry.or_else(|| Empty), Retry::<i32>);
+assert_eq!(Empty.or_else(|| Retry), Retry::<i32>);
+
+assert_eq!(Empty.or_else(|| Empty), Empty::<i32>);
+

Trait Implementations§

source§

impl<T: Clone> Clone for Steal<T>

source§

fn clone(&self) -> Steal<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Steal<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> FromIterator<Steal<T>> for Steal<T>

source§

fn from_iter<I>(iter: I) -> Steal<T>
where + I: IntoIterator<Item = Steal<T>>,

Consumes items until a Success is found and returns it.

+

If no Success was found, but there was at least one Retry, then returns Retry. +Otherwise, Empty is returned.

+
source§

impl<T: PartialEq> PartialEq for Steal<T>

source§

fn eq(&self, other: &Steal<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T: Copy> Copy for Steal<T>

source§

impl<T: Eq> Eq for Steal<T>

source§

impl<T> StructuralPartialEq for Steal<T>

Auto Trait Implementations§

§

impl<T> Freeze for Steal<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for Steal<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Steal<T>
where + T: Send,

§

impl<T> Sync for Steal<T>
where + T: Sync,

§

impl<T> Unpin for Steal<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Steal<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_deque/index.html b/crossbeam_deque/index.html new file mode 100644 index 0000000000..6a9d5cb83b --- /dev/null +++ b/crossbeam_deque/index.html @@ -0,0 +1,67 @@ +crossbeam_deque - Rust +

Crate crossbeam_deque

source ·
Expand description

Concurrent work-stealing deques.

+

These data structures are most commonly used in work-stealing schedulers. The typical setup +involves a number of threads, each having its own FIFO or LIFO queue (worker). There is also +one global FIFO queue (injector) and a list of references to worker queues that are able to +steal tasks (stealers).

+

We spawn a new task onto the scheduler by pushing it into the injector queue. Each worker +thread waits in a loop until it finds the next task to run and then runs it. To find a task, it +first looks into its local worker queue, and then into the injector and stealers.

+

§Queues

+

Injector is a FIFO queue, where tasks are pushed and stolen from opposite ends. It is +shared among threads and is usually the entry point for new tasks.

+

Worker has two constructors:

+
    +
  • new_fifo() - Creates a FIFO queue, in which tasks are pushed and popped from opposite +ends.
  • +
  • new_lifo() - Creates a LIFO queue, in which tasks are pushed and popped from the same +end.
  • +
+

Each Worker is owned by a single thread and supports only push and pop operations.

+

Method stealer() creates a Stealer that may be shared among threads and can only steal +tasks from its Worker. Tasks are stolen from the end opposite to where they get pushed.

+

§Stealing

+

Steal operations come in three flavors:

+
    +
  1. steal() - Steals one task.
  2. +
  3. steal_batch() - Steals a batch of tasks and moves them into another worker.
  4. +
  5. steal_batch_and_pop() - Steals a batch of tasks, moves them into another queue, and pops +one task from that worker.
  6. +
+

In contrast to push and pop operations, stealing can spuriously fail with Steal::Retry, in +which case the steal operation needs to be retried.

+

§Examples

+

Suppose a thread in a work-stealing scheduler is idle and looking for the next task to run. To +find an available task, it might do the following:

+
    +
  1. Try popping one task from the local worker queue.
  2. +
  3. Try stealing a batch of tasks from the global injector queue.
  4. +
  5. Try stealing one task from another thread using the stealer list.
  6. +
+

An implementation of this work-stealing strategy:

+ +
use crossbeam_deque::{Injector, Stealer, Worker};
+use std::iter;
+
+fn find_task<T>(
+    local: &Worker<T>,
+    global: &Injector<T>,
+    stealers: &[Stealer<T>],
+) -> Option<T> {
+    // Pop a task from the local queue, if not empty.
+    local.pop().or_else(|| {
+        // Otherwise, we need to look for a task elsewhere.
+        iter::repeat_with(|| {
+            // Try stealing a batch of tasks from the global queue.
+            global.steal_batch_and_pop(local)
+                // Or try stealing a task from one of the other threads.
+                .or_else(|| stealers.iter().map(|s| s.steal()).collect())
+        })
+        // Loop while no task was stolen and any steal operation needs to be retried.
+        .find(|s| !s.is_retry())
+        // Extract the stolen task, if there is one.
+        .and_then(|s| s.success())
+    })
+}
+

Structs§

Enums§

  • Possible outcomes of a steal operation.
\ No newline at end of file diff --git a/crossbeam_deque/sidebar-items.js b/crossbeam_deque/sidebar-items.js new file mode 100644 index 0000000000..5cd8b0bd62 --- /dev/null +++ b/crossbeam_deque/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Steal"],"struct":["Injector","Stealer","Worker"]}; \ No newline at end of file diff --git a/crossbeam_deque/struct.Injector.html b/crossbeam_deque/struct.Injector.html new file mode 100644 index 0000000000..8c9f06f76e --- /dev/null +++ b/crossbeam_deque/struct.Injector.html @@ -0,0 +1,163 @@ +Injector in crossbeam_deque - Rust +
pub struct Injector<T> { /* private fields */ }
Expand description

An injector queue.

+

This is a FIFO queue that can be shared among multiple threads. Task schedulers typically have +a single injector queue, which is the entry point for new tasks.

+

§Examples

+
use crossbeam_deque::{Injector, Steal};
+
+let q = Injector::new();
+q.push(1);
+q.push(2);
+
+assert_eq!(q.steal(), Steal::Success(1));
+assert_eq!(q.steal(), Steal::Success(2));
+assert_eq!(q.steal(), Steal::Empty);
+

Implementations§

source§

impl<T> Injector<T>

source

pub fn new() -> Injector<T>

Creates a new injector queue.

+
§Examples
+
use crossbeam_deque::Injector;
+
+let q = Injector::<i32>::new();
+
source

pub fn push(&self, task: T)

Pushes a task into the queue.

+
§Examples
+
use crossbeam_deque::Injector;
+
+let w = Injector::new();
+w.push(1);
+w.push(2);
+
source

pub fn steal(&self) -> Steal<T>

Steals a task from the queue.

+
§Examples
+
use crossbeam_deque::{Injector, Steal};
+
+let q = Injector::new();
+q.push(1);
+q.push(2);
+
+assert_eq!(q.steal(), Steal::Success(1));
+assert_eq!(q.steal(), Steal::Success(2));
+assert_eq!(q.steal(), Steal::Empty);
+
source

pub fn steal_batch(&self, dest: &Worker<T>) -> Steal<()>

Steals a batch of tasks and pushes them into a worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than some constant limit.

+
§Examples
+
use crossbeam_deque::{Injector, Worker};
+
+let q = Injector::new();
+q.push(1);
+q.push(2);
+q.push(3);
+q.push(4);
+
+let w = Worker::new_fifo();
+let _ = q.steal_batch(&w);
+assert_eq!(w.pop(), Some(1));
+assert_eq!(w.pop(), Some(2));
+
source

pub fn steal_batch_with_limit( + &self, + dest: &Worker<T>, + limit: usize +) -> Steal<()>

Steals no more than of tasks and pushes them into a worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than some constant limit.

+
§Examples
+
use crossbeam_deque::{Injector, Worker};
+
+let q = Injector::new();
+q.push(1);
+q.push(2);
+q.push(3);
+q.push(4);
+q.push(5);
+q.push(6);
+
+let w = Worker::new_fifo();
+let _ = q.steal_batch_with_limit(&w, 2);
+assert_eq!(w.pop(), Some(1));
+assert_eq!(w.pop(), Some(2));
+assert_eq!(w.pop(), None);
+
+q.push(7);
+q.push(8);
+// Setting a large limit does not guarantee that all elements will be popped. In this case,
+// half of the elements are currently popped, but the number of popped elements is considered
+// an implementation detail that may be changed in the future.
+let _ = q.steal_batch_with_limit(&w, std::usize::MAX);
+assert_eq!(w.len(), 3);
+
source

pub fn steal_batch_and_pop(&self, dest: &Worker<T>) -> Steal<T>

Steals a batch of tasks, pushes them into a worker, and pops a task from that worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than some constant limit.

+
§Examples
+
use crossbeam_deque::{Injector, Steal, Worker};
+
+let q = Injector::new();
+q.push(1);
+q.push(2);
+q.push(3);
+q.push(4);
+
+let w = Worker::new_fifo();
+assert_eq!(q.steal_batch_and_pop(&w), Steal::Success(1));
+assert_eq!(w.pop(), Some(2));
+
source

pub fn steal_batch_with_limit_and_pop( + &self, + dest: &Worker<T>, + limit: usize +) -> Steal<T>

Steals no more than limit of tasks, pushes them into a worker, and pops a task from that worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than the given limit.

+
§Examples
+
use crossbeam_deque::{Injector, Steal, Worker};
+
+let q = Injector::new();
+q.push(1);
+q.push(2);
+q.push(3);
+q.push(4);
+q.push(5);
+q.push(6);
+
+let w = Worker::new_fifo();
+assert_eq!(q.steal_batch_with_limit_and_pop(&w, 2), Steal::Success(1));
+assert_eq!(w.pop(), Some(2));
+assert_eq!(w.pop(), None);
+
+q.push(7);
+// Setting a large limit does not guarantee that all elements will be popped. In this case,
+// half of the elements are currently popped, but the number of popped elements is considered
+// an implementation detail that may be changed in the future.
+assert_eq!(q.steal_batch_with_limit_and_pop(&w, std::usize::MAX), Steal::Success(3));
+assert_eq!(w.pop(), Some(4));
+assert_eq!(w.pop(), Some(5));
+assert_eq!(w.pop(), None);
+
source

pub fn is_empty(&self) -> bool

Returns true if the queue is empty.

+
§Examples
+
use crossbeam_deque::Injector;
+
+let q = Injector::new();
+
+assert!(q.is_empty());
+q.push(1);
+assert!(!q.is_empty());
+
source

pub fn len(&self) -> usize

Returns the number of tasks in the queue.

+
§Examples
+
use crossbeam_deque::Injector;
+
+let q = Injector::new();
+
+assert_eq!(q.len(), 0);
+q.push(1);
+assert_eq!(q.len(), 1);
+q.push(1);
+assert_eq!(q.len(), 2);
+

Trait Implementations§

source§

impl<T> Debug for Injector<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for Injector<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T> Drop for Injector<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T: Send> Send for Injector<T>

source§

impl<T: Send> Sync for Injector<T>

Auto Trait Implementations§

§

impl<T> !Freeze for Injector<T>

§

impl<T> RefUnwindSafe for Injector<T>
where + T: RefUnwindSafe,

§

impl<T> Unpin for Injector<T>
where + T: Unpin,

§

impl<T> !UnwindSafe for Injector<T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_deque/struct.Stealer.html b/crossbeam_deque/struct.Stealer.html new file mode 100644 index 0000000000..8a7c2e3247 --- /dev/null +++ b/crossbeam_deque/struct.Stealer.html @@ -0,0 +1,165 @@ +Stealer in crossbeam_deque - Rust +
pub struct Stealer<T> { /* private fields */ }
Expand description

A stealer handle of a worker queue.

+

Stealers can be shared among threads.

+

Task schedulers typically have a single worker queue per worker thread.

+

§Examples

+
use crossbeam_deque::{Steal, Worker};
+
+let w = Worker::new_lifo();
+w.push(1);
+w.push(2);
+
+let s = w.stealer();
+assert_eq!(s.steal(), Steal::Success(1));
+assert_eq!(s.steal(), Steal::Success(2));
+assert_eq!(s.steal(), Steal::Empty);
+

Implementations§

source§

impl<T> Stealer<T>

source

pub fn is_empty(&self) -> bool

Returns true if the queue is empty.

+ +
use crossbeam_deque::Worker;
+
+let w = Worker::new_lifo();
+let s = w.stealer();
+
+assert!(s.is_empty());
+w.push(1);
+assert!(!s.is_empty());
+
source

pub fn len(&self) -> usize

Returns the number of tasks in the deque.

+ +
use crossbeam_deque::Worker;
+
+let w = Worker::new_lifo();
+let s = w.stealer();
+
+assert_eq!(s.len(), 0);
+w.push(1);
+assert_eq!(s.len(), 1);
+w.push(2);
+assert_eq!(s.len(), 2);
+
source

pub fn steal(&self) -> Steal<T>

Steals a task from the queue.

+
§Examples
+
use crossbeam_deque::{Steal, Worker};
+
+let w = Worker::new_lifo();
+w.push(1);
+w.push(2);
+
+let s = w.stealer();
+assert_eq!(s.steal(), Steal::Success(1));
+assert_eq!(s.steal(), Steal::Success(2));
+
source

pub fn steal_batch(&self, dest: &Worker<T>) -> Steal<()>

Steals a batch of tasks and pushes them into another worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than some constant limit.

+
§Examples
+
use crossbeam_deque::Worker;
+
+let w1 = Worker::new_fifo();
+w1.push(1);
+w1.push(2);
+w1.push(3);
+w1.push(4);
+
+let s = w1.stealer();
+let w2 = Worker::new_fifo();
+
+let _ = s.steal_batch(&w2);
+assert_eq!(w2.pop(), Some(1));
+assert_eq!(w2.pop(), Some(2));
+
source

pub fn steal_batch_with_limit( + &self, + dest: &Worker<T>, + limit: usize +) -> Steal<()>

Steals no more than limit of tasks and pushes them into another worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than the given limit.

+
§Examples
+
use crossbeam_deque::Worker;
+
+let w1 = Worker::new_fifo();
+w1.push(1);
+w1.push(2);
+w1.push(3);
+w1.push(4);
+w1.push(5);
+w1.push(6);
+
+let s = w1.stealer();
+let w2 = Worker::new_fifo();
+
+let _ = s.steal_batch_with_limit(&w2, 2);
+assert_eq!(w2.pop(), Some(1));
+assert_eq!(w2.pop(), Some(2));
+assert_eq!(w2.pop(), None);
+
+w1.push(7);
+w1.push(8);
+// Setting a large limit does not guarantee that all elements will be popped. In this case,
+// half of the elements are currently popped, but the number of popped elements is considered
+// an implementation detail that may be changed in the future.
+let _ = s.steal_batch_with_limit(&w2, std::usize::MAX);
+assert_eq!(w2.len(), 3);
+
source

pub fn steal_batch_and_pop(&self, dest: &Worker<T>) -> Steal<T>

Steals a batch of tasks, pushes them into another worker, and pops a task from that worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than some constant limit.

+
§Examples
+
use crossbeam_deque::{Steal, Worker};
+
+let w1 = Worker::new_fifo();
+w1.push(1);
+w1.push(2);
+w1.push(3);
+w1.push(4);
+
+let s = w1.stealer();
+let w2 = Worker::new_fifo();
+
+assert_eq!(s.steal_batch_and_pop(&w2), Steal::Success(1));
+assert_eq!(w2.pop(), Some(2));
+
source

pub fn steal_batch_with_limit_and_pop( + &self, + dest: &Worker<T>, + limit: usize +) -> Steal<T>

Steals no more than limit of tasks, pushes them into another worker, and pops a task from +that worker.

+

How many tasks exactly will be stolen is not specified. That said, this method will try to +steal around half of the tasks in the queue, but also not more than the given limit.

+
§Examples
+
use crossbeam_deque::{Steal, Worker};
+
+let w1 = Worker::new_fifo();
+w1.push(1);
+w1.push(2);
+w1.push(3);
+w1.push(4);
+w1.push(5);
+w1.push(6);
+
+let s = w1.stealer();
+let w2 = Worker::new_fifo();
+
+assert_eq!(s.steal_batch_with_limit_and_pop(&w2, 2), Steal::Success(1));
+assert_eq!(w2.pop(), Some(2));
+assert_eq!(w2.pop(), None);
+
+w1.push(7);
+w1.push(8);
+// Setting a large limit does not guarantee that all elements will be popped. In this case,
+// half of the elements are currently popped, but the number of popped elements is considered
+// an implementation detail that may be changed in the future.
+assert_eq!(s.steal_batch_with_limit_and_pop(&w2, std::usize::MAX), Steal::Success(3));
+assert_eq!(w2.pop(), Some(4));
+assert_eq!(w2.pop(), Some(5));
+assert_eq!(w2.pop(), None);
+

Trait Implementations§

source§

impl<T> Clone for Stealer<T>

source§

fn clone(&self) -> Stealer<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Stealer<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> Send for Stealer<T>

source§

impl<T: Send> Sync for Stealer<T>

Auto Trait Implementations§

§

impl<T> Freeze for Stealer<T>

§

impl<T> RefUnwindSafe for Stealer<T>
where + T: RefUnwindSafe,

§

impl<T> Unpin for Stealer<T>

§

impl<T> UnwindSafe for Stealer<T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_deque/struct.Worker.html b/crossbeam_deque/struct.Worker.html new file mode 100644 index 0000000000..8c04a1ba20 --- /dev/null +++ b/crossbeam_deque/struct.Worker.html @@ -0,0 +1,102 @@ +Worker in crossbeam_deque - Rust +

Struct crossbeam_deque::Worker

source ·
pub struct Worker<T> { /* private fields */ }
Expand description

A worker queue.

+

This is a FIFO or LIFO queue that is owned by a single thread, but other threads may steal +tasks from it. Task schedulers typically create a single worker queue per thread.

+

§Examples

+

A FIFO worker:

+ +
use crossbeam_deque::{Steal, Worker};
+
+let w = Worker::new_fifo();
+let s = w.stealer();
+
+w.push(1);
+w.push(2);
+w.push(3);
+
+assert_eq!(s.steal(), Steal::Success(1));
+assert_eq!(w.pop(), Some(2));
+assert_eq!(w.pop(), Some(3));
+

A LIFO worker:

+ +
use crossbeam_deque::{Steal, Worker};
+
+let w = Worker::new_lifo();
+let s = w.stealer();
+
+w.push(1);
+w.push(2);
+w.push(3);
+
+assert_eq!(s.steal(), Steal::Success(1));
+assert_eq!(w.pop(), Some(3));
+assert_eq!(w.pop(), Some(2));
+

Implementations§

source§

impl<T> Worker<T>

source

pub fn new_fifo() -> Worker<T>

Creates a FIFO worker queue.

+

Tasks are pushed and popped from opposite ends.

+
§Examples
+
use crossbeam_deque::Worker;
+
+let w = Worker::<i32>::new_fifo();
+
source

pub fn new_lifo() -> Worker<T>

Creates a LIFO worker queue.

+

Tasks are pushed and popped from the same end.

+
§Examples
+
use crossbeam_deque::Worker;
+
+let w = Worker::<i32>::new_lifo();
+
source

pub fn stealer(&self) -> Stealer<T>

Creates a stealer for this queue.

+

The returned stealer can be shared among threads and cloned.

+
§Examples
+
use crossbeam_deque::Worker;
+
+let w = Worker::<i32>::new_lifo();
+let s = w.stealer();
+
source

pub fn is_empty(&self) -> bool

Returns true if the queue is empty.

+ +
use crossbeam_deque::Worker;
+
+let w = Worker::new_lifo();
+
+assert!(w.is_empty());
+w.push(1);
+assert!(!w.is_empty());
+
source

pub fn len(&self) -> usize

Returns the number of tasks in the deque.

+ +
use crossbeam_deque::Worker;
+
+let w = Worker::new_lifo();
+
+assert_eq!(w.len(), 0);
+w.push(1);
+assert_eq!(w.len(), 1);
+w.push(1);
+assert_eq!(w.len(), 2);
+
source

pub fn push(&self, task: T)

Pushes a task into the queue.

+
§Examples
+
use crossbeam_deque::Worker;
+
+let w = Worker::new_lifo();
+w.push(1);
+w.push(2);
+
source

pub fn pop(&self) -> Option<T>

Pops a task from the queue.

+
§Examples
+
use crossbeam_deque::Worker;
+
+let w = Worker::new_fifo();
+w.push(1);
+w.push(2);
+
+assert_eq!(w.pop(), Some(1));
+assert_eq!(w.pop(), Some(2));
+assert_eq!(w.pop(), None);
+

Trait Implementations§

source§

impl<T> Debug for Worker<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> Send for Worker<T>

Auto Trait Implementations§

§

impl<T> !Freeze for Worker<T>

§

impl<T> !RefUnwindSafe for Worker<T>

§

impl<T> !Sync for Worker<T>

§

impl<T> Unpin for Worker<T>

§

impl<T> UnwindSafe for Worker<T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/all.html b/crossbeam_epoch/all.html new file mode 100644 index 0000000000..5acee7e002 --- /dev/null +++ b/crossbeam_epoch/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +
\ No newline at end of file diff --git a/crossbeam_epoch/atomic/struct.Atomic.html b/crossbeam_epoch/atomic/struct.Atomic.html new file mode 100644 index 0000000000..8099f1d3ab --- /dev/null +++ b/crossbeam_epoch/atomic/struct.Atomic.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/struct.Atomic.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/atomic/struct.CompareExchangeError.html b/crossbeam_epoch/atomic/struct.CompareExchangeError.html new file mode 100644 index 0000000000..af7f4fbdb8 --- /dev/null +++ b/crossbeam_epoch/atomic/struct.CompareExchangeError.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/struct.CompareExchangeError.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/atomic/struct.Owned.html b/crossbeam_epoch/atomic/struct.Owned.html new file mode 100644 index 0000000000..71f0f81c2a --- /dev/null +++ b/crossbeam_epoch/atomic/struct.Owned.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/struct.Owned.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/atomic/struct.Shared.html b/crossbeam_epoch/atomic/struct.Shared.html new file mode 100644 index 0000000000..bd57c0aa63 --- /dev/null +++ b/crossbeam_epoch/atomic/struct.Shared.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/struct.Shared.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/atomic/trait.CompareAndSetOrdering.html b/crossbeam_epoch/atomic/trait.CompareAndSetOrdering.html new file mode 100644 index 0000000000..beb058493e --- /dev/null +++ b/crossbeam_epoch/atomic/trait.CompareAndSetOrdering.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/trait.CompareAndSetOrdering.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/atomic/trait.Pointable.html b/crossbeam_epoch/atomic/trait.Pointable.html new file mode 100644 index 0000000000..9c4c4a0be5 --- /dev/null +++ b/crossbeam_epoch/atomic/trait.Pointable.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/trait.Pointable.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/atomic/trait.Pointer.html b/crossbeam_epoch/atomic/trait.Pointer.html new file mode 100644 index 0000000000..669a0c0cdf --- /dev/null +++ b/crossbeam_epoch/atomic/trait.Pointer.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/trait.Pointer.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/atomic/type.CompareAndSetError.html b/crossbeam_epoch/atomic/type.CompareAndSetError.html new file mode 100644 index 0000000000..ea87849c01 --- /dev/null +++ b/crossbeam_epoch/atomic/type.CompareAndSetError.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/type.CompareAndSetError.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/collector/struct.Collector.html b/crossbeam_epoch/collector/struct.Collector.html new file mode 100644 index 0000000000..27cb258c19 --- /dev/null +++ b/crossbeam_epoch/collector/struct.Collector.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/struct.Collector.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/collector/struct.LocalHandle.html b/crossbeam_epoch/collector/struct.LocalHandle.html new file mode 100644 index 0000000000..b8ba5a5e02 --- /dev/null +++ b/crossbeam_epoch/collector/struct.LocalHandle.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/struct.LocalHandle.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/default/fn.default_collector.html b/crossbeam_epoch/default/fn.default_collector.html new file mode 100644 index 0000000000..c7a11f1fea --- /dev/null +++ b/crossbeam_epoch/default/fn.default_collector.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/fn.default_collector.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/default/fn.is_pinned.html b/crossbeam_epoch/default/fn.is_pinned.html new file mode 100644 index 0000000000..f011cec605 --- /dev/null +++ b/crossbeam_epoch/default/fn.is_pinned.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/fn.is_pinned.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/default/fn.pin.html b/crossbeam_epoch/default/fn.pin.html new file mode 100644 index 0000000000..aa9441e2b8 --- /dev/null +++ b/crossbeam_epoch/default/fn.pin.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/fn.pin.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/fn.default_collector.html b/crossbeam_epoch/fn.default_collector.html new file mode 100644 index 0000000000..61c85cff25 --- /dev/null +++ b/crossbeam_epoch/fn.default_collector.html @@ -0,0 +1,3 @@ +default_collector in crossbeam_epoch - Rust +
pub fn default_collector() -> &'static Collector
Expand description

Returns the default global collector.

+
\ No newline at end of file diff --git a/crossbeam_epoch/fn.is_pinned.html b/crossbeam_epoch/fn.is_pinned.html new file mode 100644 index 0000000000..e827515286 --- /dev/null +++ b/crossbeam_epoch/fn.is_pinned.html @@ -0,0 +1,3 @@ +is_pinned in crossbeam_epoch - Rust +

Function crossbeam_epoch::is_pinned

source ·
pub fn is_pinned() -> bool
Expand description

Returns true if the current thread is pinned.

+
\ No newline at end of file diff --git a/crossbeam_epoch/fn.pin.html b/crossbeam_epoch/fn.pin.html new file mode 100644 index 0000000000..8926fd00d4 --- /dev/null +++ b/crossbeam_epoch/fn.pin.html @@ -0,0 +1,3 @@ +pin in crossbeam_epoch - Rust +

Function crossbeam_epoch::pin

source ·
pub fn pin() -> Guard
Expand description

Pins the current thread.

+
\ No newline at end of file diff --git a/crossbeam_epoch/fn.unprotected.html b/crossbeam_epoch/fn.unprotected.html new file mode 100644 index 0000000000..987e9d7204 --- /dev/null +++ b/crossbeam_epoch/fn.unprotected.html @@ -0,0 +1,70 @@ +unprotected in crossbeam_epoch - Rust +
pub unsafe fn unprotected() -> &'static Guard
Expand description

Returns a reference to a dummy guard that allows unprotected access to Atomics.

+

This guard should be used in special occasions only. Note that it doesn’t actually keep any +thread pinned - it’s just a fake guard that allows loading from Atomics unsafely.

+

Note that calling defer with a dummy guard will not defer the function - it will just +execute the function immediately.

+

If necessary, it’s possible to create more dummy guards by cloning: unprotected().clone().

+

§Safety

+

Loading and dereferencing data from an Atomic using this guard is safe only if the +Atomic is not being concurrently modified by other threads.

+

§Examples

+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::Relaxed;
+
+let a = Atomic::new(7);
+
+unsafe {
+    // Load `a` without pinning the current thread.
+    a.load(Relaxed, epoch::unprotected());
+
+    // It's possible to create more dummy guards.
+    let dummy = epoch::unprotected();
+
+    dummy.defer(move || {
+        println!("This gets executed immediately.");
+    });
+
+    // Dropping `dummy` doesn't affect the current thread - it's just a noop.
+}
+

The most common use of this function is when constructing or destructing a data structure.

+

For example, we can use a dummy guard in the destructor of a Treiber stack because at that +point no other thread could concurrently modify the Atomics we are accessing.

+

If we were to actually pin the current thread during destruction, that would just unnecessarily +delay garbage collection and incur some performance cost, so in cases like these unprotected +is very helpful.

+ +
use crossbeam_epoch::{self as epoch, Atomic};
+use std::mem::ManuallyDrop;
+use std::sync::atomic::Ordering::Relaxed;
+
+struct Stack<T> {
+    head: Atomic<Node<T>>,
+}
+
+struct Node<T> {
+    data: ManuallyDrop<T>,
+    next: Atomic<Node<T>>,
+}
+
+impl<T> Drop for Stack<T> {
+    fn drop(&mut self) {
+        unsafe {
+            // Unprotected load.
+            let mut node = self.head.load(Relaxed, epoch::unprotected());
+
+            while let Some(n) = node.as_ref() {
+                // Unprotected load.
+                let next = n.next.load(Relaxed, epoch::unprotected());
+
+                // Take ownership of the node, then drop its data and deallocate it.
+                let mut o = node.into_owned();
+                ManuallyDrop::drop(&mut o.data);
+                drop(o);
+
+                node = next;
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/crossbeam_epoch/guard/fn.unprotected.html b/crossbeam_epoch/guard/fn.unprotected.html new file mode 100644 index 0000000000..eab56256a7 --- /dev/null +++ b/crossbeam_epoch/guard/fn.unprotected.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/fn.unprotected.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/guard/struct.Guard.html b/crossbeam_epoch/guard/struct.Guard.html new file mode 100644 index 0000000000..3dd276b33b --- /dev/null +++ b/crossbeam_epoch/guard/struct.Guard.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_epoch/struct.Guard.html...

+ + + \ No newline at end of file diff --git a/crossbeam_epoch/index.html b/crossbeam_epoch/index.html new file mode 100644 index 0000000000..d6a28fbe51 --- /dev/null +++ b/crossbeam_epoch/index.html @@ -0,0 +1,39 @@ +crossbeam_epoch - Rust +

Crate crossbeam_epoch

source ·
Expand description

Epoch-based memory reclamation.

+

An interesting problem concurrent collections deal with comes from the remove operation. +Suppose that a thread removes an element from a lock-free map, while another thread is reading +that same element at the same time. The first thread must wait until the second thread stops +reading the element. Only then it is safe to destruct it.

+

Programming languages that come with garbage collectors solve this problem trivially. The +garbage collector will destruct the removed element when no thread can hold a reference to it +anymore.

+

This crate implements a basic memory reclamation mechanism, which is based on epochs. When an +element gets removed from a concurrent collection, it is inserted into a pile of garbage and +marked with the current epoch. Every time a thread accesses a collection, it checks the current +epoch, attempts to increment it, and destructs some garbage that became so old that no thread +can be referencing it anymore.

+

That is the general mechanism behind epoch-based memory reclamation, but the details are a bit +more complicated. Anyhow, memory reclamation is designed to be fully automatic and something +users of concurrent collections don’t have to worry much about.

+

§Pointers

+

Concurrent collections are built using atomic pointers. This module provides Atomic, which +is just a shared atomic pointer to a heap-allocated object. Loading an Atomic yields a +Shared, which is an epoch-protected pointer through which the loaded object can be safely +read.

+

§Pinning

+

Before an Atomic can be loaded, a participant must be pinned. By pinning a participant +we declare that any object that gets removed from now on must not be destructed just +yet. Garbage collection of newly removed objects is suspended until the participant gets +unpinned.

+

§Garbage

+

Objects that get removed from concurrent collections must be stashed away until all currently +pinned participants get unpinned. Such objects can be stored into a thread-local or global +storage, where they are kept until the right time for their destruction comes.

+

There is a global shared instance of garbage queue. You can defer the execution of an +arbitrary function until the global epoch is advanced enough. Most notably, concurrent data +structures may defer the deallocation of an object.

+

§APIs

+

For majority of use cases, just use the default garbage collector by invoking pin. If you +want to create your own garbage collector, use the Collector API.

+

Structs§

  • An atomic pointer that can be safely shared between threads.
  • An epoch-based garbage collector.
  • The error returned on failed compare-and-swap operation.
  • A guard that keeps the current thread pinned.
  • A handle to a garbage collector.
  • An owned heap-allocated object.
  • A pointer to an object protected by the epoch GC.

Traits§

Functions§

Type Aliases§

\ No newline at end of file diff --git a/crossbeam_epoch/sidebar-items.js b/crossbeam_epoch/sidebar-items.js new file mode 100644 index 0000000000..c7670e896e --- /dev/null +++ b/crossbeam_epoch/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["default_collector","is_pinned","pin","unprotected"],"struct":["Atomic","Collector","CompareExchangeError","Guard","LocalHandle","Owned","Shared"],"trait":["CompareAndSetOrdering","Pointable","Pointer"],"type":["CompareAndSetError"]}; \ No newline at end of file diff --git a/crossbeam_epoch/struct.Atomic.html b/crossbeam_epoch/struct.Atomic.html new file mode 100644 index 0000000000..59357f3439 --- /dev/null +++ b/crossbeam_epoch/struct.Atomic.html @@ -0,0 +1,417 @@ +Atomic in crossbeam_epoch - Rust +

Struct crossbeam_epoch::Atomic

source ·
pub struct Atomic<T: ?Sized + Pointable> { /* private fields */ }
Expand description

An atomic pointer that can be safely shared between threads.

+

The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused +least significant bits of the address. For example, the tag for a pointer to a sized type T +should be less than (1 << mem::align_of::<T>().trailing_zeros()).

+

Any method that loads the pointer must be passed a reference to a Guard.

+

Crossbeam supports dynamically sized types. See Pointable for details.

+

Implementations§

source§

impl<T> Atomic<T>

source

pub fn new(init: T) -> Atomic<T>

Allocates value on the heap and returns a new atomic pointer pointing to it.

+
§Examples
+
use crossbeam_epoch::Atomic;
+
+let a = Atomic::new(1234);
+
source§

impl<T: ?Sized + Pointable> Atomic<T>

source

pub fn init(init: T::Init) -> Atomic<T>

Allocates value on the heap and returns a new atomic pointer pointing to it.

+
§Examples
+
use crossbeam_epoch::Atomic;
+
+let a = Atomic::<i32>::init(1234);
+
source

pub const fn null() -> Atomic<T>

Returns a new null atomic pointer.

+
§Examples
+
use crossbeam_epoch::Atomic;
+
+let a = Atomic::<i32>::null();
+
source

pub fn load<'g>(&self, ord: Ordering, _: &'g Guard) -> Shared<'g, T>

Loads a Shared from the atomic pointer.

+

This method takes an Ordering argument which describes the memory ordering of this +operation.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+let p = a.load(SeqCst, guard);
+
source

pub fn load_consume<'g>(&self, _: &'g Guard) -> Shared<'g, T>

Loads a Shared from the atomic pointer using a “consume” memory ordering.

+

This is similar to the “acquire” ordering, except that an ordering is +only guaranteed with operations that “depend on” the result of the load. +However consume loads are usually much faster than acquire loads on +architectures with a weak memory model since they don’t require memory +fence instructions.

+

The exact definition of “depend on” is a bit vague, but it works as you +would expect in practice since a lot of software, especially the Linux +kernel, rely on this behavior.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+let p = a.load_consume(guard);
+
source

pub fn store<P: Pointer<T>>(&self, new: P, ord: Ordering)

Stores a Shared or Owned pointer into the atomic pointer.

+

This method takes an Ordering argument which describes the memory ordering of this +operation.

+
§Examples
+
use crossbeam_epoch::{Atomic, Owned, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+a.store(Shared::null(), SeqCst);
+a.store(Owned::new(1234), SeqCst);
+
source

pub fn swap<'g, P: Pointer<T>>( + &self, + new: P, + ord: Ordering, + _: &'g Guard +) -> Shared<'g, T>

Stores a Shared or Owned pointer into the atomic pointer, returning the previous +Shared.

+

This method takes an Ordering argument which describes the memory ordering of this +operation.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+let p = a.swap(Shared::null(), SeqCst, guard);
+
source

pub fn compare_exchange<'g, P>( + &self, + current: Shared<'_, T>, + new: P, + success: Ordering, + failure: Ordering, + _: &'g Guard +) -> Result<Shared<'g, T>, CompareExchangeError<'g, T, P>>
where + P: Pointer<T>,

Stores the pointer new (either Shared or Owned) into the atomic pointer if the current +value is the same as current. The tag is also taken into account, so two pointers to the +same object, but with different tags, will not be considered equal.

+

The return value is a result indicating whether the new pointer was written. On success the +pointer that was written is returned. On failure the actual current value and new are +returned.

+

This method takes two Ordering arguments to describe the memory +ordering of this operation. success describes the required ordering for the +read-modify-write operation that takes place if the comparison with current succeeds. +failure describes the required ordering for the load operation that takes place when +the comparison fails. Using Acquire as success ordering makes the store part +of this operation Relaxed, and using Release makes the successful load +Relaxed. The failure ordering can only be SeqCst, Acquire or Relaxed +and must be equivalent to or weaker than the success ordering.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+
+let guard = &epoch::pin();
+let curr = a.load(SeqCst, guard);
+let res1 = a.compare_exchange(curr, Shared::null(), SeqCst, SeqCst, guard);
+let res2 = a.compare_exchange(curr, Owned::new(5678), SeqCst, SeqCst, guard);
+
source

pub fn compare_exchange_weak<'g, P>( + &self, + current: Shared<'_, T>, + new: P, + success: Ordering, + failure: Ordering, + _: &'g Guard +) -> Result<Shared<'g, T>, CompareExchangeError<'g, T, P>>
where + P: Pointer<T>,

Stores the pointer new (either Shared or Owned) into the atomic pointer if the current +value is the same as current. The tag is also taken into account, so two pointers to the +same object, but with different tags, will not be considered equal.

+

Unlike compare_exchange, this method is allowed to spuriously fail even when comparison +succeeds, which can result in more efficient code on some platforms. The return value is a +result indicating whether the new pointer was written. On success the pointer that was +written is returned. On failure the actual current value and new are returned.

+

This method takes two Ordering arguments to describe the memory +ordering of this operation. success describes the required ordering for the +read-modify-write operation that takes place if the comparison with current succeeds. +failure describes the required ordering for the load operation that takes place when +the comparison fails. Using Acquire as success ordering makes the store part +of this operation Relaxed, and using Release makes the successful load +Relaxed. The failure ordering can only be SeqCst, Acquire or Relaxed +and must be equivalent to or weaker than the success ordering.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+
+let mut new = Owned::new(5678);
+let mut ptr = a.load(SeqCst, guard);
+loop {
+    match a.compare_exchange_weak(ptr, new, SeqCst, SeqCst, guard) {
+        Ok(p) => {
+            ptr = p;
+            break;
+        }
+        Err(err) => {
+            ptr = err.current;
+            new = err.new;
+        }
+    }
+}
+
+let mut curr = a.load(SeqCst, guard);
+loop {
+    match a.compare_exchange_weak(curr, Shared::null(), SeqCst, SeqCst, guard) {
+        Ok(_) => break,
+        Err(err) => curr = err.current,
+    }
+}
+
source

pub fn fetch_update<'g, F>( + &self, + set_order: Ordering, + fail_order: Ordering, + guard: &'g Guard, + func: F +) -> Result<Shared<'g, T>, Shared<'g, T>>
where + F: FnMut(Shared<'g, T>) -> Option<Shared<'g, T>>,

Fetches the pointer, and then applies a function to it that returns a new value. +Returns a Result of Ok(previous_value) if the function returned Some, else Err(_).

+

Note that the given function may be called multiple times if the value has been changed by +other threads in the meantime, as long as the function returns Some(_), but the function +will have been applied only once to the stored value.

+

fetch_update takes two Ordering arguments to describe the memory +ordering of this operation. The first describes the required ordering for +when the operation finally succeeds while the second describes the +required ordering for loads. These correspond to the success and failure +orderings of Atomic::compare_exchange respectively.

+

Using Acquire as success ordering makes the store part of this +operation Relaxed, and using Release makes the final successful +load Relaxed. The (failed) load ordering can only be SeqCst, +Acquire or Relaxed and must be equivalent to or weaker than the +success ordering.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+
+let res1 = a.fetch_update(SeqCst, SeqCst, guard, |x| Some(x.with_tag(1)));
+assert!(res1.is_ok());
+
+let res2 = a.fetch_update(SeqCst, SeqCst, guard, |x| None);
+assert!(res2.is_err());
+
source

pub fn compare_and_set<'g, O, P>( + &self, + current: Shared<'_, T>, + new: P, + ord: O, + guard: &'g Guard +) -> Result<Shared<'g, T>, CompareAndSetError<'g, T, P>>
where + O: CompareAndSetOrdering, + P: Pointer<T>,

👎Deprecated: Use compare_exchange instead

Stores the pointer new (either Shared or Owned) into the atomic pointer if the current +value is the same as current. The tag is also taken into account, so two pointers to the +same object, but with different tags, will not be considered equal.

+

The return value is a result indicating whether the new pointer was written. On success the +pointer that was written is returned. On failure the actual current value and new are +returned.

+

This method takes a CompareAndSetOrdering argument which describes the memory +ordering of this operation.

+
§Migrating to compare_exchange
+

compare_and_set is equivalent to compare_exchange with the following mapping for +memory orderings:

+
+ + + + + +
OriginalSuccessFailure
RelaxedRelaxedRelaxed
AcquireAcquireAcquire
ReleaseReleaseRelaxed
AcqRelAcqRelAcquire
SeqCstSeqCstSeqCst
+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+
+let guard = &epoch::pin();
+let curr = a.load(SeqCst, guard);
+let res1 = a.compare_and_set(curr, Shared::null(), SeqCst, guard);
+let res2 = a.compare_and_set(curr, Owned::new(5678), SeqCst, guard);
+
source

pub fn compare_and_set_weak<'g, O, P>( + &self, + current: Shared<'_, T>, + new: P, + ord: O, + guard: &'g Guard +) -> Result<Shared<'g, T>, CompareAndSetError<'g, T, P>>
where + O: CompareAndSetOrdering, + P: Pointer<T>,

👎Deprecated: Use compare_exchange_weak instead

Stores the pointer new (either Shared or Owned) into the atomic pointer if the current +value is the same as current. The tag is also taken into account, so two pointers to the +same object, but with different tags, will not be considered equal.

+

Unlike compare_and_set, this method is allowed to spuriously fail even when comparison +succeeds, which can result in more efficient code on some platforms. The return value is a +result indicating whether the new pointer was written. On success the pointer that was +written is returned. On failure the actual current value and new are returned.

+

This method takes a CompareAndSetOrdering argument which describes the memory +ordering of this operation.

+
§Migrating to compare_exchange_weak
+

compare_and_set_weak is equivalent to compare_exchange_weak with the following mapping for +memory orderings:

+
+ + + + + +
OriginalSuccessFailure
RelaxedRelaxedRelaxed
AcquireAcquireAcquire
ReleaseReleaseRelaxed
AcqRelAcqRelAcquire
SeqCstSeqCstSeqCst
+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+
+let mut new = Owned::new(5678);
+let mut ptr = a.load(SeqCst, guard);
+loop {
+    match a.compare_and_set_weak(ptr, new, SeqCst, guard) {
+        Ok(p) => {
+            ptr = p;
+            break;
+        }
+        Err(err) => {
+            ptr = err.current;
+            new = err.new;
+        }
+    }
+}
+
+let mut curr = a.load(SeqCst, guard);
+loop {
+    match a.compare_and_set_weak(curr, Shared::null(), SeqCst, guard) {
+        Ok(_) => break,
+        Err(err) => curr = err.current,
+    }
+}
+
source

pub fn fetch_and<'g>( + &self, + val: usize, + ord: Ordering, + _: &'g Guard +) -> Shared<'g, T>

Bitwise “and” with the current tag.

+

Performs a bitwise “and” operation on the current tag and the argument val, and sets the +new tag to the result. Returns the previous pointer.

+

This method takes an Ordering argument which describes the memory ordering of this +operation.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::<i32>::from(Shared::null().with_tag(3));
+let guard = &epoch::pin();
+assert_eq!(a.fetch_and(2, SeqCst, guard).tag(), 3);
+assert_eq!(a.load(SeqCst, guard).tag(), 2);
+
source

pub fn fetch_or<'g>( + &self, + val: usize, + ord: Ordering, + _: &'g Guard +) -> Shared<'g, T>

Bitwise “or” with the current tag.

+

Performs a bitwise “or” operation on the current tag and the argument val, and sets the +new tag to the result. Returns the previous pointer.

+

This method takes an Ordering argument which describes the memory ordering of this +operation.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::<i32>::from(Shared::null().with_tag(1));
+let guard = &epoch::pin();
+assert_eq!(a.fetch_or(2, SeqCst, guard).tag(), 1);
+assert_eq!(a.load(SeqCst, guard).tag(), 3);
+
source

pub fn fetch_xor<'g>( + &self, + val: usize, + ord: Ordering, + _: &'g Guard +) -> Shared<'g, T>

Bitwise “xor” with the current tag.

+

Performs a bitwise “xor” operation on the current tag and the argument val, and sets the +new tag to the result. Returns the previous pointer.

+

This method takes an Ordering argument which describes the memory ordering of this +operation.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Shared};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::<i32>::from(Shared::null().with_tag(1));
+let guard = &epoch::pin();
+assert_eq!(a.fetch_xor(3, SeqCst, guard).tag(), 1);
+assert_eq!(a.load(SeqCst, guard).tag(), 2);
+
source

pub unsafe fn into_owned(self) -> Owned<T>

Takes ownership of the pointee.

+

This consumes the atomic and converts it into Owned. As Atomic doesn’t have a +destructor and doesn’t drop the pointee while Owned does, this is suitable for +destructors of data structures.

+
§Panics
+

Panics if this pointer is null, but only in debug mode.

+
§Safety
+

This method may be called only if the pointer is valid and nobody else is holding a +reference to the same object.

+
§Examples
+
struct DataStructure {
+    ptr: Atomic<usize>,
+}
+
+impl Drop for DataStructure {
+    fn drop(&mut self) {
+        // By now the DataStructure lives only in our thread and we are sure we don't hold
+        // any Shared or & to it ourselves.
+        unsafe {
+            drop(mem::replace(&mut self.ptr, Atomic::null()).into_owned());
+        }
+    }
+}
+
source

pub unsafe fn try_into_owned(self) -> Option<Owned<T>>

Takes ownership of the pointee if it is non-null.

+

This consumes the atomic and converts it into Owned. As Atomic doesn’t have a +destructor and doesn’t drop the pointee while Owned does, this is suitable for +destructors of data structures.

+
§Safety
+

This method may be called only if the pointer is valid and nobody else is holding a +reference to the same object, or the pointer is null.

+
§Examples
+
struct DataStructure {
+    ptr: Atomic<usize>,
+}
+
+impl Drop for DataStructure {
+    fn drop(&mut self) {
+        // By now the DataStructure lives only in our thread and we are sure we don't hold
+        // any Shared or & to it ourselves, but it may be null, so we have to be careful.
+        let old = mem::replace(&mut self.ptr, Atomic::null());
+        unsafe {
+            if let Some(x) = old.try_into_owned() {
+                drop(x)
+            }
+        }
+    }
+}
+

Trait Implementations§

source§

impl<T: ?Sized + Pointable> Clone for Atomic<T>

source§

fn clone(&self) -> Self

Returns a copy of the atomic value.

+

Note that a Relaxed load is used here. If you need synchronization, use it with other +atomics or fences.

+
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: ?Sized + Pointable> Debug for Atomic<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized + Pointable> Default for Atomic<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T> From<*const T> for Atomic<T>

source§

fn from(raw: *const T) -> Self

Returns a new atomic pointer pointing to raw.

+
§Examples
+
use std::ptr;
+use crossbeam_epoch::Atomic;
+
+let a = Atomic::<i32>::from(ptr::null::<i32>());
+
source§

impl<T> From<Box<T>> for Atomic<T>

source§

fn from(b: Box<T>) -> Self

Converts to this type from the input type.
source§

impl<T: ?Sized + Pointable> From<Owned<T>> for Atomic<T>

source§

fn from(owned: Owned<T>) -> Self

Returns a new atomic pointer pointing to owned.

+
§Examples
+
use crossbeam_epoch::{Atomic, Owned};
+
+let a = Atomic::<i32>::from(Owned::new(1234));
+
source§

impl<'g, T: ?Sized + Pointable> From<Shared<'g, T>> for Atomic<T>

source§

fn from(ptr: Shared<'g, T>) -> Self

Returns a new atomic pointer pointing to ptr.

+
§Examples
+
use crossbeam_epoch::{Atomic, Shared};
+
+let a = Atomic::<i32>::from(Shared::<i32>::null());
+
source§

impl<T> From<T> for Atomic<T>

source§

fn from(t: T) -> Self

Converts to this type from the input type.
source§

impl<T: ?Sized + Pointable> Pointer for Atomic<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<T: ?Sized + Pointable + Send + Sync> Send for Atomic<T>

source§

impl<T: ?Sized + Pointable + Send + Sync> Sync for Atomic<T>

Auto Trait Implementations§

§

impl<T> !Freeze for Atomic<T>

§

impl<T: ?Sized> RefUnwindSafe for Atomic<T>
where + T: RefUnwindSafe,

§

impl<T: ?Sized> Unpin for Atomic<T>

§

impl<T: ?Sized> UnwindSafe for Atomic<T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/struct.Collector.html b/crossbeam_epoch/struct.Collector.html new file mode 100644 index 0000000000..5698fb505b --- /dev/null +++ b/crossbeam_epoch/struct.Collector.html @@ -0,0 +1,19 @@ +Collector in crossbeam_epoch - Rust +
pub struct Collector { /* private fields */ }
Expand description

An epoch-based garbage collector.

+

Implementations§

source§

impl Collector

source

pub fn new() -> Self

Creates a new collector.

+
source

pub fn register(&self) -> LocalHandle

Registers a new handle for the collector.

+

Trait Implementations§

source§

impl Clone for Collector

source§

fn clone(&self) -> Self

Creates another reference to the same garbage collector.

+
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Collector

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Collector

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for Collector

source§

fn eq(&self, rhs: &Collector) -> bool

Checks if both handles point to the same collector.

+
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Collector

source§

impl Send for Collector

source§

impl Sync for Collector

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/struct.CompareExchangeError.html b/crossbeam_epoch/struct.CompareExchangeError.html new file mode 100644 index 0000000000..5a7ce6d72a --- /dev/null +++ b/crossbeam_epoch/struct.CompareExchangeError.html @@ -0,0 +1,24 @@ +CompareExchangeError in crossbeam_epoch - Rust +
pub struct CompareExchangeError<'g, T: ?Sized + Pointable, P: Pointer<T>> {
+    pub current: Shared<'g, T>,
+    pub new: P,
+}
Expand description

The error returned on failed compare-and-swap operation.

+

Fields§

§current: Shared<'g, T>

The value in the atomic pointer at the time of the failed operation.

+
§new: P

The new value, which the operation failed to store.

+

Trait Implementations§

source§

impl<T, P: Pointer<T> + Debug> Debug for CompareExchangeError<'_, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'g, T: ?Sized, P> Freeze for CompareExchangeError<'g, T, P>
where + P: Freeze,

§

impl<'g, T: ?Sized, P> RefUnwindSafe for CompareExchangeError<'g, T, P>
where + P: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<'g, T, P> !Send for CompareExchangeError<'g, T, P>

§

impl<'g, T, P> !Sync for CompareExchangeError<'g, T, P>

§

impl<'g, T: ?Sized, P> Unpin for CompareExchangeError<'g, T, P>
where + P: Unpin,

§

impl<'g, T: ?Sized, P> UnwindSafe for CompareExchangeError<'g, T, P>
where + P: UnwindSafe, + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/struct.Guard.html b/crossbeam_epoch/struct.Guard.html new file mode 100644 index 0000000000..284cd9946d --- /dev/null +++ b/crossbeam_epoch/struct.Guard.html @@ -0,0 +1,266 @@ +Guard in crossbeam_epoch - Rust +

Struct crossbeam_epoch::Guard

source ·
pub struct Guard { /* private fields */ }
Expand description

A guard that keeps the current thread pinned.

+

§Pinning

+

The current thread is pinned by calling pin, which returns a new guard:

+ +
use crossbeam_epoch as epoch;
+
+// It is often convenient to prefix a call to `pin` with a `&` in order to create a reference.
+// This is not really necessary, but makes passing references to the guard a bit easier.
+let guard = &epoch::pin();
+

When a guard gets dropped, the current thread is automatically unpinned.

+

§Pointers on the stack

+

Having a guard allows us to create pointers on the stack to heap-allocated objects. +For example:

+ +
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+// Create a heap-allocated number.
+let a = Atomic::new(777);
+
+// Pin the current thread.
+let guard = &epoch::pin();
+
+// Load the heap-allocated object and create pointer `p` on the stack.
+let p = a.load(SeqCst, guard);
+
+// Dereference the pointer and print the value:
+if let Some(num) = unsafe { p.as_ref() } {
+    println!("The number is {}.", num);
+}
+

§Multiple guards

+

Pinning is reentrant and it is perfectly legal to create multiple guards. In that case, the +thread will actually be pinned only when the first guard is created and unpinned when the last +one is dropped:

+ +
use crossbeam_epoch as epoch;
+
+let guard1 = epoch::pin();
+let guard2 = epoch::pin();
+assert!(epoch::is_pinned());
+drop(guard1);
+assert!(epoch::is_pinned());
+drop(guard2);
+assert!(!epoch::is_pinned());
+

Implementations§

source§

impl Guard

source

pub fn defer<F, R>(&self, f: F)
where + F: FnOnce() -> R + Send + 'static,

Stores a function so that it can be executed at some point after all currently pinned +threads get unpinned.

+

This method first stores f into the thread-local (or handle-local) cache. If this cache +becomes full, some functions are moved into the global cache. At the same time, some +functions from both local and global caches may get executed in order to incrementally +clean up the caches as they fill up.

+

There is no guarantee when exactly f will be executed. The only guarantee is that it +won’t be executed until all currently pinned threads get unpinned. In theory, f might +never run, but the epoch-based garbage collection will make an effort to execute it +reasonably soon.

+

If this method is called from an unprotected guard, the function will simply be +executed immediately.

+
source

pub unsafe fn defer_unchecked<F, R>(&self, f: F)
where + F: FnOnce() -> R,

Stores a function so that it can be executed at some point after all currently pinned +threads get unpinned.

+

This method first stores f into the thread-local (or handle-local) cache. If this cache +becomes full, some functions are moved into the global cache. At the same time, some +functions from both local and global caches may get executed in order to incrementally +clean up the caches as they fill up.

+

There is no guarantee when exactly f will be executed. The only guarantee is that it +won’t be executed until all currently pinned threads get unpinned. In theory, f might +never run, but the epoch-based garbage collection will make an effort to execute it +reasonably soon.

+

If this method is called from an unprotected guard, the function will simply be +executed immediately.

+
§Safety
+

The given function must not hold reference onto the stack. It is highly recommended that +the passed function is always marked with move in order to prevent accidental +borrows.

+ +
use crossbeam_epoch as epoch;
+
+let guard = &epoch::pin();
+let message = "Hello!";
+unsafe {
+    // ALWAYS use `move` when sending a closure into `defer_unchecked`.
+    guard.defer_unchecked(move || {
+        println!("{}", message);
+    });
+}
+

Apart from that, keep in mind that another thread may execute f, so anything accessed by +the closure must be Send.

+

We intentionally didn’t require F: Send, because Rust’s type systems usually cannot prove +F: Send for typical use cases. For example, consider the following code snippet, which +exemplifies the typical use case of deferring the deallocation of a shared reference:

+ +
let shared = Owned::new(7i32).into_shared(guard);
+guard.defer_unchecked(move || shared.into_owned()); // `Shared` is not `Send`!
+

While Shared is not Send, it’s safe for another thread to call the deferred function, +because it’s called only after the grace period and shared is no longer shared with other +threads. But we don’t expect type systems to prove this.

+
§Examples
+

When a heap-allocated object in a data structure becomes unreachable, it has to be +deallocated. However, the current thread and other threads may be still holding references +on the stack to that same object. Therefore it cannot be deallocated before those references +get dropped. This method can defer deallocation until all those threads get unpinned and +consequently drop all their references on the stack.

+ +
use crossbeam_epoch::{self as epoch, Atomic, Owned};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new("foo");
+
+// Now suppose that `a` is shared among multiple threads and concurrently
+// accessed and modified...
+
+// Pin the current thread.
+let guard = &epoch::pin();
+
+// Steal the object currently stored in `a` and swap it with another one.
+let p = a.swap(Owned::new("bar").into_shared(guard), SeqCst, guard);
+
+if !p.is_null() {
+    // The object `p` is pointing to is now unreachable.
+    // Defer its deallocation until all currently pinned threads get unpinned.
+    unsafe {
+        // ALWAYS use `move` when sending a closure into `defer_unchecked`.
+        guard.defer_unchecked(move || {
+            println!("{} is now being deallocated.", p.deref());
+            // Now we have unique access to the object pointed to by `p` and can turn it
+            // into an `Owned`. Dropping the `Owned` will deallocate the object.
+            drop(p.into_owned());
+        });
+    }
+}
+
source

pub unsafe fn defer_destroy<T>(&self, ptr: Shared<'_, T>)

Stores a destructor for an object so that it can be deallocated and dropped at some point +after all currently pinned threads get unpinned.

+

This method first stores the destructor into the thread-local (or handle-local) cache. If +this cache becomes full, some destructors are moved into the global cache. At the same +time, some destructors from both local and global caches may get executed in order to +incrementally clean up the caches as they fill up.

+

There is no guarantee when exactly the destructor will be executed. The only guarantee is +that it won’t be executed until all currently pinned threads get unpinned. In theory, the +destructor might never run, but the epoch-based garbage collection will make an effort to +execute it reasonably soon.

+

If this method is called from an unprotected guard, the destructor will simply be +executed immediately.

+
§Safety
+

The object must not be reachable by other threads anymore, otherwise it might be still in +use when the destructor runs.

+

Apart from that, keep in mind that another thread may execute the destructor, so the object +must be sendable to other threads.

+

We intentionally didn’t require T: Send, because Rust’s type systems usually cannot prove +T: Send for typical use cases. For example, consider the following code snippet, which +exemplifies the typical use case of deferring the deallocation of a shared reference:

+ +
let shared = Owned::new(7i32).into_shared(guard);
+guard.defer_destroy(shared); // `Shared` is not `Send`!
+

While Shared is not Send, it’s safe for another thread to call the destructor, because +it’s called only after the grace period and shared is no longer shared with other +threads. But we don’t expect type systems to prove this.

+
§Examples
+

When a heap-allocated object in a data structure becomes unreachable, it has to be +deallocated. However, the current thread and other threads may be still holding references +on the stack to that same object. Therefore it cannot be deallocated before those references +get dropped. This method can defer deallocation until all those threads get unpinned and +consequently drop all their references on the stack.

+ +
use crossbeam_epoch::{self as epoch, Atomic, Owned};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new("foo");
+
+// Now suppose that `a` is shared among multiple threads and concurrently
+// accessed and modified...
+
+// Pin the current thread.
+let guard = &epoch::pin();
+
+// Steal the object currently stored in `a` and swap it with another one.
+let p = a.swap(Owned::new("bar").into_shared(guard), SeqCst, guard);
+
+if !p.is_null() {
+    // The object `p` is pointing to is now unreachable.
+    // Defer its deallocation until all currently pinned threads get unpinned.
+    unsafe {
+        guard.defer_destroy(p);
+    }
+}
+
source

pub fn flush(&self)

Clears up the thread-local cache of deferred functions by executing them or moving into the +global cache.

+

Call this method after deferring execution of a function if you want to get it executed as +soon as possible. Flushing will make sure it is residing in in the global cache, so that +any thread has a chance of taking the function and executing it.

+

If this method is called from an unprotected guard, it is a no-op (nothing happens).

+
§Examples
+
use crossbeam_epoch as epoch;
+
+let guard = &epoch::pin();
+guard.defer(move || {
+    println!("This better be printed as soon as possible!");
+});
+guard.flush();
+
source

pub fn repin(&mut self)

Unpins and then immediately re-pins the thread.

+

This method is useful when you don’t want delay the advancement of the global epoch by +holding an old epoch. For safety, you should not maintain any guard-based reference across +the call (the latter is enforced by &mut self). The thread will only be repinned if this +is the only active guard for the current thread.

+

If this method is called from an unprotected guard, then the call will be just no-op.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(777);
+let mut guard = epoch::pin();
+{
+    let p = a.load(SeqCst, &guard);
+    assert_eq!(unsafe { p.as_ref() }, Some(&777));
+}
+guard.repin();
+{
+    let p = a.load(SeqCst, &guard);
+    assert_eq!(unsafe { p.as_ref() }, Some(&777));
+}
+
source

pub fn repin_after<F, R>(&mut self, f: F) -> R
where + F: FnOnce() -> R,

Temporarily unpins the thread, executes the given function and then re-pins the thread.

+

This method is useful when you need to perform a long-running operation (e.g. sleeping) +and don’t need to maintain any guard-based reference across the call (the latter is enforced +by &mut self). The thread will only be unpinned if this is the only active guard for the +current thread.

+

If this method is called from an unprotected guard, then the passed function is called +directly without unpinning the thread.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+use std::thread;
+use std::time::Duration;
+
+let a = Atomic::new(777);
+let mut guard = epoch::pin();
+{
+    let p = a.load(SeqCst, &guard);
+    assert_eq!(unsafe { p.as_ref() }, Some(&777));
+}
+guard.repin_after(|| thread::sleep(Duration::from_millis(50)));
+{
+    let p = a.load(SeqCst, &guard);
+    assert_eq!(unsafe { p.as_ref() }, Some(&777));
+}
+
source

pub fn collector(&self) -> Option<&Collector>

Returns the Collector associated with this guard.

+

This method is useful when you need to ensure that all guards used with +a data structure come from the same collector.

+

If this method is called from an unprotected guard, then None is returned.

+
§Examples
+
use crossbeam_epoch as epoch;
+
+let guard1 = epoch::pin();
+let guard2 = epoch::pin();
+assert!(guard1.collector() == guard2.collector());
+

Trait Implementations§

source§

impl Debug for Guard

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Guard

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Guard

§

impl !RefUnwindSafe for Guard

§

impl !Send for Guard

§

impl !Sync for Guard

§

impl Unpin for Guard

§

impl !UnwindSafe for Guard

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/struct.LocalHandle.html b/crossbeam_epoch/struct.LocalHandle.html new file mode 100644 index 0000000000..228e2f6dbf --- /dev/null +++ b/crossbeam_epoch/struct.LocalHandle.html @@ -0,0 +1,16 @@ +LocalHandle in crossbeam_epoch - Rust +
pub struct LocalHandle { /* private fields */ }
Expand description

A handle to a garbage collector.

+

Implementations§

source§

impl LocalHandle

source

pub fn pin(&self) -> Guard

Pins the handle.

+
source

pub fn is_pinned(&self) -> bool

Returns true if the handle is pinned.

+
source

pub fn collector(&self) -> &Collector

Returns the Collector associated with this handle.

+

Trait Implementations§

source§

impl Debug for LocalHandle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for LocalHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/struct.Owned.html b/crossbeam_epoch/struct.Owned.html new file mode 100644 index 0000000000..869fa160a4 --- /dev/null +++ b/crossbeam_epoch/struct.Owned.html @@ -0,0 +1,87 @@ +Owned in crossbeam_epoch - Rust +

Struct crossbeam_epoch::Owned

source ·
pub struct Owned<T: ?Sized + Pointable> { /* private fields */ }
Expand description

An owned heap-allocated object.

+

This type is very similar to Box<T>.

+

The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused +least significant bits of the address.

+

Implementations§

source§

impl<T> Owned<T>

source

pub unsafe fn from_raw(raw: *mut T) -> Owned<T>

Returns a new owned pointer pointing to raw.

+

This function is unsafe because improper use may lead to memory problems. Argument raw +must be a valid pointer. Also, a double-free may occur if the function is called twice on +the same raw pointer.

+
§Panics
+

Panics if raw is not properly aligned.

+
§Safety
+

The given raw should have been derived from Owned, and one raw should not be converted +back by Owned::from_raw() multiple times.

+
§Examples
+
use crossbeam_epoch::Owned;
+
+let o = unsafe { Owned::from_raw(Box::into_raw(Box::new(1234))) };
+
source

pub fn into_box(self) -> Box<T>

Converts the owned pointer into a Box.

+
§Examples
+
use crossbeam_epoch::Owned;
+
+let o = Owned::new(1234);
+let b: Box<i32> = o.into_box();
+assert_eq!(*b, 1234);
+
source

pub fn new(init: T) -> Owned<T>

Allocates value on the heap and returns a new owned pointer pointing to it.

+
§Examples
+
use crossbeam_epoch::Owned;
+
+let o = Owned::new(1234);
+
source§

impl<T: ?Sized + Pointable> Owned<T>

source

pub fn init(init: T::Init) -> Owned<T>

Allocates value on the heap and returns a new owned pointer pointing to it.

+
§Examples
+
use crossbeam_epoch::Owned;
+
+let o = Owned::<i32>::init(1234);
+
source

pub fn into_shared<'g>(self, _: &'g Guard) -> Shared<'g, T>

Converts the owned pointer into a Shared.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Owned};
+
+let o = Owned::new(1234);
+let guard = &epoch::pin();
+let p = o.into_shared(guard);
+
source

pub fn tag(&self) -> usize

Returns the tag stored within the pointer.

+
§Examples
+
use crossbeam_epoch::Owned;
+
+assert_eq!(Owned::new(1234).tag(), 0);
+
source

pub fn with_tag(self, tag: usize) -> Owned<T>

Returns the same pointer, but tagged with tag. tag is truncated to be fit into the +unused bits of the pointer to T.

+
§Examples
+
use crossbeam_epoch::Owned;
+
+let o = Owned::new(0u64);
+assert_eq!(o.tag(), 0);
+let o = o.with_tag(2);
+assert_eq!(o.tag(), 2);
+

Trait Implementations§

source§

impl<T: ?Sized + Pointable> AsMut<T> for Owned<T>

source§

fn as_mut(&mut self) -> &mut T

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T: ?Sized + Pointable> AsRef<T> for Owned<T>

source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T: ?Sized + Pointable> Borrow<T> for Owned<T>

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T: ?Sized + Pointable> BorrowMut<T> for Owned<T>

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T: Clone> Clone for Owned<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: ?Sized + Pointable> Debug for Owned<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized + Pointable> Deref for Owned<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T: ?Sized + Pointable> DerefMut for Owned<T>

source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
source§

impl<T: ?Sized + Pointable> Drop for Owned<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> From<Box<T>> for Owned<T>

source§

fn from(b: Box<T>) -> Self

Returns a new owned pointer pointing to b.

+
§Panics
+

Panics if the pointer (the Box) is not properly aligned.

+
§Examples
+
use crossbeam_epoch::Owned;
+
+let o = unsafe { Owned::from_raw(Box::into_raw(Box::new(1234))) };
+
source§

impl<T: ?Sized + Pointable> From<Owned<T>> for Atomic<T>

source§

fn from(owned: Owned<T>) -> Self

Returns a new atomic pointer pointing to owned.

+
§Examples
+
use crossbeam_epoch::{Atomic, Owned};
+
+let a = Atomic::<i32>::from(Owned::new(1234));
+
source§

impl<T> From<T> for Owned<T>

source§

fn from(t: T) -> Self

Converts to this type from the input type.
source§

impl<T: ?Sized + Pointable> Pointer<T> for Owned<T>

source§

unsafe fn from_usize(data: usize) -> Self

Returns a new pointer pointing to the tagged pointer data.

+
§Panics
+

Panics if the data is zero in debug mode.

+
source§

fn into_usize(self) -> usize

Returns the machine representation of the pointer.

Auto Trait Implementations§

§

impl<T: ?Sized> Freeze for Owned<T>

§

impl<T: ?Sized> RefUnwindSafe for Owned<T>
where + T: RefUnwindSafe,

§

impl<T: ?Sized> Send for Owned<T>
where + T: Send,

§

impl<T: ?Sized> Sync for Owned<T>
where + T: Sync,

§

impl<T: ?Sized> Unpin for Owned<T>

§

impl<T: ?Sized> UnwindSafe for Owned<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/struct.Shared.html b/crossbeam_epoch/struct.Shared.html new file mode 100644 index 0000000000..44ee89bcf7 --- /dev/null +++ b/crossbeam_epoch/struct.Shared.html @@ -0,0 +1,201 @@ +Shared in crossbeam_epoch - Rust +

Struct crossbeam_epoch::Shared

source ·
pub struct Shared<'g, T: 'g + ?Sized + Pointable> { /* private fields */ }
Expand description

A pointer to an object protected by the epoch GC.

+

The pointer is valid for use only during the lifetime 'g.

+

The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused +least significant bits of the address.

+

Implementations§

source§

impl<'g, T> Shared<'g, T>

source

pub fn as_raw(&self) -> *const T

Converts the pointer to a raw pointer (without the tag).

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Owned};
+use std::sync::atomic::Ordering::SeqCst;
+
+let o = Owned::new(1234);
+let raw = &*o as *const _;
+let a = Atomic::from(o);
+
+let guard = &epoch::pin();
+let p = a.load(SeqCst, guard);
+assert_eq!(p.as_raw(), raw);
+
source§

impl<'g, T: ?Sized + Pointable> Shared<'g, T>

source

pub fn null() -> Shared<'g, T>

Returns a new null pointer.

+
§Examples
+
use crossbeam_epoch::Shared;
+
+let p = Shared::<i32>::null();
+assert!(p.is_null());
+
source

pub fn is_null(&self) -> bool

Returns true if the pointer is null.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Owned};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::null();
+let guard = &epoch::pin();
+assert!(a.load(SeqCst, guard).is_null());
+a.store(Owned::new(1234), SeqCst);
+assert!(!a.load(SeqCst, guard).is_null());
+
source

pub unsafe fn deref(&self) -> &'g T

Dereferences the pointer.

+

Returns a reference to the pointee that is valid during the lifetime 'g.

+
§Safety
+

Dereferencing a pointer is unsafe because it could be pointing to invalid memory.

+

Another concern is the possibility of data races due to lack of proper synchronization. +For example, consider the following scenario:

+
    +
  1. A thread creates a new object: a.store(Owned::new(10), Relaxed)
  2. +
  3. Another thread reads it: *a.load(Relaxed, guard).as_ref().unwrap()
  4. +
+

The problem is that relaxed orderings don’t synchronize initialization of the object with +the read from the second thread. This is a data race. A possible solution would be to use +Release and Acquire orderings.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+let p = a.load(SeqCst, guard);
+unsafe {
+    assert_eq!(p.deref(), &1234);
+}
+
source

pub unsafe fn deref_mut(&mut self) -> &'g mut T

Dereferences the pointer.

+

Returns a mutable reference to the pointee that is valid during the lifetime 'g.

+
§Safety
+
    +
  • +

    There is no guarantee that there are no more threads attempting to read/write from/to the +actual object at the same time.

    +

    The user must know that there are no concurrent accesses towards the object itself.

    +
  • +
  • +

    Other than the above, all safety concerns of deref() applies here.

    +
  • +
+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(vec![1, 2, 3, 4]);
+let guard = &epoch::pin();
+
+let mut p = a.load(SeqCst, guard);
+unsafe {
+    assert!(!p.is_null());
+    let b = p.deref_mut();
+    assert_eq!(b, &vec![1, 2, 3, 4]);
+    b.push(5);
+    assert_eq!(b, &vec![1, 2, 3, 4, 5]);
+}
+
+let p = a.load(SeqCst, guard);
+unsafe {
+    assert_eq!(p.deref(), &vec![1, 2, 3, 4, 5]);
+}
+
source

pub unsafe fn as_ref(&self) -> Option<&'g T>

Converts the pointer to a reference.

+

Returns None if the pointer is null, or else a reference to the object wrapped in Some.

+
§Safety
+

Dereferencing a pointer is unsafe because it could be pointing to invalid memory.

+

Another concern is the possibility of data races due to lack of proper synchronization. +For example, consider the following scenario:

+
    +
  1. A thread creates a new object: a.store(Owned::new(10), Relaxed)
  2. +
  3. Another thread reads it: *a.load(Relaxed, guard).as_ref().unwrap()
  4. +
+

The problem is that relaxed orderings don’t synchronize initialization of the object with +the read from the second thread. This is a data race. A possible solution would be to use +Release and Acquire orderings.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+let guard = &epoch::pin();
+let p = a.load(SeqCst, guard);
+unsafe {
+    assert_eq!(p.as_ref(), Some(&1234));
+}
+
source

pub unsafe fn into_owned(self) -> Owned<T>

Takes ownership of the pointee.

+
§Panics
+

Panics if this pointer is null, but only in debug mode.

+
§Safety
+

This method may be called only if the pointer is valid and nobody else is holding a +reference to the same object.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+unsafe {
+    let guard = &epoch::unprotected();
+    let p = a.load(SeqCst, guard);
+    drop(p.into_owned());
+}
+
source

pub unsafe fn try_into_owned(self) -> Option<Owned<T>>

Takes ownership of the pointee if it is not null.

+
§Safety
+

This method may be called only if the pointer is valid and nobody else is holding a +reference to the same object, or if the pointer is null.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(1234);
+unsafe {
+    let guard = &epoch::unprotected();
+    let p = a.load(SeqCst, guard);
+    if let Some(x) = p.try_into_owned() {
+        drop(x);
+    }
+}
+
source

pub fn tag(&self) -> usize

Returns the tag stored within the pointer.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic, Owned};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::<u64>::from(Owned::new(0u64).with_tag(2));
+let guard = &epoch::pin();
+let p = a.load(SeqCst, guard);
+assert_eq!(p.tag(), 2);
+
source

pub fn with_tag(&self, tag: usize) -> Shared<'g, T>

Returns the same pointer, but tagged with tag. tag is truncated to be fit into the +unused bits of the pointer to T.

+
§Examples
+
use crossbeam_epoch::{self as epoch, Atomic};
+use std::sync::atomic::Ordering::SeqCst;
+
+let a = Atomic::new(0u64);
+let guard = &epoch::pin();
+let p1 = a.load(SeqCst, guard);
+let p2 = p1.with_tag(2);
+
+assert_eq!(p1.tag(), 0);
+assert_eq!(p2.tag(), 2);
+assert_eq!(p1.as_raw(), p2.as_raw());
+

Trait Implementations§

source§

impl<T: ?Sized + Pointable> Clone for Shared<'_, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: ?Sized + Pointable> Debug for Shared<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized + Pointable> Default for Shared<'_, T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T> From<*const T> for Shared<'_, T>

source§

fn from(raw: *const T) -> Self

Returns a new pointer pointing to raw.

+
§Panics
+

Panics if raw is not properly aligned.

+
§Examples
+
use crossbeam_epoch::Shared;
+
+let p = Shared::from(Box::into_raw(Box::new(1234)) as *const _);
+assert!(!p.is_null());
+
source§

impl<'g, T: ?Sized + Pointable> From<Shared<'g, T>> for Atomic<T>

source§

fn from(ptr: Shared<'g, T>) -> Self

Returns a new atomic pointer pointing to ptr.

+
§Examples
+
use crossbeam_epoch::{Atomic, Shared};
+
+let a = Atomic::<i32>::from(Shared::<i32>::null());
+
source§

impl<T: ?Sized + Pointable> Ord for Shared<'_, T>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<'g, T: ?Sized + Pointable> PartialEq for Shared<'g, T>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<'g, T: ?Sized + Pointable> PartialOrd for Shared<'g, T>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl<T: ?Sized + Pointable> Pointer<T> for Shared<'_, T>

source§

fn into_usize(self) -> usize

Returns the machine representation of the pointer.
source§

unsafe fn from_usize(data: usize) -> Self

Returns a new pointer pointing to the tagged pointer data. Read more
source§

impl<T: ?Sized + Pointable> Pointer for Shared<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<T: ?Sized + Pointable> Copy for Shared<'_, T>

source§

impl<T: ?Sized + Pointable> Eq for Shared<'_, T>

Auto Trait Implementations§

§

impl<'g, T: ?Sized> Freeze for Shared<'g, T>

§

impl<'g, T: ?Sized> RefUnwindSafe for Shared<'g, T>
where + T: RefUnwindSafe,

§

impl<'g, T> !Send for Shared<'g, T>

§

impl<'g, T> !Sync for Shared<'g, T>

§

impl<'g, T: ?Sized> Unpin for Shared<'g, T>

§

impl<'g, T: ?Sized> UnwindSafe for Shared<'g, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = const ALIGN: usize = mem::align_of::<T>();

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_epoch/trait.CompareAndSetOrdering.html b/crossbeam_epoch/trait.CompareAndSetOrdering.html new file mode 100644 index 0000000000..3b7773900a --- /dev/null +++ b/crossbeam_epoch/trait.CompareAndSetOrdering.html @@ -0,0 +1,20 @@ +CompareAndSetOrdering in crossbeam_epoch - Rust +
pub trait CompareAndSetOrdering {
+    // Required methods
+    fn success(&self) -> Ordering;
+    fn failure(&self) -> Ordering;
+}
👎Deprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
Expand description

Memory orderings for compare-and-set operations.

+

A compare-and-set operation can have different memory orderings depending on whether it +succeeds or fails. This trait generalizes different ways of specifying memory orderings.

+

The two ways of specifying orderings for compare-and-set are:

+
    +
  1. Just one Ordering for the success case. In case of failure, the strongest appropriate +ordering is chosen.
  2. +
  3. A pair of Orderings. The first one is for the success case, while the second one is +for the failure case.
  4. +
+

Required Methods§

source

fn success(&self) -> Ordering

👎Deprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead

The ordering of the operation when it succeeds.

+
source

fn failure(&self) -> Ordering

👎Deprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead

The ordering of the operation when it fails.

+

The failure ordering can’t be Release or AcqRel and must be equivalent or weaker than +the success ordering.

+

Implementations on Foreign Types§

source§

impl CompareAndSetOrdering for (Ordering, Ordering)

source§

fn success(&self) -> Ordering

👎Deprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
source§

fn failure(&self) -> Ordering

👎Deprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
source§

impl CompareAndSetOrdering for Ordering

source§

fn success(&self) -> Ordering

👎Deprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead
source§

fn failure(&self) -> Ordering

👎Deprecated: compare_and_set and compare_and_set_weak that use this trait are deprecated, use compare_exchange or compare_exchange_weak instead

Implementors§

\ No newline at end of file diff --git a/crossbeam_epoch/trait.Pointable.html b/crossbeam_epoch/trait.Pointable.html new file mode 100644 index 0000000000..1dab70b501 --- /dev/null +++ b/crossbeam_epoch/trait.Pointable.html @@ -0,0 +1,55 @@ +Pointable in crossbeam_epoch - Rust +
pub trait Pointable {
+    type Init;
+
+    const ALIGN: usize;
+
+    // Required methods
+    unsafe fn init(init: Self::Init) -> usize;
+    unsafe fn deref<'a>(ptr: usize) -> &'a Self;
+    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self;
+    unsafe fn drop(ptr: usize);
+}
Expand description

Types that are pointed to by a single word.

+

In concurrent programming, it is necessary to represent an object within a word because atomic +operations (e.g., reads, writes, read-modify-writes) support only single words. This trait +qualifies such types that are pointed to by a single word.

+

The trait generalizes Box<T> for a sized type T. In a box, an object of type T is +allocated in heap and it is owned by a single-word pointer. This trait is also implemented for +[MaybeUninit<T>] by storing its size along with its elements and pointing to the pair of array +size and elements.

+

Pointers to Pointable types can be stored in Atomic, Owned, and Shared. In +particular, Crossbeam supports dynamically sized slices as follows.

+ +
use std::mem::MaybeUninit;
+use crossbeam_epoch::Owned;
+
+let o = Owned::<[MaybeUninit<i32>]>::init(10); // allocating [i32; 10]
+

Required Associated Types§

source

type Init

The type for initializers.

+

Required Associated Constants§

source

const ALIGN: usize

The alignment of pointer.

+

Required Methods§

source

unsafe fn init(init: Self::Init) -> usize

Initializes a with the given initializer.

+
§Safety
+

The result should be a multiple of ALIGN.

+
source

unsafe fn deref<'a>(ptr: usize) -> &'a Self

Dereferences the given pointer.

+
§Safety
+ +
source

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self

Mutably dereferences the given pointer.

+
§Safety
+ +
source

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer.

+
§Safety
+ +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Pointable for [MaybeUninit<T>]

source§

const ALIGN: usize = _

§

type Init = usize

source§

unsafe fn init(len: Self::Init) -> usize

source§

unsafe fn deref<'a>(ptr: usize) -> &'a Self

source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self

source§

unsafe fn drop(ptr: usize)

Implementors§

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

§

type Init = T

\ No newline at end of file diff --git a/crossbeam_epoch/trait.Pointer.html b/crossbeam_epoch/trait.Pointer.html new file mode 100644 index 0000000000..78df5a791e --- /dev/null +++ b/crossbeam_epoch/trait.Pointer.html @@ -0,0 +1,12 @@ +Pointer in crossbeam_epoch - Rust +
pub trait Pointer<T: ?Sized + Pointable> {
+    // Required methods
+    fn into_usize(self) -> usize;
+    unsafe fn from_usize(data: usize) -> Self;
+}
Expand description

A trait for either Owned or Shared pointers.

+

Required Methods§

source

fn into_usize(self) -> usize

Returns the machine representation of the pointer.

+
source

unsafe fn from_usize(data: usize) -> Self

Returns a new pointer pointing to the tagged pointer data.

+
§Safety
+

The given data should have been created by Pointer::into_usize(), and one data should +not be converted back by Pointer::from_usize() multiple times.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: ?Sized + Pointable> Pointer<T> for Owned<T>

source§

impl<T: ?Sized + Pointable> Pointer<T> for Shared<'_, T>

\ No newline at end of file diff --git a/crossbeam_epoch/type.CompareAndSetError.html b/crossbeam_epoch/type.CompareAndSetError.html new file mode 100644 index 0000000000..1954b1d8d1 --- /dev/null +++ b/crossbeam_epoch/type.CompareAndSetError.html @@ -0,0 +1,8 @@ +CompareAndSetError in crossbeam_epoch - Rust +
pub type CompareAndSetError<'g, T, P> = CompareExchangeError<'g, T, P>;
👎Deprecated: Use CompareExchangeError instead
Expand description

The error returned on failed compare-and-set operation.

+

Aliased Type§

struct CompareAndSetError<'g, T, P> {
+    pub current: Shared<'g, T>,
+    pub new: P,
+}

Fields§

§current: Shared<'g, T>

The value in the atomic pointer at the time of the failed operation.

+
§new: P

The new value, which the operation failed to store.

+
\ No newline at end of file diff --git a/crossbeam_utils/all.html b/crossbeam_utils/all.html new file mode 100644 index 0000000000..bc58cf146d --- /dev/null +++ b/crossbeam_utils/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +
\ No newline at end of file diff --git a/crossbeam_utils/atomic/atomic_cell/struct.AtomicCell.html b/crossbeam_utils/atomic/atomic_cell/struct.AtomicCell.html new file mode 100644 index 0000000000..dcd62a7010 --- /dev/null +++ b/crossbeam_utils/atomic/atomic_cell/struct.AtomicCell.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/atomic/struct.AtomicCell.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/atomic/consume/trait.AtomicConsume.html b/crossbeam_utils/atomic/consume/trait.AtomicConsume.html new file mode 100644 index 0000000000..9f6d4c37b3 --- /dev/null +++ b/crossbeam_utils/atomic/consume/trait.AtomicConsume.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/atomic/trait.AtomicConsume.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/atomic/index.html b/crossbeam_utils/atomic/index.html new file mode 100644 index 0000000000..d3fa88b369 --- /dev/null +++ b/crossbeam_utils/atomic/index.html @@ -0,0 +1,7 @@ +crossbeam_utils::atomic - Rust +

Module crossbeam_utils::atomic

source ·
Expand description

Atomic types.

+
    +
  • AtomicCell, a thread-safe mutable memory location.
  • +
  • AtomicConsume, for reading from primitive atomic types with “consume” ordering.
  • +
+

Structs§

Traits§

  • Trait which allows reading from primitive atomic types with “consume” ordering.
\ No newline at end of file diff --git a/crossbeam_utils/atomic/sidebar-items.js b/crossbeam_utils/atomic/sidebar-items.js new file mode 100644 index 0000000000..584e7bb9a9 --- /dev/null +++ b/crossbeam_utils/atomic/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AtomicCell"],"trait":["AtomicConsume"]}; \ No newline at end of file diff --git a/crossbeam_utils/atomic/struct.AtomicCell.html b/crossbeam_utils/atomic/struct.AtomicCell.html new file mode 100644 index 0000000000..1312df668e --- /dev/null +++ b/crossbeam_utils/atomic/struct.AtomicCell.html @@ -0,0 +1,1002 @@ +AtomicCell in crossbeam_utils::atomic - Rust +
pub struct AtomicCell<T> { /* private fields */ }
Expand description

A thread-safe mutable memory location.

+

This type is equivalent to Cell, except it can also be shared among multiple threads.

+

Operations on AtomicCells use atomic instructions whenever possible, and synchronize using +global locks otherwise. You can call AtomicCell::<T>::is_lock_free() to check whether +atomic instructions or locks will be used.

+

Atomic loads use the Acquire ordering and atomic stores use the Release ordering.

+

Implementations§

source§

impl<T> AtomicCell<T>

source

pub const fn new(val: T) -> AtomicCell<T>

Creates a new atomic cell initialized with val.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7);
+
source

pub fn into_inner(self) -> T

Consumes the atomic and returns the contained value.

+

This is safe because passing self by value guarantees that no other threads are +concurrently accessing the atomic data.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7);
+let v = a.into_inner();
+
+assert_eq!(v, 7);
+
source

pub const fn is_lock_free() -> bool

Returns true if operations on values of this type are lock-free.

+

If the compiler or the platform doesn’t support the necessary atomic instructions, +AtomicCell<T> will use global locks for every potentially concurrent atomic operation.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+// This type is internally represented as `AtomicUsize` so we can just use atomic
+// operations provided by it.
+assert_eq!(AtomicCell::<usize>::is_lock_free(), true);
+
+// A wrapper struct around `isize`.
+struct Foo {
+    bar: isize,
+}
+// `AtomicCell<Foo>` will be internally represented as `AtomicIsize`.
+assert_eq!(AtomicCell::<Foo>::is_lock_free(), true);
+
+// Operations on zero-sized types are always lock-free.
+assert_eq!(AtomicCell::<()>::is_lock_free(), true);
+
+// Very large types cannot be represented as any of the standard atomic types, so atomic
+// operations on them will have to use global locks for synchronization.
+assert_eq!(AtomicCell::<[u8; 1000]>::is_lock_free(), false);
+
source

pub fn store(&self, val: T)

Stores val into the atomic cell.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7);
+
+assert_eq!(a.load(), 7);
+a.store(8);
+assert_eq!(a.load(), 8);
+
source

pub fn swap(&self, val: T) -> T

Stores val into the atomic cell and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7);
+
+assert_eq!(a.load(), 7);
+assert_eq!(a.swap(8), 7);
+assert_eq!(a.load(), 8);
+
source

pub fn as_ptr(&self) -> *mut T

Returns a raw pointer to the underlying data in this atomic cell.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(5);
+
+let ptr = a.as_ptr();
+
source§

impl<T: Default> AtomicCell<T>

source

pub fn take(&self) -> T

Takes the value of the atomic cell, leaving Default::default() in its place.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(5);
+let five = a.take();
+
+assert_eq!(five, 5);
+assert_eq!(a.into_inner(), 0);
+
source§

impl<T: Copy> AtomicCell<T>

source

pub fn load(&self) -> T

Loads a value from the atomic cell.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7);
+
+assert_eq!(a.load(), 7);
+
source§

impl<T: Copy + Eq> AtomicCell<T>

source

pub fn compare_and_swap(&self, current: T, new: T) -> T

👎Deprecated: Use compare_exchange instead

If the current value equals current, stores new into the atomic cell.

+

The return value is always the previous value. If it is equal to current, then the value +was updated.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(1);
+
+assert_eq!(a.compare_and_swap(2, 3), 1);
+assert_eq!(a.load(), 1);
+
+assert_eq!(a.compare_and_swap(1, 2), 1);
+assert_eq!(a.load(), 2);
+
source

pub fn compare_exchange(&self, current: T, new: T) -> Result<T, T>

If the current value equals current, stores new into the atomic cell.

+

The return value is a result indicating whether the new value was written and containing +the previous value. On success this value is guaranteed to be equal to current.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(1);
+
+assert_eq!(a.compare_exchange(2, 3), Err(1));
+assert_eq!(a.load(), 1);
+
+assert_eq!(a.compare_exchange(1, 2), Ok(1));
+assert_eq!(a.load(), 2);
+
source

pub fn fetch_update<F>(&self, f: F) -> Result<T, T>
where + F: FnMut(T) -> Option<T>,

Fetches the value, and applies a function to it that returns an optional +new value. Returns a Result of Ok(previous_value) if the function returned Some(_), else +Err(previous_value).

+

Note: This may call the function multiple times if the value has been changed from other threads in +the meantime, as long as the function returns Some(_), but the function will have been applied +only once to the stored value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7);
+assert_eq!(a.fetch_update(|_| None), Err(7));
+assert_eq!(a.fetch_update(|a| Some(a + 1)), Ok(7));
+assert_eq!(a.fetch_update(|a| Some(a + 1)), Ok(8));
+assert_eq!(a.load(), 9);
+
source§

impl AtomicCell<u8>

source

pub fn fetch_add(&self, val: u8) -> u8

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: u8) -> u8

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: u8) -> u8

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: u8) -> u8

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: u8) -> u8

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: u8) -> u8

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: u8) -> u8

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: u8) -> u8

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u8);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<i8>

source

pub fn fetch_add(&self, val: i8) -> i8

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: i8) -> i8

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: i8) -> i8

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: i8) -> i8

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: i8) -> i8

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: i8) -> i8

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: i8) -> i8

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: i8) -> i8

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i8);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<u16>

source

pub fn fetch_add(&self, val: u16) -> u16

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: u16) -> u16

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: u16) -> u16

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: u16) -> u16

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: u16) -> u16

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: u16) -> u16

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: u16) -> u16

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: u16) -> u16

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u16);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<i16>

source

pub fn fetch_add(&self, val: i16) -> i16

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: i16) -> i16

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: i16) -> i16

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: i16) -> i16

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: i16) -> i16

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: i16) -> i16

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: i16) -> i16

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: i16) -> i16

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i16);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<u32>

source

pub fn fetch_add(&self, val: u32) -> u32

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: u32) -> u32

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: u32) -> u32

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: u32) -> u32

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: u32) -> u32

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: u32) -> u32

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: u32) -> u32

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: u32) -> u32

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u32);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<i32>

source

pub fn fetch_add(&self, val: i32) -> i32

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: i32) -> i32

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: i32) -> i32

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: i32) -> i32

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: i32) -> i32

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: i32) -> i32

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: i32) -> i32

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: i32) -> i32

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i32);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<u64>

source

pub fn fetch_add(&self, val: u64) -> u64

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: u64) -> u64

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: u64) -> u64

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: u64) -> u64

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: u64) -> u64

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: u64) -> u64

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: u64) -> u64

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: u64) -> u64

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u64);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<i64>

source

pub fn fetch_add(&self, val: i64) -> i64

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: i64) -> i64

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: i64) -> i64

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: i64) -> i64

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: i64) -> i64

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: i64) -> i64

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: i64) -> i64

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: i64) -> i64

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i64);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<u128>

source

pub fn fetch_add(&self, val: u128) -> u128

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: u128) -> u128

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: u128) -> u128

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: u128) -> u128

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: u128) -> u128

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: u128) -> u128

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: u128) -> u128

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_max(2), 7);
+assert_eq!(a.load(), 7);
+
source

pub fn fetch_min(&self, val: u128) -> u128

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7u128);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<i128>

source

pub fn fetch_add(&self, val: i128) -> i128

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: i128) -> i128

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: i128) -> i128

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: i128) -> i128

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: i128) -> i128

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: i128) -> i128

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: i128) -> i128

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_max(2), 7);
+assert_eq!(a.load(), 7);
+
source

pub fn fetch_min(&self, val: i128) -> i128

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7i128);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<usize>

source

pub fn fetch_add(&self, val: usize) -> usize

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: usize) -> usize

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: usize) -> usize

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: usize) -> usize

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: usize) -> usize

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: usize) -> usize

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: usize) -> usize

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: usize) -> usize

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7usize);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<isize>

source

pub fn fetch_add(&self, val: isize) -> isize

Increments the current value by val and returns the previous value.

+

The addition wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_add(3), 7);
+assert_eq!(a.load(), 10);
+
source

pub fn fetch_sub(&self, val: isize) -> isize

Decrements the current value by val and returns the previous value.

+

The subtraction wraps on overflow.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_sub(3), 7);
+assert_eq!(a.load(), 4);
+
source

pub fn fetch_and(&self, val: isize) -> isize

Applies bitwise “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_and(3), 7);
+assert_eq!(a.load(), 3);
+
source

pub fn fetch_nand(&self, val: isize) -> isize

Applies bitwise “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_nand(3), 7);
+assert_eq!(a.load(), !(7 & 3));
+
source

pub fn fetch_or(&self, val: isize) -> isize

Applies bitwise “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_or(16), 7);
+assert_eq!(a.load(), 23);
+
source

pub fn fetch_xor(&self, val: isize) -> isize

Applies bitwise “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_xor(2), 7);
+assert_eq!(a.load(), 5);
+
source

pub fn fetch_max(&self, val: isize) -> isize

Compares and sets the maximum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_max(9), 7);
+assert_eq!(a.load(), 9);
+
source

pub fn fetch_min(&self, val: isize) -> isize

Compares and sets the minimum of the current value and val, +and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(7isize);
+
+assert_eq!(a.fetch_min(2), 7);
+assert_eq!(a.load(), 2);
+
source§

impl AtomicCell<bool>

source

pub fn fetch_and(&self, val: bool) -> bool

Applies logical “and” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(true);
+
+assert_eq!(a.fetch_and(true), true);
+assert_eq!(a.load(), true);
+
+assert_eq!(a.fetch_and(false), true);
+assert_eq!(a.load(), false);
+
source

pub fn fetch_nand(&self, val: bool) -> bool

Applies logical “nand” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(true);
+
+assert_eq!(a.fetch_nand(false), true);
+assert_eq!(a.load(), true);
+
+assert_eq!(a.fetch_nand(true), true);
+assert_eq!(a.load(), false);
+
+assert_eq!(a.fetch_nand(false), false);
+assert_eq!(a.load(), true);
+
source

pub fn fetch_or(&self, val: bool) -> bool

Applies logical “or” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(false);
+
+assert_eq!(a.fetch_or(false), false);
+assert_eq!(a.load(), false);
+
+assert_eq!(a.fetch_or(true), false);
+assert_eq!(a.load(), true);
+
source

pub fn fetch_xor(&self, val: bool) -> bool

Applies logical “xor” to the current value and returns the previous value.

+
§Examples
+
use crossbeam_utils::atomic::AtomicCell;
+
+let a = AtomicCell::new(true);
+
+assert_eq!(a.fetch_xor(false), true);
+assert_eq!(a.load(), true);
+
+assert_eq!(a.fetch_xor(true), true);
+assert_eq!(a.load(), false);
+

Trait Implementations§

source§

impl<T: Copy + Debug> Debug for AtomicCell<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default> Default for AtomicCell<T>

source§

fn default() -> AtomicCell<T>

Returns the “default value” for a type. Read more
source§

impl<T> Drop for AtomicCell<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> From<T> for AtomicCell<T>

source§

fn from(val: T) -> AtomicCell<T>

Converts to this type from the input type.
source§

impl<T> RefUnwindSafe for AtomicCell<T>

source§

impl<T: Send> Send for AtomicCell<T>

source§

impl<T: Send> Sync for AtomicCell<T>

source§

impl<T> UnwindSafe for AtomicCell<T>

Auto Trait Implementations§

§

impl<T> !Freeze for AtomicCell<T>

§

impl<T> Unpin for AtomicCell<T>
where + T: Unpin,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/atomic/trait.AtomicConsume.html b/crossbeam_utils/atomic/trait.AtomicConsume.html new file mode 100644 index 0000000000..4596ed4d2f --- /dev/null +++ b/crossbeam_utils/atomic/trait.AtomicConsume.html @@ -0,0 +1,21 @@ +AtomicConsume in crossbeam_utils::atomic - Rust +
pub trait AtomicConsume {
+    type Val;
+
+    // Required method
+    fn load_consume(&self) -> Self::Val;
+}
Expand description

Trait which allows reading from primitive atomic types with “consume” ordering.

+

Required Associated Types§

source

type Val

Type returned by load_consume.

+

Required Methods§

source

fn load_consume(&self) -> Self::Val

Loads a value from the atomic using a “consume” memory ordering.

+

This is similar to the “acquire” ordering, except that an ordering is +only guaranteed with operations that “depend on” the result of the load. +However consume loads are usually much faster than acquire loads on +architectures with a weak memory model since they don’t require memory +fence instructions.

+

The exact definition of “depend on” is a bit vague, but it works as you +would expect in practice since a lot of software, especially the Linux +kernel, rely on this behavior.

+

This is currently only implemented on ARM and AArch64, where a fence +can be avoided. On other architectures this will fall back to a simple +load(Ordering::Acquire).

+

Implementations on Foreign Types§

source§

impl AtomicConsume for AtomicBool

§

type Val = bool

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicI8

§

type Val = i8

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicI16

§

type Val = i16

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicI32

§

type Val = i32

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicI64

§

type Val = i64

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicIsize

§

type Val = isize

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicU8

§

type Val = u8

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicU16

§

type Val = u16

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicU32

§

type Val = u32

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicU64

§

type Val = u64

source§

fn load_consume(&self) -> Self::Val

source§

impl AtomicConsume for AtomicUsize

§

type Val = usize

source§

fn load_consume(&self) -> Self::Val

source§

impl<T> AtomicConsume for AtomicPtr<T>

§

type Val = *mut T

source§

fn load_consume(&self) -> Self::Val

Implementors§

\ No newline at end of file diff --git a/crossbeam_utils/backoff/struct.Backoff.html b/crossbeam_utils/backoff/struct.Backoff.html new file mode 100644 index 0000000000..5beef8672e --- /dev/null +++ b/crossbeam_utils/backoff/struct.Backoff.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_utils/struct.Backoff.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/cache_padded/struct.CachePadded.html b/crossbeam_utils/cache_padded/struct.CachePadded.html new file mode 100644 index 0000000000..79cab99c9c --- /dev/null +++ b/crossbeam_utils/cache_padded/struct.CachePadded.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../crossbeam_utils/struct.CachePadded.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/index.html b/crossbeam_utils/index.html new file mode 100644 index 0000000000..a6b2fc4e33 --- /dev/null +++ b/crossbeam_utils/index.html @@ -0,0 +1,21 @@ +crossbeam_utils - Rust +

Crate crossbeam_utils

source ·
Expand description

Miscellaneous tools for concurrent programming.

+

§Atomics

+
    +
  • AtomicCell, a thread-safe mutable memory location.
  • +
  • AtomicConsume, for reading from primitive atomic types with “consume” ordering.
  • +
+

§Thread synchronization

+
    +
  • Parker, a thread parking primitive.
  • +
  • ShardedLock, a sharded reader-writer lock with fast concurrent reads.
  • +
  • WaitGroup, for synchronizing the beginning or end of some computation.
  • +
+

§Utilities

+
    +
  • Backoff, for exponential backoff in spin loops.
  • +
  • CachePadded, for padding and aligning a value to the length of a cache line.
  • +
  • scope, for spawning threads that borrow local variables from the stack.
  • +
+

Modules§

  • Atomic types.
  • Thread synchronization primitives.
  • Threads that can borrow variables from the stack.

Structs§

  • Performs exponential backoff in spin loops.
  • Pads and aligns a value to the length of a cache line.
\ No newline at end of file diff --git a/crossbeam_utils/sidebar-items.js b/crossbeam_utils/sidebar-items.js new file mode 100644 index 0000000000..8c79a483ba --- /dev/null +++ b/crossbeam_utils/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["atomic","sync","thread"],"struct":["Backoff","CachePadded"]}; \ No newline at end of file diff --git a/crossbeam_utils/struct.Backoff.html b/crossbeam_utils/struct.Backoff.html new file mode 100644 index 0000000000..ceeb2d620e --- /dev/null +++ b/crossbeam_utils/struct.Backoff.html @@ -0,0 +1,172 @@ +Backoff in crossbeam_utils - Rust +
pub struct Backoff { /* private fields */ }
Expand description

Performs exponential backoff in spin loops.

+

Backing off in spin loops reduces contention and improves overall performance.

+

This primitive can execute YIELD and PAUSE instructions, yield the current thread to the OS +scheduler, and tell when is a good time to block the thread using a different synchronization +mechanism. Each step of the back off procedure takes roughly twice as long as the previous +step.

+

§Examples

+

Backing off in a lock-free loop:

+ +
use crossbeam_utils::Backoff;
+use std::sync::atomic::AtomicUsize;
+use std::sync::atomic::Ordering::SeqCst;
+
+fn fetch_mul(a: &AtomicUsize, b: usize) -> usize {
+    let backoff = Backoff::new();
+    loop {
+        let val = a.load(SeqCst);
+        if a.compare_exchange(val, val.wrapping_mul(b), SeqCst, SeqCst).is_ok() {
+            return val;
+        }
+        backoff.spin();
+    }
+}
+

Waiting for an AtomicBool to become true:

+ +
use crossbeam_utils::Backoff;
+use std::sync::atomic::AtomicBool;
+use std::sync::atomic::Ordering::SeqCst;
+
+fn spin_wait(ready: &AtomicBool) {
+    let backoff = Backoff::new();
+    while !ready.load(SeqCst) {
+        backoff.snooze();
+    }
+}
+

Waiting for an AtomicBool to become true and parking the thread after a long wait. +Note that whoever sets the atomic variable to true must notify the parked thread by calling +unpark():

+ +
use crossbeam_utils::Backoff;
+use std::sync::atomic::AtomicBool;
+use std::sync::atomic::Ordering::SeqCst;
+use std::thread;
+
+fn blocking_wait(ready: &AtomicBool) {
+    let backoff = Backoff::new();
+    while !ready.load(SeqCst) {
+        if backoff.is_completed() {
+            thread::park();
+        } else {
+            backoff.snooze();
+        }
+    }
+}
+

Implementations§

source§

impl Backoff

source

pub fn new() -> Self

Creates a new Backoff.

+
§Examples
+
use crossbeam_utils::Backoff;
+
+let backoff = Backoff::new();
+
source

pub fn reset(&self)

Resets the Backoff.

+
§Examples
+
use crossbeam_utils::Backoff;
+
+let backoff = Backoff::new();
+backoff.reset();
+
source

pub fn spin(&self)

Backs off in a lock-free loop.

+

This method should be used when we need to retry an operation because another thread made +progress.

+

The processor may yield using the YIELD or PAUSE instruction.

+
§Examples
+

Backing off in a lock-free loop:

+ +
use crossbeam_utils::Backoff;
+use std::sync::atomic::AtomicUsize;
+use std::sync::atomic::Ordering::SeqCst;
+
+fn fetch_mul(a: &AtomicUsize, b: usize) -> usize {
+    let backoff = Backoff::new();
+    loop {
+        let val = a.load(SeqCst);
+        if a.compare_exchange(val, val.wrapping_mul(b), SeqCst, SeqCst).is_ok() {
+            return val;
+        }
+        backoff.spin();
+    }
+}
+
+let a = AtomicUsize::new(7);
+assert_eq!(fetch_mul(&a, 8), 7);
+assert_eq!(a.load(SeqCst), 56);
+
source

pub fn snooze(&self)

Backs off in a blocking loop.

+

This method should be used when we need to wait for another thread to make progress.

+

The processor may yield using the YIELD or PAUSE instruction and the current thread +may yield by giving up a timeslice to the OS scheduler.

+

In #[no_std] environments, this method is equivalent to spin.

+

If possible, use is_completed to check when it is advised to stop using backoff and +block the current thread using a different synchronization mechanism instead.

+
§Examples
+

Waiting for an AtomicBool to become true:

+ +
use crossbeam_utils::Backoff;
+use std::sync::Arc;
+use std::sync::atomic::AtomicBool;
+use std::sync::atomic::Ordering::SeqCst;
+use std::thread;
+use std::time::Duration;
+
+fn spin_wait(ready: &AtomicBool) {
+    let backoff = Backoff::new();
+    while !ready.load(SeqCst) {
+        backoff.snooze();
+    }
+}
+
+let ready = Arc::new(AtomicBool::new(false));
+let ready2 = ready.clone();
+
+thread::spawn(move || {
+    thread::sleep(Duration::from_millis(100));
+    ready2.store(true, SeqCst);
+});
+
+assert_eq!(ready.load(SeqCst), false);
+spin_wait(&ready);
+assert_eq!(ready.load(SeqCst), true);
+
source

pub fn is_completed(&self) -> bool

Returns true if exponential backoff has completed and blocking the thread is advised.

+
§Examples
+

Waiting for an AtomicBool to become true and parking the thread after a long wait:

+ +
use crossbeam_utils::Backoff;
+use std::sync::Arc;
+use std::sync::atomic::AtomicBool;
+use std::sync::atomic::Ordering::SeqCst;
+use std::thread;
+use std::time::Duration;
+
+fn blocking_wait(ready: &AtomicBool) {
+    let backoff = Backoff::new();
+    while !ready.load(SeqCst) {
+        if backoff.is_completed() {
+            thread::park();
+        } else {
+            backoff.snooze();
+        }
+    }
+}
+
+let ready = Arc::new(AtomicBool::new(false));
+let ready2 = ready.clone();
+let waiter = thread::current();
+
+thread::spawn(move || {
+    thread::sleep(Duration::from_millis(100));
+    ready2.store(true, SeqCst);
+    waiter.unpark();
+});
+
+assert_eq!(ready.load(SeqCst), false);
+blocking_wait(&ready);
+assert_eq!(ready.load(SeqCst), true);
+

Trait Implementations§

source§

impl Debug for Backoff

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Backoff

source§

fn default() -> Backoff

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/struct.CachePadded.html b/crossbeam_utils/struct.CachePadded.html new file mode 100644 index 0000000000..cd39bca7f6 --- /dev/null +++ b/crossbeam_utils/struct.CachePadded.html @@ -0,0 +1,80 @@ +CachePadded in crossbeam_utils - Rust +
#[repr(align(128))]
pub struct CachePadded<T> { /* private fields */ }
Expand description

Pads and aligns a value to the length of a cache line.

+

In concurrent programming, sometimes it is desirable to make sure commonly accessed pieces of +data are not placed into the same cache line. Updating an atomic value invalidates the whole +cache line it belongs to, which makes the next access to the same cache line slower for other +CPU cores. Use CachePadded to ensure updating one piece of data doesn’t invalidate other +cached data.

+

§Size and alignment

+

Cache lines are assumed to be N bytes long, depending on the architecture:

+
    +
  • On x86-64, aarch64, and powerpc64, N = 128.
  • +
  • On arm, mips, mips64, sparc, and hexagon, N = 32.
  • +
  • On m68k, N = 16.
  • +
  • On s390x, N = 256.
  • +
  • On all others, N = 64.
  • +
+

Note that N is just a reasonable guess and is not guaranteed to match the actual cache line +length of the machine the program is running on. On modern Intel architectures, spatial +prefetcher is pulling pairs of 64-byte cache lines at a time, so we pessimistically assume that +cache lines are 128 bytes long.

+

The size of CachePadded<T> is the smallest multiple of N bytes large enough to accommodate +a value of type T.

+

The alignment of CachePadded<T> is the maximum of N bytes and the alignment of T.

+

§Examples

+

Alignment and padding:

+ +
use crossbeam_utils::CachePadded;
+
+let array = [CachePadded::new(1i8), CachePadded::new(2i8)];
+let addr1 = &*array[0] as *const i8 as usize;
+let addr2 = &*array[1] as *const i8 as usize;
+
+assert!(addr2 - addr1 >= 32);
+assert_eq!(addr1 % 32, 0);
+assert_eq!(addr2 % 32, 0);
+

When building a concurrent queue with a head and a tail index, it is wise to place them in +different cache lines so that concurrent threads pushing and popping elements don’t invalidate +each other’s cache lines:

+ +
use crossbeam_utils::CachePadded;
+use std::sync::atomic::AtomicUsize;
+
+struct Queue<T> {
+    head: CachePadded<AtomicUsize>,
+    tail: CachePadded<AtomicUsize>,
+    buffer: *mut T,
+}
+

Implementations§

source§

impl<T> CachePadded<T>

source

pub const fn new(t: T) -> CachePadded<T>

Pads and aligns a value to the length of a cache line.

+
§Examples
+
use crossbeam_utils::CachePadded;
+
+let padded_value = CachePadded::new(1);
+
source

pub fn into_inner(self) -> T

Returns the inner value.

+
§Examples
+
use crossbeam_utils::CachePadded;
+
+let padded_value = CachePadded::new(7);
+let value = padded_value.into_inner();
+assert_eq!(value, 7);
+

Trait Implementations§

source§

impl<T: Clone> Clone for CachePadded<T>

source§

fn clone(&self) -> CachePadded<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for CachePadded<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default> Default for CachePadded<T>

source§

fn default() -> CachePadded<T>

Returns the “default value” for a type. Read more
source§

impl<T> Deref for CachePadded<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T> DerefMut for CachePadded<T>

source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
source§

impl<T: Display> Display for CachePadded<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> From<T> for CachePadded<T>

source§

fn from(t: T) -> Self

Converts to this type from the input type.
source§

impl<T: Hash> Hash for CachePadded<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: PartialEq> PartialEq for CachePadded<T>

source§

fn eq(&self, other: &CachePadded<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T: Copy> Copy for CachePadded<T>

source§

impl<T: Eq> Eq for CachePadded<T>

source§

impl<T: Send> Send for CachePadded<T>

source§

impl<T> StructuralPartialEq for CachePadded<T>

source§

impl<T: Sync> Sync for CachePadded<T>

Auto Trait Implementations§

§

impl<T> Freeze for CachePadded<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for CachePadded<T>
where + T: RefUnwindSafe,

§

impl<T> Unpin for CachePadded<T>
where + T: Unpin,

§

impl<T> UnwindSafe for CachePadded<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/sync/index.html b/crossbeam_utils/sync/index.html new file mode 100644 index 0000000000..1e7e859e8f --- /dev/null +++ b/crossbeam_utils/sync/index.html @@ -0,0 +1,8 @@ +crossbeam_utils::sync - Rust +

Module crossbeam_utils::sync

source ·
Expand description

Thread synchronization primitives.

+
    +
  • Parker, a thread parking primitive.
  • +
  • ShardedLock, a sharded reader-writer lock with fast concurrent reads.
  • +
  • WaitGroup, for synchronizing the beginning or end of some computation.
  • +
+

Structs§

\ No newline at end of file diff --git a/crossbeam_utils/sync/parker/struct.Parker.html b/crossbeam_utils/sync/parker/struct.Parker.html new file mode 100644 index 0000000000..9f8ac9dc45 --- /dev/null +++ b/crossbeam_utils/sync/parker/struct.Parker.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/sync/struct.Parker.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/sync/parker/struct.Unparker.html b/crossbeam_utils/sync/parker/struct.Unparker.html new file mode 100644 index 0000000000..1a5a89dc23 --- /dev/null +++ b/crossbeam_utils/sync/parker/struct.Unparker.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/sync/struct.Unparker.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/sync/sharded_lock/struct.ShardedLock.html b/crossbeam_utils/sync/sharded_lock/struct.ShardedLock.html new file mode 100644 index 0000000000..47d4d514d9 --- /dev/null +++ b/crossbeam_utils/sync/sharded_lock/struct.ShardedLock.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/sync/struct.ShardedLock.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/sync/sharded_lock/struct.ShardedLockReadGuard.html b/crossbeam_utils/sync/sharded_lock/struct.ShardedLockReadGuard.html new file mode 100644 index 0000000000..2452b4bb12 --- /dev/null +++ b/crossbeam_utils/sync/sharded_lock/struct.ShardedLockReadGuard.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/sync/struct.ShardedLockReadGuard.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/sync/sharded_lock/struct.ShardedLockWriteGuard.html b/crossbeam_utils/sync/sharded_lock/struct.ShardedLockWriteGuard.html new file mode 100644 index 0000000000..d4f47d0da8 --- /dev/null +++ b/crossbeam_utils/sync/sharded_lock/struct.ShardedLockWriteGuard.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/sync/struct.ShardedLockWriteGuard.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/sync/sidebar-items.js b/crossbeam_utils/sync/sidebar-items.js new file mode 100644 index 0000000000..9b3c710cd2 --- /dev/null +++ b/crossbeam_utils/sync/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Parker","ShardedLock","ShardedLockReadGuard","ShardedLockWriteGuard","Unparker","WaitGroup"]}; \ No newline at end of file diff --git a/crossbeam_utils/sync/struct.Parker.html b/crossbeam_utils/sync/struct.Parker.html new file mode 100644 index 0000000000..fd56e458b4 --- /dev/null +++ b/crossbeam_utils/sync/struct.Parker.html @@ -0,0 +1,114 @@ +Parker in crossbeam_utils::sync - Rust +
pub struct Parker { /* private fields */ }
Expand description

A thread parking primitive.

+

Conceptually, each Parker has an associated token which is initially not present:

+
    +
  • +

    The park method blocks the current thread unless or until the token is available, at +which point it automatically consumes the token.

    +
  • +
  • +

    The park_timeout and park_deadline methods work the same as park, but block for +a specified maximum time.

    +
  • +
  • +

    The unpark method atomically makes the token available if it wasn’t already. Because the +token is initially absent, unpark followed by park will result in the second call +returning immediately.

    +
  • +
+

In other words, each Parker acts a bit like a spinlock that can be locked and unlocked using +park and unpark.

+

§Examples

+
use std::thread;
+use std::time::Duration;
+use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+let u = p.unparker().clone();
+
+// Make the token available.
+u.unpark();
+// Wakes up immediately and consumes the token.
+p.park();
+
+thread::spawn(move || {
+    thread::sleep(Duration::from_millis(500));
+    u.unpark();
+});
+
+// Wakes up when `u.unpark()` provides the token.
+p.park();
+

Implementations§

source§

impl Parker

source

pub fn new() -> Parker

Creates a new Parker.

+
§Examples
+
use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+
source

pub fn park(&self)

Blocks the current thread until the token is made available.

+
§Examples
+
use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+let u = p.unparker().clone();
+
+// Make the token available.
+u.unpark();
+
+// Wakes up immediately and consumes the token.
+p.park();
+
source

pub fn park_timeout(&self, timeout: Duration)

Blocks the current thread until the token is made available, but only for a limited time.

+
§Examples
+
use std::time::Duration;
+use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+
+// Waits for the token to become available, but will not wait longer than 500 ms.
+p.park_timeout(Duration::from_millis(500));
+
source

pub fn park_deadline(&self, deadline: Instant)

Blocks the current thread until the token is made available, or until a certain deadline.

+
§Examples
+
use std::time::{Duration, Instant};
+use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+let deadline = Instant::now() + Duration::from_millis(500);
+
+// Waits for the token to become available, but will not wait longer than 500 ms.
+p.park_deadline(deadline);
+
source

pub fn unparker(&self) -> &Unparker

Returns a reference to an associated Unparker.

+

The returned Unparker doesn’t have to be used by reference - it can also be cloned.

+
§Examples
+
use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+let u = p.unparker().clone();
+
+// Make the token available.
+u.unpark();
+// Wakes up immediately and consumes the token.
+p.park();
+
source

pub fn into_raw(this: Parker) -> *const ()

Converts a Parker into a raw pointer.

+
§Examples
+
use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+let raw = Parker::into_raw(p);
+
source

pub unsafe fn from_raw(ptr: *const ()) -> Parker

Converts a raw pointer into a Parker.

+
§Safety
+

This method is safe to use only with pointers returned by Parker::into_raw.

+
§Examples
+
use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+let raw = Parker::into_raw(p);
+let p = unsafe { Parker::from_raw(raw) };
+

Trait Implementations§

source§

impl Debug for Parker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Parker

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Send for Parker

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/sync/struct.ShardedLock.html b/crossbeam_utils/sync/struct.ShardedLock.html new file mode 100644 index 0000000000..327c288dc3 --- /dev/null +++ b/crossbeam_utils/sync/struct.ShardedLock.html @@ -0,0 +1,172 @@ +ShardedLock in crossbeam_utils::sync - Rust +
pub struct ShardedLock<T: ?Sized> { /* private fields */ }
Expand description

A sharded reader-writer lock.

+

This lock is equivalent to RwLock, except read operations are faster and write operations +are slower.

+

A ShardedLock is internally made of a list of shards, each being a RwLock occupying a +single cache line. Read operations will pick one of the shards depending on the current thread +and lock it. Write operations need to lock all shards in succession.

+

By splitting the lock into shards, concurrent read operations will in most cases choose +different shards and thus update different cache lines, which is good for scalability. However, +write operations need to do more work and are therefore slower than usual.

+

The priority policy of the lock is dependent on the underlying operating system’s +implementation, and this type does not guarantee that any particular policy will be used.

+

§Poisoning

+

A ShardedLock, like RwLock, will become poisoned on a panic. Note that it may only be +poisoned if a panic occurs while a write operation is in progress. If a panic occurs in any +read operation, the lock will not be poisoned.

+

§Examples

+
use crossbeam_utils::sync::ShardedLock;
+
+let lock = ShardedLock::new(5);
+
+// Any number of read locks can be held at once.
+{
+    let r1 = lock.read().unwrap();
+    let r2 = lock.read().unwrap();
+    assert_eq!(*r1, 5);
+    assert_eq!(*r2, 5);
+} // Read locks are dropped at this point.
+
+// However, only one write lock may be held.
+{
+    let mut w = lock.write().unwrap();
+    *w += 1;
+    assert_eq!(*w, 6);
+} // Write lock is dropped here.
+

Implementations§

source§

impl<T> ShardedLock<T>

source

pub fn new(value: T) -> ShardedLock<T>

Creates a new sharded reader-writer lock.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+
+let lock = ShardedLock::new(5);
+
source

pub fn into_inner(self) -> LockResult<T>

Consumes this lock, returning the underlying data.

+
§Errors
+

This method will return an error if the lock is poisoned. A lock gets poisoned when a write +operation panics.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+
+let lock = ShardedLock::new(String::new());
+{
+    let mut s = lock.write().unwrap();
+    *s = "modified".to_owned();
+}
+assert_eq!(lock.into_inner().unwrap(), "modified");
+
source§

impl<T: ?Sized> ShardedLock<T>

source

pub fn is_poisoned(&self) -> bool

Returns true if the lock is poisoned.

+

If another thread can still access the lock, it may become poisoned at any time. A false +result should not be trusted without additional synchronization.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+use std::sync::Arc;
+use std::thread;
+
+let lock = Arc::new(ShardedLock::new(0));
+let c_lock = lock.clone();
+
+let _ = thread::spawn(move || {
+    let _lock = c_lock.write().unwrap();
+    panic!(); // the lock gets poisoned
+}).join();
+assert_eq!(lock.is_poisoned(), true);
+
source

pub fn get_mut(&mut self) -> LockResult<&mut T>

Returns a mutable reference to the underlying data.

+

Since this call borrows the lock mutably, no actual locking needs to take place.

+
§Errors
+

This method will return an error if the lock is poisoned. A lock gets poisoned when a write +operation panics.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+
+let mut lock = ShardedLock::new(0);
+*lock.get_mut().unwrap() = 10;
+assert_eq!(*lock.read().unwrap(), 10);
+
source

pub fn try_read(&self) -> TryLockResult<ShardedLockReadGuard<'_, T>>

Attempts to acquire this lock with shared read access.

+

If the access could not be granted at this time, an error is returned. Otherwise, a guard +is returned which will release the shared access when it is dropped. This method does not +provide any guarantees with respect to the ordering of whether contentious readers or +writers will acquire the lock first.

+
§Errors
+

This method will return an error if the lock is poisoned. A lock gets poisoned when a write +operation panics.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+
+let lock = ShardedLock::new(1);
+
+match lock.try_read() {
+    Ok(n) => assert_eq!(*n, 1),
+    Err(_) => unreachable!(),
+};
+
source

pub fn read(&self) -> LockResult<ShardedLockReadGuard<'_, T>>

Locks with shared read access, blocking the current thread until it can be acquired.

+

The calling thread will be blocked until there are no more writers which hold the lock. +There may be other readers currently inside the lock when this method returns. This method +does not provide any guarantees with respect to the ordering of whether contentious readers +or writers will acquire the lock first.

+

Returns a guard which will release the shared access when dropped.

+
§Errors
+

This method will return an error if the lock is poisoned. A lock gets poisoned when a write +operation panics.

+
§Panics
+

This method might panic when called if the lock is already held by the current thread.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+use std::sync::Arc;
+use std::thread;
+
+let lock = Arc::new(ShardedLock::new(1));
+let c_lock = lock.clone();
+
+let n = lock.read().unwrap();
+assert_eq!(*n, 1);
+
+thread::spawn(move || {
+    let r = c_lock.read();
+    assert!(r.is_ok());
+}).join().unwrap();
+
source

pub fn try_write(&self) -> TryLockResult<ShardedLockWriteGuard<'_, T>>

Attempts to acquire this lock with exclusive write access.

+

If the access could not be granted at this time, an error is returned. Otherwise, a guard +is returned which will release the exclusive access when it is dropped. This method does +not provide any guarantees with respect to the ordering of whether contentious readers or +writers will acquire the lock first.

+
§Errors
+

This method will return an error if the lock is poisoned. A lock gets poisoned when a write +operation panics.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+
+let lock = ShardedLock::new(1);
+
+let n = lock.read().unwrap();
+assert_eq!(*n, 1);
+
+assert!(lock.try_write().is_err());
+
source

pub fn write(&self) -> LockResult<ShardedLockWriteGuard<'_, T>>

Locks with exclusive write access, blocking the current thread until it can be acquired.

+

The calling thread will be blocked until there are no more writers which hold the lock. +There may be other readers currently inside the lock when this method returns. This method +does not provide any guarantees with respect to the ordering of whether contentious readers +or writers will acquire the lock first.

+

Returns a guard which will release the exclusive access when dropped.

+
§Errors
+

This method will return an error if the lock is poisoned. A lock gets poisoned when a write +operation panics.

+
§Panics
+

This method might panic when called if the lock is already held by the current thread.

+
§Examples
+
use crossbeam_utils::sync::ShardedLock;
+
+let lock = ShardedLock::new(1);
+
+let mut n = lock.write().unwrap();
+*n = 2;
+
+assert!(lock.try_read().is_err());
+

Trait Implementations§

source§

impl<T: ?Sized + Debug> Debug for ShardedLock<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default> Default for ShardedLock<T>

source§

fn default() -> ShardedLock<T>

Returns the “default value” for a type. Read more
source§

impl<T> From<T> for ShardedLock<T>

source§

fn from(t: T) -> Self

Converts to this type from the input type.
source§

impl<T: ?Sized> RefUnwindSafe for ShardedLock<T>

source§

impl<T: ?Sized + Send> Send for ShardedLock<T>

source§

impl<T: ?Sized + Send + Sync> Sync for ShardedLock<T>

source§

impl<T: ?Sized> UnwindSafe for ShardedLock<T>

Auto Trait Implementations§

§

impl<T> !Freeze for ShardedLock<T>

§

impl<T: ?Sized> Unpin for ShardedLock<T>
where + T: Unpin,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/sync/struct.ShardedLockReadGuard.html b/crossbeam_utils/sync/struct.ShardedLockReadGuard.html new file mode 100644 index 0000000000..2589c1ec13 --- /dev/null +++ b/crossbeam_utils/sync/struct.ShardedLockReadGuard.html @@ -0,0 +1,16 @@ +ShardedLockReadGuard in crossbeam_utils::sync - Rust +
pub struct ShardedLockReadGuard<'a, T: ?Sized> { /* private fields */ }
Expand description

A guard used to release the shared read access of a ShardedLock when dropped.

+

Trait Implementations§

source§

impl<T: Debug> Debug for ShardedLockReadGuard<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized> Deref for ShardedLockReadGuard<'_, T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T: ?Sized + Display> Display for ShardedLockReadGuard<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized + Sync> Sync for ShardedLockReadGuard<'_, T>

Auto Trait Implementations§

§

impl<'a, T: ?Sized> Freeze for ShardedLockReadGuard<'a, T>

§

impl<'a, T: ?Sized> RefUnwindSafe for ShardedLockReadGuard<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> !Send for ShardedLockReadGuard<'a, T>

§

impl<'a, T: ?Sized> Unpin for ShardedLockReadGuard<'a, T>

§

impl<'a, T: ?Sized> UnwindSafe for ShardedLockReadGuard<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/sync/struct.ShardedLockWriteGuard.html b/crossbeam_utils/sync/struct.ShardedLockWriteGuard.html new file mode 100644 index 0000000000..abcc9fef78 --- /dev/null +++ b/crossbeam_utils/sync/struct.ShardedLockWriteGuard.html @@ -0,0 +1,14 @@ +ShardedLockWriteGuard in crossbeam_utils::sync - Rust +
pub struct ShardedLockWriteGuard<'a, T: ?Sized> { /* private fields */ }
Expand description

A guard used to release the exclusive write access of a ShardedLock when dropped.

+

Trait Implementations§

source§

impl<T: Debug> Debug for ShardedLockWriteGuard<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized> Deref for ShardedLockWriteGuard<'_, T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T: ?Sized> DerefMut for ShardedLockWriteGuard<'_, T>

source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
source§

impl<T: ?Sized + Display> Display for ShardedLockWriteGuard<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ?Sized> Drop for ShardedLockWriteGuard<'_, T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T: ?Sized + Sync> Sync for ShardedLockWriteGuard<'_, T>

Auto Trait Implementations§

§

impl<'a, T: ?Sized> Freeze for ShardedLockWriteGuard<'a, T>

§

impl<'a, T: ?Sized> RefUnwindSafe for ShardedLockWriteGuard<'a, T>

§

impl<'a, T> !Send for ShardedLockWriteGuard<'a, T>

§

impl<'a, T: ?Sized> Unpin for ShardedLockWriteGuard<'a, T>

§

impl<'a, T: ?Sized> UnwindSafe for ShardedLockWriteGuard<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/sync/struct.Unparker.html b/crossbeam_utils/sync/struct.Unparker.html new file mode 100644 index 0000000000..e6c6ae89b8 --- /dev/null +++ b/crossbeam_utils/sync/struct.Unparker.html @@ -0,0 +1,50 @@ +Unparker in crossbeam_utils::sync - Rust +
pub struct Unparker { /* private fields */ }
Expand description

Unparks a thread parked by the associated Parker.

+

Implementations§

source§

impl Unparker

source

pub fn unpark(&self)

Atomically makes the token available if it is not already.

+

This method will wake up the thread blocked on park or park_timeout, if there is +any.

+
§Examples
+
use std::thread;
+use std::time::Duration;
+use crossbeam_utils::sync::Parker;
+
+let p = Parker::new();
+let u = p.unparker().clone();
+
+thread::spawn(move || {
+    thread::sleep(Duration::from_millis(500));
+    u.unpark();
+});
+
+// Wakes up when `u.unpark()` provides the token.
+p.park();
+
source

pub fn into_raw(this: Unparker) -> *const ()

Converts an Unparker into a raw pointer.

+
§Examples
+
use crossbeam_utils::sync::{Parker, Unparker};
+
+let p = Parker::new();
+let u = p.unparker().clone();
+let raw = Unparker::into_raw(u);
+
source

pub unsafe fn from_raw(ptr: *const ()) -> Unparker

Converts a raw pointer into an Unparker.

+
§Safety
+

This method is safe to use only with pointers returned by Unparker::into_raw.

+
§Examples
+
use crossbeam_utils::sync::{Parker, Unparker};
+
+let p = Parker::new();
+let u = p.unparker().clone();
+
+let raw = Unparker::into_raw(u);
+let u = unsafe { Unparker::from_raw(raw) };
+

Trait Implementations§

source§

impl Clone for Unparker

source§

fn clone(&self) -> Unparker

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Unparker

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Send for Unparker

source§

impl Sync for Unparker

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/sync/struct.WaitGroup.html b/crossbeam_utils/sync/struct.WaitGroup.html new file mode 100644 index 0000000000..2c1541f0df --- /dev/null +++ b/crossbeam_utils/sync/struct.WaitGroup.html @@ -0,0 +1,73 @@ +WaitGroup in crossbeam_utils::sync - Rust +
pub struct WaitGroup { /* private fields */ }
Expand description

Enables threads to synchronize the beginning or end of some computation.

+

§Wait groups vs barriers

+

WaitGroup is very similar to Barrier, but there are a few differences:

+
    +
  • +

    Barrier needs to know the number of threads at construction, while WaitGroup is cloned to +register more threads.

    +
  • +
  • +

    A Barrier can be reused even after all threads have synchronized, while a WaitGroup +synchronizes threads only once.

    +
  • +
  • +

    All threads wait for others to reach the Barrier. With WaitGroup, each thread can choose +to either wait for other threads or to continue without blocking.

    +
  • +
+

§Examples

+
use crossbeam_utils::sync::WaitGroup;
+use std::thread;
+
+// Create a new wait group.
+let wg = WaitGroup::new();
+
+for _ in 0..4 {
+    // Create another reference to the wait group.
+    let wg = wg.clone();
+
+    thread::spawn(move || {
+        // Do some work.
+
+        // Drop the reference to the wait group.
+        drop(wg);
+    });
+}
+
+// Block until all threads have finished their work.
+wg.wait();
+

Implementations§

source§

impl WaitGroup

source

pub fn new() -> Self

Creates a new wait group and returns the single reference to it.

+
§Examples
+
use crossbeam_utils::sync::WaitGroup;
+
+let wg = WaitGroup::new();
+
source

pub fn wait(self)

Drops this reference and waits until all other references are dropped.

+
§Examples
+
use crossbeam_utils::sync::WaitGroup;
+use std::thread;
+
+let wg = WaitGroup::new();
+
+thread::spawn({
+    let wg = wg.clone();
+    move || {
+        // Block until both threads have reached `wait()`.
+        wg.wait();
+    }
+});
+
+// Block until both threads have reached `wait()`.
+wg.wait();
+

Trait Implementations§

source§

impl Clone for WaitGroup

source§

fn clone(&self) -> WaitGroup

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WaitGroup

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WaitGroup

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Drop for WaitGroup

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/sync/wait_group/struct.WaitGroup.html b/crossbeam_utils/sync/wait_group/struct.WaitGroup.html new file mode 100644 index 0000000000..27cad10fdb --- /dev/null +++ b/crossbeam_utils/sync/wait_group/struct.WaitGroup.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../crossbeam_utils/sync/struct.WaitGroup.html...

+ + + \ No newline at end of file diff --git a/crossbeam_utils/thread/fn.scope.html b/crossbeam_utils/thread/fn.scope.html new file mode 100644 index 0000000000..5f93a279f2 --- /dev/null +++ b/crossbeam_utils/thread/fn.scope.html @@ -0,0 +1,20 @@ +scope in crossbeam_utils::thread - Rust +

Function crossbeam_utils::thread::scope

source ·
pub fn scope<'env, F, R>(f: F) -> Result<R>
where + F: FnOnce(&Scope<'env>) -> R,
Expand description

Creates a new scope for spawning threads.

+

All child threads that haven’t been manually joined will be automatically joined just before +this function invocation ends. If all joined threads have successfully completed, Ok is +returned with the return value of f. If any of the joined threads has panicked, an Err is +returned containing errors from panicked threads. Note that if panics are implemented by +aborting the process, no error is returned; see the notes of std::panic::catch_unwind.

+

Note: Since Rust 1.63, this function is soft-deprecated in favor of the more efficient std::thread::scope.

+

§Examples

+
use crossbeam_utils::thread;
+
+let var = vec![1, 2, 3];
+
+thread::scope(|s| {
+    s.spawn(|_| {
+        println!("A child thread borrowing `var`: {:?}", var);
+    });
+}).unwrap();
+
\ No newline at end of file diff --git a/crossbeam_utils/thread/index.html b/crossbeam_utils/thread/index.html new file mode 100644 index 0000000000..2e70740219 --- /dev/null +++ b/crossbeam_utils/thread/index.html @@ -0,0 +1,92 @@ +crossbeam_utils::thread - Rust +

Module crossbeam_utils::thread

source ·
Expand description

Threads that can borrow variables from the stack.

+

Create a scope when spawned threads need to access variables on the stack:

+ +
use crossbeam_utils::thread;
+
+let people = vec![
+    "Alice".to_string(),
+    "Bob".to_string(),
+    "Carol".to_string(),
+];
+
+thread::scope(|s| {
+    for person in &people {
+        s.spawn(move |_| {
+            println!("Hello, {}!", person);
+        });
+    }
+}).unwrap();
+

§Why scoped threads?

+

Suppose we wanted to re-write the previous example using plain threads:

+ +
use std::thread;
+
+let people = vec![
+    "Alice".to_string(),
+    "Bob".to_string(),
+    "Carol".to_string(),
+];
+
+let mut threads = Vec::new();
+
+for person in &people {
+    threads.push(thread::spawn(move || {
+        println!("Hello, {}!", person);
+    }));
+}
+
+for thread in threads {
+    thread.join().unwrap();
+}
+

This doesn’t work because the borrow checker complains about people not living long enough:

+
error[E0597]: `people` does not live long enough
+  --> src/main.rs:12:20
+   |
+12 |     for person in &people {
+   |                    ^^^^^^ borrowed value does not live long enough
+...
+21 | }
+   | - borrowed value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+

The problem here is that spawned threads are not allowed to borrow variables on stack because +the compiler cannot prove they will be joined before people is destroyed.

+

Scoped threads are a mechanism to guarantee to the compiler that spawned threads will be joined +before the scope ends.

+

§How scoped threads work

+

If a variable is borrowed by a thread, the thread must complete before the variable is +destroyed. Threads spawned using std::thread::spawn can only borrow variables with the +'static lifetime because the borrow checker cannot be sure when the thread will complete.

+

A scope creates a clear boundary between variables outside the scope and threads inside the +scope. Whenever a scope spawns a thread, it promises to join the thread before the scope ends. +This way we guarantee to the borrow checker that scoped threads only live within the scope and +can safely access variables outside it.

+

§Nesting scoped threads

+

Sometimes scoped threads need to spawn more threads within the same scope. This is a little +tricky because argument s lives inside the invocation of thread::scope() and as such +cannot be borrowed by scoped threads:

+ +
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    s.spawn(|_| {
+        // Not going to compile because we're trying to borrow `s`,
+        // which lives *inside* the scope! :(
+        s.spawn(|_| println!("nested thread"));
+    });
+});
+

Fortunately, there is a solution. Every scoped thread is passed a reference to its scope as an +argument, which can be used for spawning nested threads:

+ +
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    // Note the `|s|` here.
+    s.spawn(|s| {
+        // Yay, this works because we're using a fresh argument `s`! :)
+        s.spawn(|_| println!("nested thread"));
+    });
+}).unwrap();
+

Structs§

Functions§

  • Creates a new scope for spawning threads.
\ No newline at end of file diff --git a/crossbeam_utils/thread/sidebar-items.js b/crossbeam_utils/thread/sidebar-items.js new file mode 100644 index 0000000000..b8b06bf2a1 --- /dev/null +++ b/crossbeam_utils/thread/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["scope"],"struct":["Scope","ScopedJoinHandle","ScopedThreadBuilder"]}; \ No newline at end of file diff --git a/crossbeam_utils/thread/struct.Scope.html b/crossbeam_utils/thread/struct.Scope.html new file mode 100644 index 0000000000..baf8ce747e --- /dev/null +++ b/crossbeam_utils/thread/struct.Scope.html @@ -0,0 +1,50 @@ +Scope in crossbeam_utils::thread - Rust +
pub struct Scope<'env> { /* private fields */ }
Expand description

A scope for spawning threads.

+

Implementations§

source§

impl<'env> Scope<'env>

source

pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
where + F: FnOnce(&Scope<'env>) -> T + Send + 'env, + T: Send + 'env,

Spawns a scoped thread.

+

This method is similar to the spawn function in Rust’s standard library. The difference +is that this thread is scoped, meaning it’s guaranteed to terminate before the scope exits, +allowing it to reference variables outside the scope.

+

The scoped thread is passed a reference to this scope as an argument, which can be used for +spawning nested threads.

+

The returned handle can be used to manually +join the thread before the scope exits.

+

This will create a thread using default parameters of ScopedThreadBuilder, if you want to specify the +stack size or the name of the thread, use this API instead.

+
§Panics
+

Panics if the OS fails to create a thread; use ScopedThreadBuilder::spawn +to recover from such errors.

+
§Examples
+
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    let handle = s.spawn(|_| {
+        println!("A child thread is running");
+        42
+    });
+
+    // Join the thread and retrieve its result.
+    let res = handle.join().unwrap();
+    assert_eq!(res, 42);
+}).unwrap();
+
source

pub fn builder<'scope>(&'scope self) -> ScopedThreadBuilder<'scope, 'env>

Creates a builder that can configure a thread before spawning.

+
§Examples
+
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    s.builder()
+        .spawn(|_| println!("A child thread is running"))
+        .unwrap();
+}).unwrap();
+

Trait Implementations§

source§

impl Debug for Scope<'_>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Sync for Scope<'_>

Auto Trait Implementations§

§

impl<'env> Freeze for Scope<'env>

§

impl<'env> RefUnwindSafe for Scope<'env>

§

impl<'env> Send for Scope<'env>

§

impl<'env> Unpin for Scope<'env>

§

impl<'env> !UnwindSafe for Scope<'env>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/thread/struct.ScopedJoinHandle.html b/crossbeam_utils/thread/struct.ScopedJoinHandle.html new file mode 100644 index 0000000000..8292c3e59c --- /dev/null +++ b/crossbeam_utils/thread/struct.ScopedJoinHandle.html @@ -0,0 +1,44 @@ +ScopedJoinHandle in crossbeam_utils::thread - Rust +
pub struct ScopedJoinHandle<'scope, T> { /* private fields */ }
Expand description

A handle that can be used to join its scoped thread.

+

This struct is created by the Scope::spawn method and the +ScopedThreadBuilder::spawn method.

+

Implementations§

source§

impl<T> ScopedJoinHandle<'_, T>

source

pub fn join(self) -> Result<T>

Waits for the thread to finish and returns its result.

+

If the child thread panics, an error is returned. Note that if panics are implemented by +aborting the process, no error is returned; see the notes of std::panic::catch_unwind.

+
§Panics
+

This function may panic on some platforms if a thread attempts to join itself or otherwise +may create a deadlock with joining threads.

+
§Examples
+
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    let handle1 = s.spawn(|_| println!("I'm a happy thread :)"));
+    let handle2 = s.spawn(|_| panic!("I'm a sad thread :("));
+
+    // Join the first thread and verify that it succeeded.
+    let res = handle1.join();
+    assert!(res.is_ok());
+
+    // Join the second thread and verify that it panicked.
+    let res = handle2.join();
+    assert!(res.is_err());
+}).unwrap();
+
source

pub fn thread(&self) -> &Thread

Returns a handle to the underlying thread.

+
§Examples
+
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    let handle = s.spawn(|_| println!("A child thread is running"));
+    println!("The child thread ID: {:?}", handle.thread().id());
+}).unwrap();
+

Trait Implementations§

source§

impl<T> Debug for ScopedJoinHandle<'_, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> JoinHandleExt for ScopedJoinHandle<'_, T>

source§

fn as_pthread_t(&self) -> RawPthread

Extracts the raw pthread_t without taking ownership
source§

fn into_pthread_t(self) -> RawPthread

Consumes the thread, returning the raw pthread_t Read more
source§

impl<T> Send for ScopedJoinHandle<'_, T>

source§

impl<T> Sync for ScopedJoinHandle<'_, T>

Auto Trait Implementations§

§

impl<'scope, T> Freeze for ScopedJoinHandle<'scope, T>

§

impl<'scope, T> RefUnwindSafe for ScopedJoinHandle<'scope, T>

§

impl<'scope, T> Unpin for ScopedJoinHandle<'scope, T>

§

impl<'scope, T> UnwindSafe for ScopedJoinHandle<'scope, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/crossbeam_utils/thread/struct.ScopedThreadBuilder.html b/crossbeam_utils/thread/struct.ScopedThreadBuilder.html new file mode 100644 index 0000000000..676e3825e3 --- /dev/null +++ b/crossbeam_utils/thread/struct.ScopedThreadBuilder.html @@ -0,0 +1,83 @@ +ScopedThreadBuilder in crossbeam_utils::thread - Rust +
pub struct ScopedThreadBuilder<'scope, 'env> { /* private fields */ }
Expand description

Configures the properties of a new thread.

+

The two configurable properties are:

+ +

The spawn method will take ownership of the builder and return an io::Result of the +thread handle with the given configuration.

+

The Scope::spawn method uses a builder with default configuration and unwraps its return +value. You may want to use this builder when you want to recover from a failure to launch a +thread.

+

§Examples

+
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    s.builder()
+        .spawn(|_| println!("Running a child thread"))
+        .unwrap();
+}).unwrap();
+

Implementations§

source§

impl<'scope, 'env> ScopedThreadBuilder<'scope, 'env>

source

pub fn name(self, name: String) -> ScopedThreadBuilder<'scope, 'env>

Sets the name for the new thread.

+

The name must not contain null bytes (\0).

+

For more information about named threads, see here.

+
§Examples
+
use crossbeam_utils::thread;
+use std::thread::current;
+
+thread::scope(|s| {
+    s.builder()
+        .name("my thread".to_string())
+        .spawn(|_| assert_eq!(current().name(), Some("my thread")))
+        .unwrap();
+}).unwrap();
+
source

pub fn stack_size(self, size: usize) -> ScopedThreadBuilder<'scope, 'env>

Sets the size of the stack for the new thread.

+

The stack size is measured in bytes.

+

For more information about the stack size for threads, see here.

+
§Examples
+
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    s.builder()
+        .stack_size(32 * 1024)
+        .spawn(|_| println!("Running a child thread"))
+        .unwrap();
+}).unwrap();
+
source

pub fn spawn<F, T>(self, f: F) -> Result<ScopedJoinHandle<'scope, T>>
where + F: FnOnce(&Scope<'env>) -> T + Send + 'env, + T: Send + 'env,

Spawns a scoped thread with this configuration.

+

The scoped thread is passed a reference to this scope as an argument, which can be used for +spawning nested threads.

+

The returned handle can be used to manually join the thread before the scope exits.

+
§Errors
+

Unlike the Scope::spawn method, this method yields an +io::Result to capture any failure to create the thread at +the OS level.

+
§Panics
+

Panics if a thread name was set and it contained null bytes.

+
§Examples
+
use crossbeam_utils::thread;
+
+thread::scope(|s| {
+    let handle = s.builder()
+        .spawn(|_| {
+            println!("A child thread is running");
+            42
+        })
+        .unwrap();
+
+    // Join the thread and retrieve its result.
+    let res = handle.join().unwrap();
+    assert_eq!(res, 42);
+}).unwrap();
+

Trait Implementations§

source§

impl<'scope, 'env> Debug for ScopedThreadBuilder<'scope, 'env>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'scope, 'env> Freeze for ScopedThreadBuilder<'scope, 'env>

§

impl<'scope, 'env> RefUnwindSafe for ScopedThreadBuilder<'scope, 'env>

§

impl<'scope, 'env> Send for ScopedThreadBuilder<'scope, 'env>

§

impl<'scope, 'env> Sync for ScopedThreadBuilder<'scope, 'env>

§

impl<'scope, 'env> Unpin for ScopedThreadBuilder<'scope, 'env>

§

impl<'scope, 'env> UnwindSafe for ScopedThreadBuilder<'scope, 'env>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/either/all.html b/either/all.html new file mode 100644 index 0000000000..ec9fd395c8 --- /dev/null +++ b/either/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Traits

Macros

\ No newline at end of file diff --git a/either/enum.Either.html b/either/enum.Either.html new file mode 100644 index 0000000000..c37c5bf97a --- /dev/null +++ b/either/enum.Either.html @@ -0,0 +1,706 @@ +Either in either - Rust +

Enum either::Either

source ·
pub enum Either<L, R> {
+    Left(L),
+    Right(R),
+}
Expand description

The enum Either with variants Left and Right is a general purpose +sum type with two cases.

+

The Either type is symmetric and treats its variants the same way, without +preference. +(For representing success or error, use the regular Result enum instead.)

+

Variants§

§

Left(L)

A value of type L.

+
§

Right(R)

A value of type R.

+

Implementations§

source§

impl<L, R> Either<L, R>

source

pub fn is_left(&self) -> bool

Return true if the value is the Left variant.

+ +
use either::*;
+
+let values = [Left(1), Right("the right value")];
+assert_eq!(values[0].is_left(), true);
+assert_eq!(values[1].is_left(), false);
+
source

pub fn is_right(&self) -> bool

Return true if the value is the Right variant.

+ +
use either::*;
+
+let values = [Left(1), Right("the right value")];
+assert_eq!(values[0].is_right(), false);
+assert_eq!(values[1].is_right(), true);
+
source

pub fn left(self) -> Option<L>

Convert the left side of Either<L, R> to an Option<L>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left("some value");
+assert_eq!(left.left(),  Some("some value"));
+
+let right: Either<(), _> = Right(321);
+assert_eq!(right.left(), None);
+
source

pub fn right(self) -> Option<R>

Convert the right side of Either<L, R> to an Option<R>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left("some value");
+assert_eq!(left.right(),  None);
+
+let right: Either<(), _> = Right(321);
+assert_eq!(right.right(), Some(321));
+
source

pub fn as_ref(&self) -> Either<&L, &R>

Convert &Either<L, R> to Either<&L, &R>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left("some value");
+assert_eq!(left.as_ref(), Left(&"some value"));
+
+let right: Either<(), _> = Right("some value");
+assert_eq!(right.as_ref(), Right(&"some value"));
+
source

pub fn as_mut(&mut self) -> Either<&mut L, &mut R>

Convert &mut Either<L, R> to Either<&mut L, &mut R>.

+ +
use either::*;
+
+fn mutate_left(value: &mut Either<u32, u32>) {
+    if let Some(l) = value.as_mut().left() {
+        *l = 999;
+    }
+}
+
+let mut left = Left(123);
+let mut right = Right(123);
+mutate_left(&mut left);
+mutate_left(&mut right);
+assert_eq!(left, Left(999));
+assert_eq!(right, Right(123));
+
source

pub fn as_pin_ref(self: Pin<&Self>) -> Either<Pin<&L>, Pin<&R>>

Convert Pin<&Either<L, R>> to Either<Pin<&L>, Pin<&R>>, +pinned projections of the inner variants.

+
source

pub fn as_pin_mut(self: Pin<&mut Self>) -> Either<Pin<&mut L>, Pin<&mut R>>

Convert Pin<&mut Either<L, R>> to Either<Pin<&mut L>, Pin<&mut R>>, +pinned projections of the inner variants.

+
source

pub fn flip(self) -> Either<R, L>

Convert Either<L, R> to Either<R, L>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left(123);
+assert_eq!(left.flip(), Right(123));
+
+let right: Either<(), _> = Right("some value");
+assert_eq!(right.flip(), Left("some value"));
+
source

pub fn map_left<F, M>(self, f: F) -> Either<M, R>
where + F: FnOnce(L) -> M,

Apply the function f on the value in the Left variant if it is present rewrapping the +result in Left.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.map_left(|x| x * 2), Left(246));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.map_left(|x| x * 2), Right(123));
+
source

pub fn map_right<F, S>(self, f: F) -> Either<L, S>
where + F: FnOnce(R) -> S,

Apply the function f on the value in the Right variant if it is present rewrapping the +result in Right.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.map_right(|x| x * 2), Left(123));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.map_right(|x| x * 2), Right(246));
+
source

pub fn map_either<F, G, M, S>(self, f: F, g: G) -> Either<M, S>
where + F: FnOnce(L) -> M, + G: FnOnce(R) -> S,

Apply the functions f and g to the Left and Right variants +respectively. This is equivalent to +bimap +in functional programming.

+ +
use either::*;
+
+let f = |s: String| s.len();
+let g = |u: u8| u.to_string();
+
+let left: Either<String, u8> = Left("loopy".into());
+assert_eq!(left.map_either(f, g), Left(5));
+
+let right: Either<String, u8> = Right(42);
+assert_eq!(right.map_either(f, g), Right("42".into()));
+
source

pub fn map_either_with<Ctx, F, G, M, S>( + self, + ctx: Ctx, + f: F, + g: G +) -> Either<M, S>
where + F: FnOnce(Ctx, L) -> M, + G: FnOnce(Ctx, R) -> S,

Similar to map_either, with an added context ctx accessible to +both functions.

+ +
use either::*;
+
+let mut sum = 0;
+
+// Both closures want to update the same value, so pass it as context.
+let mut f = |sum: &mut usize, s: String| { *sum += s.len(); s.to_uppercase() };
+let mut g = |sum: &mut usize, u: usize| { *sum += u; u.to_string() };
+
+let left: Either<String, usize> = Left("loopy".into());
+assert_eq!(left.map_either_with(&mut sum, &mut f, &mut g), Left("LOOPY".into()));
+
+let right: Either<String, usize> = Right(42);
+assert_eq!(right.map_either_with(&mut sum, &mut f, &mut g), Right("42".into()));
+
+assert_eq!(sum, 47);
+
source

pub fn either<F, G, T>(self, f: F, g: G) -> T
where + F: FnOnce(L) -> T, + G: FnOnce(R) -> T,

Apply one of two functions depending on contents, unifying their result. If the value is +Left(L) then the first function f is applied; if it is Right(R) then the second +function g is applied.

+ +
use either::*;
+
+fn square(n: u32) -> i32 { (n * n) as i32 }
+fn negate(n: i32) -> i32 { -n }
+
+let left: Either<u32, i32> = Left(4);
+assert_eq!(left.either(square, negate), 16);
+
+let right: Either<u32, i32> = Right(-4);
+assert_eq!(right.either(square, negate), 4);
+
source

pub fn either_with<Ctx, F, G, T>(self, ctx: Ctx, f: F, g: G) -> T
where + F: FnOnce(Ctx, L) -> T, + G: FnOnce(Ctx, R) -> T,

Like either, but provide some context to whichever of the +functions ends up being called.

+ +
// In this example, the context is a mutable reference
+use either::*;
+
+let mut result = Vec::new();
+
+let values = vec![Left(2), Right(2.7)];
+
+for value in values {
+    value.either_with(&mut result,
+                      |ctx, integer| ctx.push(integer),
+                      |ctx, real| ctx.push(f64::round(real) as i32));
+}
+
+assert_eq!(result, vec![2, 3]);
+
source

pub fn left_and_then<F, S>(self, f: F) -> Either<S, R>
where + F: FnOnce(L) -> Either<S, R>,

Apply the function f on the value in the Left variant if it is present.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.left_and_then::<_,()>(|x| Right(x * 2)), Right(246));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.left_and_then(|x| Right::<(), _>(x * 2)), Right(123));
+
source

pub fn right_and_then<F, S>(self, f: F) -> Either<L, S>
where + F: FnOnce(R) -> Either<L, S>,

Apply the function f on the value in the Right variant if it is present.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.right_and_then(|x| Right(x * 2)), Left(123));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.right_and_then(|x| Right(x * 2)), Right(246));
+
source

pub fn into_iter(self) -> Either<L::IntoIter, R::IntoIter>
where + L: IntoIterator, + R: IntoIterator<Item = L::Item>,

Convert the inner value to an iterator.

+

This requires the Left and Right iterators to have the same item type. +See factor_into_iter to iterate different types.

+ +
use either::*;
+
+let left: Either<_, Vec<u32>> = Left(vec![1, 2, 3, 4, 5]);
+let mut right: Either<Vec<u32>, _> = Right(vec![]);
+right.extend(left.into_iter());
+assert_eq!(right, Right(vec![1, 2, 3, 4, 5]));
+
source

pub fn iter( + &self +) -> Either<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter>
where + for<'a> &'a L: IntoIterator, + for<'a> &'a R: IntoIterator<Item = <&'a L as IntoIterator>::Item>,

Borrow the inner value as an iterator.

+

This requires the Left and Right iterators to have the same item type. +See factor_iter to iterate different types.

+ +
use either::*;
+
+let left: Either<_, &[u32]> = Left(vec![2, 3]);
+let mut right: Either<Vec<u32>, _> = Right(&[4, 5][..]);
+let mut all = vec![1];
+all.extend(left.iter());
+all.extend(right.iter());
+assert_eq!(all, vec![1, 2, 3, 4, 5]);
+
source

pub fn iter_mut( + &mut self +) -> Either<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter>
where + for<'a> &'a mut L: IntoIterator, + for<'a> &'a mut R: IntoIterator<Item = <&'a mut L as IntoIterator>::Item>,

Mutably borrow the inner value as an iterator.

+

This requires the Left and Right iterators to have the same item type. +See factor_iter_mut to iterate different types.

+ +
use either::*;
+
+let mut left: Either<_, &mut [u32]> = Left(vec![2, 3]);
+for l in left.iter_mut() {
+    *l *= *l
+}
+assert_eq!(left, Left(vec![4, 9]));
+
+let mut inner = [4, 5];
+let mut right: Either<Vec<u32>, _> = Right(&mut inner[..]);
+for r in right.iter_mut() {
+    *r *= *r
+}
+assert_eq!(inner, [16, 25]);
+
source

pub fn factor_into_iter(self) -> IterEither<L::IntoIter, R::IntoIter>
where + L: IntoIterator, + R: IntoIterator,

Converts an Either of Iterators to be an Iterator of Eithers

+

Unlike into_iter, this does not require the +Left and Right iterators to have the same item type.

+ +
use either::*;
+let left: Either<_, Vec<u8>> = Left(&["hello"]);
+assert_eq!(left.factor_into_iter().next(), Some(Left(&"hello")));
+let right: Either<&[&str], _> = Right(vec![0, 1]);
+assert_eq!(right.factor_into_iter().collect::<Vec<_>>(), vec![Right(0), Right(1)]);
+
+
source

pub fn factor_iter( + &self +) -> IterEither<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter>
where + for<'a> &'a L: IntoIterator, + for<'a> &'a R: IntoIterator,

Borrows an Either of Iterators to be an Iterator of Eithers

+

Unlike iter, this does not require the +Left and Right iterators to have the same item type.

+ +
use either::*;
+let left: Either<_, Vec<u8>> = Left(["hello"]);
+assert_eq!(left.factor_iter().next(), Some(Left(&"hello")));
+let right: Either<[&str; 2], _> = Right(vec![0, 1]);
+assert_eq!(right.factor_iter().collect::<Vec<_>>(), vec![Right(&0), Right(&1)]);
+
+
source

pub fn factor_iter_mut( + &mut self +) -> IterEither<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter>
where + for<'a> &'a mut L: IntoIterator, + for<'a> &'a mut R: IntoIterator,

Mutably borrows an Either of Iterators to be an Iterator of Eithers

+

Unlike iter_mut, this does not require the +Left and Right iterators to have the same item type.

+ +
use either::*;
+let mut left: Either<_, Vec<u8>> = Left(["hello"]);
+left.factor_iter_mut().for_each(|x| *x.unwrap_left() = "goodbye");
+assert_eq!(left, Left(["goodbye"]));
+let mut right: Either<[&str; 2], _> = Right(vec![0, 1, 2]);
+right.factor_iter_mut().for_each(|x| if let Right(r) = x { *r = -*r; });
+assert_eq!(right, Right(vec![0, -1, -2]));
+
+
source

pub fn left_or(self, other: L) -> L

Return left value or given value

+

Arguments passed to left_or are eagerly evaluated; if you are passing +the result of a function call, it is recommended to use +left_or_else, which is lazily evaluated.

+
§Examples
+
let left: Either<&str, &str> = Left("left");
+assert_eq!(left.left_or("foo"), "left");
+
+let right: Either<&str, &str> = Right("right");
+assert_eq!(right.left_or("left"), "left");
+
source

pub fn left_or_default(self) -> L
where + L: Default,

Return left or a default

+
§Examples
+
let left: Either<String, u32> = Left("left".to_string());
+assert_eq!(left.left_or_default(), "left");
+
+let right: Either<String, u32> = Right(42);
+assert_eq!(right.left_or_default(), String::default());
+
source

pub fn left_or_else<F>(self, f: F) -> L
where + F: FnOnce(R) -> L,

Returns left value or computes it from a closure

+
§Examples
+
let left: Either<String, u32> = Left("3".to_string());
+assert_eq!(left.left_or_else(|_| unreachable!()), "3");
+
+let right: Either<String, u32> = Right(3);
+assert_eq!(right.left_or_else(|x| x.to_string()), "3");
+
source

pub fn right_or(self, other: R) -> R

Return right value or given value

+

Arguments passed to right_or are eagerly evaluated; if you are passing +the result of a function call, it is recommended to use +right_or_else, which is lazily evaluated.

+
§Examples
+
let right: Either<&str, &str> = Right("right");
+assert_eq!(right.right_or("foo"), "right");
+
+let left: Either<&str, &str> = Left("left");
+assert_eq!(left.right_or("right"), "right");
+
source

pub fn right_or_default(self) -> R
where + R: Default,

Return right or a default

+
§Examples
+
let left: Either<String, u32> = Left("left".to_string());
+assert_eq!(left.right_or_default(), u32::default());
+
+let right: Either<String, u32> = Right(42);
+assert_eq!(right.right_or_default(), 42);
+
source

pub fn right_or_else<F>(self, f: F) -> R
where + F: FnOnce(L) -> R,

Returns right value or computes it from a closure

+
§Examples
+
let left: Either<String, u32> = Left("3".to_string());
+assert_eq!(left.right_or_else(|x| x.parse().unwrap()), 3);
+
+let right: Either<String, u32> = Right(3);
+assert_eq!(right.right_or_else(|_| unreachable!()), 3);
+
source

pub fn unwrap_left(self) -> L
where + R: Debug,

Returns the left value

+
§Examples
+
let left: Either<_, ()> = Left(3);
+assert_eq!(left.unwrap_left(), 3);
+
§Panics
+

When Either is a Right value

+ +
let right: Either<(), _> = Right(3);
+right.unwrap_left();
+
source

pub fn unwrap_right(self) -> R
where + L: Debug,

Returns the right value

+
§Examples
+
let right: Either<(), _> = Right(3);
+assert_eq!(right.unwrap_right(), 3);
+
§Panics
+

When Either is a Left value

+ +
let left: Either<_, ()> = Left(3);
+left.unwrap_right();
+
source

pub fn expect_left(self, msg: &str) -> L
where + R: Debug,

Returns the left value

+
§Examples
+
let left: Either<_, ()> = Left(3);
+assert_eq!(left.expect_left("value was Right"), 3);
+
§Panics
+

When Either is a Right value

+ +
let right: Either<(), _> = Right(3);
+right.expect_left("value was Right");
+
source

pub fn expect_right(self, msg: &str) -> R
where + L: Debug,

Returns the right value

+
§Examples
+
let right: Either<(), _> = Right(3);
+assert_eq!(right.expect_right("value was Left"), 3);
+
§Panics
+

When Either is a Left value

+ +
let left: Either<_, ()> = Left(3);
+left.expect_right("value was Right");
+
source

pub fn either_into<T>(self) -> T
where + L: Into<T>, + R: Into<T>,

Convert the contained value into T

+
§Examples
+
// Both u16 and u32 can be converted to u64.
+let left: Either<u16, u32> = Left(3u16);
+assert_eq!(left.either_into::<u64>(), 3u64);
+let right: Either<u16, u32> = Right(7u32);
+assert_eq!(right.either_into::<u64>(), 7u64);
+
source§

impl<L, R> Either<Option<L>, Option<R>>

source

pub fn factor_none(self) -> Option<Either<L, R>>

Factors out None from an Either of Option.

+ +
use either::*;
+let left: Either<_, Option<String>> = Left(Some(vec![0]));
+assert_eq!(left.factor_none(), Some(Left(vec![0])));
+
+let right: Either<Option<Vec<u8>>, _> = Right(Some(String::new()));
+assert_eq!(right.factor_none(), Some(Right(String::new())));
+
source§

impl<L, R, E> Either<Result<L, E>, Result<R, E>>

source

pub fn factor_err(self) -> Result<Either<L, R>, E>

Factors out a homogenous type from an Either of Result.

+

Here, the homogeneous type is the Err type of the Result.

+ +
use either::*;
+let left: Either<_, Result<String, u32>> = Left(Ok(vec![0]));
+assert_eq!(left.factor_err(), Ok(Left(vec![0])));
+
+let right: Either<Result<Vec<u8>, u32>, _> = Right(Ok(String::new()));
+assert_eq!(right.factor_err(), Ok(Right(String::new())));
+
source§

impl<T, L, R> Either<Result<T, L>, Result<T, R>>

source

pub fn factor_ok(self) -> Result<T, Either<L, R>>

Factors out a homogenous type from an Either of Result.

+

Here, the homogeneous type is the Ok type of the Result.

+ +
use either::*;
+let left: Either<_, Result<u32, String>> = Left(Err(vec![0]));
+assert_eq!(left.factor_ok(), Err(Left(vec![0])));
+
+let right: Either<Result<u32, Vec<u8>>, _> = Right(Err(String::new()));
+assert_eq!(right.factor_ok(), Err(Right(String::new())));
+
source§

impl<T, L, R> Either<(T, L), (T, R)>

source

pub fn factor_first(self) -> (T, Either<L, R>)

Factor out a homogeneous type from an either of pairs.

+

Here, the homogeneous type is the first element of the pairs.

+ +
use either::*;
+let left: Either<_, (u32, String)> = Left((123, vec![0]));
+assert_eq!(left.factor_first().0, 123);
+
+let right: Either<(u32, Vec<u8>), _> = Right((123, String::new()));
+assert_eq!(right.factor_first().0, 123);
+
source§

impl<T, L, R> Either<(L, T), (R, T)>

source

pub fn factor_second(self) -> (Either<L, R>, T)

Factor out a homogeneous type from an either of pairs.

+

Here, the homogeneous type is the second element of the pairs.

+ +
use either::*;
+let left: Either<_, (String, u32)> = Left((vec![0], 123));
+assert_eq!(left.factor_second().1, 123);
+
+let right: Either<(Vec<u8>, u32), _> = Right((String::new(), 123));
+assert_eq!(right.factor_second().1, 123);
+
source§

impl<T> Either<T, T>

source

pub fn into_inner(self) -> T

Extract the value of an either over two equivalent types.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.into_inner(), 123);
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.into_inner(), 123);
+
source

pub fn map<F, M>(self, f: F) -> Either<M, M>
where + F: FnOnce(T) -> M,

Map f over the contained value and return the result in the +corresponding variant.

+ +
use either::*;
+
+let value: Either<_, i32> = Right(42);
+
+let other = value.map(|x| x * 2);
+assert_eq!(other, Right(84));
+

Trait Implementations§

source§

impl<L, R, Target> AsMut<[Target]> for Either<L, R>
where + L: AsMut<[Target]>, + R: AsMut<[Target]>,

source§

fn as_mut(&mut self) -> &mut [Target]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<L, R, Target> AsMut<Target> for Either<L, R>
where + L: AsMut<Target>, + R: AsMut<Target>,

source§

fn as_mut(&mut self) -> &mut Target

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<L, R> AsMut<str> for Either<L, R>
where + L: AsMut<str>, + R: AsMut<str>,

source§

fn as_mut(&mut self) -> &mut str

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<L, R, Target> AsRef<[Target]> for Either<L, R>
where + L: AsRef<[Target]>, + R: AsRef<[Target]>,

source§

fn as_ref(&self) -> &[Target]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<L, R, Target> AsRef<Target> for Either<L, R>
where + L: AsRef<Target>, + R: AsRef<Target>,

source§

fn as_ref(&self) -> &Target

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<L, R> AsRef<str> for Either<L, R>
where + L: AsRef<str>, + R: AsRef<str>,

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<L: Clone, R: Clone> Clone for Either<L, R>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<L: Debug, R: Debug> Debug for Either<L, R>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<L, R> Deref for Either<L, R>
where + L: Deref, + R: Deref<Target = L::Target>,

§

type Target = <L as Deref>::Target

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<L, R> DerefMut for Either<L, R>
where + L: DerefMut, + R: DerefMut<Target = L::Target>,

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<L, R> Display for Either<L, R>
where + L: Display, + R: Display,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<L, R> DoubleEndedIterator for Either<L, R>
where + L: DoubleEndedIterator, + R: DoubleEndedIterator<Item = L::Item>,

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
source§

fn rfold<Acc, G>(self, init: Acc, f: G) -> Acc
where + G: FnMut(Acc, Self::Item) -> Acc,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
source§

impl<L, R> ExactSizeIterator for Either<L, R>
where + L: ExactSizeIterator, + R: ExactSizeIterator<Item = L::Item>,

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<L, R, A> Extend<A> for Either<L, R>
where + L: Extend<A>, + R: Extend<A>,

source§

fn extend<T>(&mut self, iter: T)
where + T: IntoIterator<Item = A>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<L, R> From<Result<R, L>> for Either<L, R>

Convert from Result to Either with Ok => Right and Err => Left.

+
source§

fn from(r: Result<R, L>) -> Self

Converts to this type from the input type.
source§

impl<L, R> Future for Either<L, R>
where + L: Future, + R: Future<Output = L::Output>,

Either<L, R> is a future if both L and R are futures.

+
§

type Output = <L as Future>::Output

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more
source§

impl<L: Hash, R: Hash> Hash for Either<L, R>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<L, R> Into<Result<R, L>> for Either<L, R>

Convert from Either to Result with Right => Ok and Left => Err.

+
source§

fn into(self) -> Result<R, L>

Converts this type into the (usually inferred) input type.
source§

impl<L, R> Iterator for Either<L, R>
where + L: Iterator, + R: Iterator<Item = L::Item>,

Either<L, R> is an iterator if both L and R are iterators.

+
§

type Item = <L as Iterator>::Item

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn fold<Acc, G>(self, init: Acc, f: G) -> Acc
where + G: FnMut(Acc, Self::Item) -> Acc,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
source§

fn for_each<F>(self, f: F)
where + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
source§

fn count(self) -> usize

Consumes the iterator, counting the number of iterations and returning it. Read more
source§

fn last(self) -> Option<Self::Item>

Consumes the iterator, returning the last element. Read more
source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>,

Transforms an iterator into a collection. Read more
source§

fn partition<B, F>(self, f: F) -> (B, B)
where + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn all<F>(&mut self, f: F) -> bool
where + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
source§

fn any<F>(&mut self, f: F) -> bool
where + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> bool,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<L: Ord, R: Ord> Ord for Either<L, R>

source§

fn cmp(&self, other: &Either<L, R>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<L: PartialEq, R: PartialEq> PartialEq for Either<L, R>

source§

fn eq(&self, other: &Either<L, R>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<L: PartialOrd, R: PartialOrd> PartialOrd for Either<L, R>

source§

fn partial_cmp(&self, other: &Either<L, R>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl<L: Copy, R: Copy> Copy for Either<L, R>

source§

impl<L: Eq, R: Eq> Eq for Either<L, R>

source§

impl<L, R> FusedIterator for Either<L, R>
where + L: FusedIterator, + R: FusedIterator<Item = L::Item>,

source§

impl<L, R> StructuralPartialEq for Either<L, R>

Auto Trait Implementations§

§

impl<L, R> Freeze for Either<L, R>
where + L: Freeze, + R: Freeze,

§

impl<L, R> RefUnwindSafe for Either<L, R>
where + L: RefUnwindSafe, + R: RefUnwindSafe,

§

impl<L, R> Send for Either<L, R>
where + L: Send, + R: Send,

§

impl<L, R> Sync for Either<L, R>
where + L: Sync, + R: Sync,

§

impl<L, R> Unpin for Either<L, R>
where + L: Unpin, + R: Unpin,

§

impl<L, R> UnwindSafe for Either<L, R>
where + L: UnwindSafe, + R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<F> IntoFuture for F
where + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/either/index.html b/either/index.html new file mode 100644 index 0000000000..7bacb63a45 --- /dev/null +++ b/either/index.html @@ -0,0 +1,20 @@ +either - Rust +

Crate either

source ·
Expand description

The enum Either with variants Left and Right is a general purpose +sum type with two cases.

+

Crate features:

+
    +
  • +

    "use_std" +Enabled by default. Disable to make the library #![no_std].

    +
  • +
  • +

    "serde" +Disabled by default. Enable to #[derive(Serialize, Deserialize)] for Either

    +
  • +
+

Re-exports§

  • pub use crate::Either::Left;
  • pub use crate::Either::Right;

Macros§

  • Evaluate the provided expression for both Either::Left and Either::Right.
  • Macro for unwrapping the left side of an Either, which fails early +with the opposite side. Can only be used in functions that return +Either because of the early return of Right that it provides.
  • Dual to try_left!, see its documentation for more information.

Structs§

  • Iterator that maps left or right iterators to corresponding Either-wrapped items.

Enums§

  • The enum Either with variants Left and Right is a general purpose +sum type with two cases.

Traits§

\ No newline at end of file diff --git a/either/into_either/trait.IntoEither.html b/either/into_either/trait.IntoEither.html new file mode 100644 index 0000000000..e1a7f6a933 --- /dev/null +++ b/either/into_either/trait.IntoEither.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../either/trait.IntoEither.html...

+ + + \ No newline at end of file diff --git a/either/iterator/struct.IterEither.html b/either/iterator/struct.IterEither.html new file mode 100644 index 0000000000..38295a1b30 --- /dev/null +++ b/either/iterator/struct.IterEither.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../either/struct.IterEither.html...

+ + + \ No newline at end of file diff --git a/either/macro.for_both!.html b/either/macro.for_both!.html new file mode 100644 index 0000000000..826222f7bd --- /dev/null +++ b/either/macro.for_both!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.for_both.html...

+ + + \ No newline at end of file diff --git a/either/macro.for_both.html b/either/macro.for_both.html new file mode 100644 index 0000000000..2968e11fd7 --- /dev/null +++ b/either/macro.for_both.html @@ -0,0 +1,22 @@ +for_both in either - Rust +

Macro either::for_both

source ·
macro_rules! for_both {
+    ($value:expr, $pattern:pat => $result:expr) => { ... };
+}
Expand description

Evaluate the provided expression for both Either::Left and Either::Right.

+

This macro is useful in cases where both sides of Either can be interacted with +in the same way even though the don’t share the same type.

+

Syntax: either::for_both!( expression , pattern => expression )

+

§Example

+
use either::Either;
+
+fn length(owned_or_borrowed: Either<String, &'static str>) -> usize {
+    either::for_both!(owned_or_borrowed, s => s.len())
+}
+
+fn main() {
+    let borrowed = Either::Right("Hello world!");
+    let owned = Either::Left("Hello world!".to_owned());
+
+    assert_eq!(length(borrowed), 12);
+    assert_eq!(length(owned), 12);
+}
+
\ No newline at end of file diff --git a/either/macro.try_left!.html b/either/macro.try_left!.html new file mode 100644 index 0000000000..25a69ab1a9 --- /dev/null +++ b/either/macro.try_left!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.try_left.html...

+ + + \ No newline at end of file diff --git a/either/macro.try_left.html b/either/macro.try_left.html new file mode 100644 index 0000000000..aa44da3360 --- /dev/null +++ b/either/macro.try_left.html @@ -0,0 +1,21 @@ +try_left in either - Rust +

Macro either::try_left

source ·
macro_rules! try_left {
+    ($expr:expr) => { ... };
+}
Expand description

Macro for unwrapping the left side of an Either, which fails early +with the opposite side. Can only be used in functions that return +Either because of the early return of Right that it provides.

+

See also try_right! for its dual, which applies the same just to the +right side.

+

§Example

+
use either::{Either, Left, Right};
+
+fn twice(wrapper: Either<u32, &str>) -> Either<u32, &str> {
+    let value = either::try_left!(wrapper);
+    Left(value * 2)
+}
+
+fn main() {
+    assert_eq!(twice(Left(2)), Left(4));
+    assert_eq!(twice(Right("ups")), Right("ups"));
+}
+
\ No newline at end of file diff --git a/either/macro.try_right!.html b/either/macro.try_right!.html new file mode 100644 index 0000000000..46bfa4da0d --- /dev/null +++ b/either/macro.try_right!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.try_right.html...

+ + + \ No newline at end of file diff --git a/either/macro.try_right.html b/either/macro.try_right.html new file mode 100644 index 0000000000..5177f8b0d0 --- /dev/null +++ b/either/macro.try_right.html @@ -0,0 +1,5 @@ +try_right in either - Rust +

Macro either::try_right

source ·
macro_rules! try_right {
+    ($expr:expr) => { ... };
+}
Expand description

Dual to try_left!, see its documentation for more information.

+
\ No newline at end of file diff --git a/either/sidebar-items.js b/either/sidebar-items.js new file mode 100644 index 0000000000..b5247b9dca --- /dev/null +++ b/either/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Either"],"macro":["for_both","try_left","try_right"],"struct":["IterEither"],"trait":["IntoEither"]}; \ No newline at end of file diff --git a/either/struct.IterEither.html b/either/struct.IterEither.html new file mode 100644 index 0000000000..e047c6b2c1 --- /dev/null +++ b/either/struct.IterEither.html @@ -0,0 +1,217 @@ +IterEither in either - Rust +

Struct either::IterEither

source ·
pub struct IterEither<L, R> { /* private fields */ }
Expand description

Iterator that maps left or right iterators to corresponding Either-wrapped items.

+

This struct is created by the Either::factor_into_iter, +factor_iter, +and factor_iter_mut methods.

+

Trait Implementations§

source§

impl<L: Clone, R: Clone> Clone for IterEither<L, R>

source§

fn clone(&self) -> IterEither<L, R>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<L: Debug, R: Debug> Debug for IterEither<L, R>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<L, R> DoubleEndedIterator for IterEither<L, R>

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
source§

fn rfold<Acc, G>(self, init: Acc, f: G) -> Acc
where + G: FnMut(Acc, Self::Item) -> Acc,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
source§

impl<L, R> ExactSizeIterator for IterEither<L, R>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<L, R> Iterator for IterEither<L, R>
where + L: Iterator, + R: Iterator,

§

type Item = Either<<L as Iterator>::Item, <R as Iterator>::Item>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn fold<Acc, G>(self, init: Acc, f: G) -> Acc
where + G: FnMut(Acc, Self::Item) -> Acc,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
source§

fn for_each<F>(self, f: F)
where + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
source§

fn count(self) -> usize

Consumes the iterator, counting the number of iterations and returning it. Read more
source§

fn last(self) -> Option<Self::Item>

Consumes the iterator, returning the last element. Read more
source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>,

Transforms an iterator into a collection. Read more
source§

fn partition<B, F>(self, f: F) -> (B, B)
where + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn all<F>(&mut self, f: F) -> bool
where + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
source§

fn any<F>(&mut self, f: F) -> bool
where + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> bool,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<L, R> FusedIterator for IterEither<L, R>
where + L: FusedIterator, + R: FusedIterator,

Auto Trait Implementations§

§

impl<L, R> Freeze for IterEither<L, R>
where + L: Freeze, + R: Freeze,

§

impl<L, R> RefUnwindSafe for IterEither<L, R>
where + L: RefUnwindSafe, + R: RefUnwindSafe,

§

impl<L, R> Send for IterEither<L, R>
where + L: Send, + R: Send,

§

impl<L, R> Sync for IterEither<L, R>
where + L: Sync, + R: Sync,

§

impl<L, R> Unpin for IterEither<L, R>
where + L: Unpin, + R: Unpin,

§

impl<L, R> UnwindSafe for IterEither<L, R>
where + L: UnwindSafe, + R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/either/trait.IntoEither.html b/either/trait.IntoEither.html new file mode 100644 index 0000000000..100a46c240 --- /dev/null +++ b/either/trait.IntoEither.html @@ -0,0 +1,38 @@ +IntoEither in either - Rust +

Trait either::IntoEither

source ·
pub trait IntoEither: Sized {
+    // Provided methods
+    fn into_either(self, into_left: bool) -> Either<Self, Self>  { ... }
+    fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> 
+       where F: FnOnce(&Self) -> bool { ... }
+}
Expand description

Provides methods for converting a type Self into either a Left or Right +variant of Either<Self, Self>.

+

The into_either method takes a bool to determine +whether to convert to Left or Right.

+

The into_either_with method takes a +predicate function to determine whether to convert to Left or Right.

+

Provided Methods§

source

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise.

+
§Examples
+
use either::{IntoEither, Left, Right};
+
+let x = 0;
+assert_eq!(x.into_either(true), Left(x));
+assert_eq!(x.into_either(false), Right(x));
+
source

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise.

+
§Examples
+
use either::{IntoEither, Left, Right};
+
+fn is_even(x: &u8) -> bool {
+    x % 2 == 0
+}
+
+let x = 0;
+assert_eq!(x.into_either_with(is_even), Left(x));
+assert_eq!(x.into_either_with(|x| !is_even(x)), Right(x));
+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> IntoEither for T

\ No newline at end of file diff --git a/rayon/all.html b/rayon/all.html new file mode 100644 index 0000000000..8162fdc79d --- /dev/null +++ b/rayon/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Traits

Functions

\ No newline at end of file diff --git a/rayon/array/index.html b/rayon/array/index.html new file mode 100644 index 0000000000..113c78514b --- /dev/null +++ b/rayon/array/index.html @@ -0,0 +1,5 @@ +rayon::array - Rust +

Module rayon::array

source ·
Expand description

Parallel iterator types for arrays ([T; N])

+

You will rarely need to interact with this module directly unless you need +to name one of the iterator types.

+

Structs§

  • Parallel iterator that moves out of an array.
\ No newline at end of file diff --git a/rayon/array/sidebar-items.js b/rayon/array/sidebar-items.js new file mode 100644 index 0000000000..39996964bc --- /dev/null +++ b/rayon/array/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["IntoIter"]}; \ No newline at end of file diff --git a/rayon/array/struct.IntoIter.html b/rayon/array/struct.IntoIter.html new file mode 100644 index 0000000000..6729d873e3 --- /dev/null +++ b/rayon/array/struct.IntoIter.html @@ -0,0 +1,289 @@ +IntoIter in rayon::array - Rust +

Struct rayon::array::IntoIter

source ·
pub struct IntoIter<T: Send, const N: usize> { /* private fields */ }
Expand description

Parallel iterator that moves out of an array.

+

Trait Implementations§

source§

impl<T: Clone + Send, const N: usize> Clone for IntoIter<T, N>

source§

fn clone(&self) -> IntoIter<T, N>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Send, const N: usize> Debug for IntoIter<T, N>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send, const N: usize> IndexedParallelIterator for IntoIter<T, N>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Send, const N: usize> ParallelIterator for IntoIter<T, N>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T, const N: usize> Freeze for IntoIter<T, N>
where + T: Freeze,

§

impl<T, const N: usize> RefUnwindSafe for IntoIter<T, N>
where + T: RefUnwindSafe,

§

impl<T, const N: usize> Send for IntoIter<T, N>

§

impl<T, const N: usize> Sync for IntoIter<T, N>
where + T: Sync,

§

impl<T, const N: usize> Unpin for IntoIter<T, N>
where + T: Unpin,

§

impl<T, const N: usize> UnwindSafe for IntoIter<T, N>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/binary_heap/index.html b/rayon/collections/binary_heap/index.html new file mode 100644 index 0000000000..ccc637eee1 --- /dev/null +++ b/rayon/collections/binary_heap/index.html @@ -0,0 +1,6 @@ +rayon::collections::binary_heap - Rust +
Expand description

This module contains the parallel iterator types for heaps +(BinaryHeap<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Draining parallel iterator that moves out of a binary heap, +but keeps the total capacity.
  • Parallel iterator over a binary heap
  • Parallel iterator over an immutable reference to a binary heap
\ No newline at end of file diff --git a/rayon/collections/binary_heap/sidebar-items.js b/rayon/collections/binary_heap/sidebar-items.js new file mode 100644 index 0000000000..e9eb65cda7 --- /dev/null +++ b/rayon/collections/binary_heap/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Drain","IntoIter","Iter"]}; \ No newline at end of file diff --git a/rayon/collections/binary_heap/struct.Drain.html b/rayon/collections/binary_heap/struct.Drain.html new file mode 100644 index 0000000000..ed044d6179 --- /dev/null +++ b/rayon/collections/binary_heap/struct.Drain.html @@ -0,0 +1,286 @@ +Drain in rayon::collections::binary_heap - Rust +
pub struct Drain<'a, T: Ord + Send> { /* private fields */ }
Expand description

Draining parallel iterator that moves out of a binary heap, +but keeps the total capacity.

+

Trait Implementations§

source§

impl<'a, T: Debug + Ord + Send> Debug for Drain<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Ord + Send> Drop for Drain<'a, T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a, T: Ord + Send> IndexedParallelIterator for Drain<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Ord + Send> ParallelIterator for Drain<'a, T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Drain<'a, T>

§

impl<'a, T> RefUnwindSafe for Drain<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Drain<'a, T>

§

impl<'a, T> Sync for Drain<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for Drain<'a, T>

§

impl<'a, T> !UnwindSafe for Drain<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/binary_heap/struct.IntoIter.html b/rayon/collections/binary_heap/struct.IntoIter.html new file mode 100644 index 0000000000..fed5fd86d1 --- /dev/null +++ b/rayon/collections/binary_heap/struct.IntoIter.html @@ -0,0 +1,288 @@ +IntoIter in rayon::collections::binary_heap - Rust +
pub struct IntoIter<T: Ord + Send> { /* private fields */ }
Expand description

Parallel iterator over a binary heap

+

Trait Implementations§

source§

impl<T: Clone + Ord + Send> Clone for IntoIter<T>

source§

fn clone(&self) -> IntoIter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Ord + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Ord + Send> IndexedParallelIterator for IntoIter<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Ord + Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/binary_heap/struct.Iter.html b/rayon/collections/binary_heap/struct.Iter.html new file mode 100644 index 0000000000..de9dc92ac5 --- /dev/null +++ b/rayon/collections/binary_heap/struct.Iter.html @@ -0,0 +1,286 @@ +Iter in rayon::collections::binary_heap - Rust +
pub struct Iter<'a, T: Ord + Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a binary heap

+

Trait Implementations§

source§

impl<'a, T: Ord + Sync> Clone for Iter<'a, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, T: Debug + Ord + Sync> Debug for Iter<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Ord + Sync + 'a> IndexedParallelIterator for Iter<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Ord + Sync + 'a> ParallelIterator for Iter<'a, T>

§

type Item = &'a T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Iter<'a, T>

§

impl<'a, T> RefUnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Iter<'a, T>

§

impl<'a, T> Sync for Iter<'a, T>

§

impl<'a, T> Unpin for Iter<'a, T>

§

impl<'a, T> UnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/btree_map/index.html b/rayon/collections/btree_map/index.html new file mode 100644 index 0000000000..03e73cdcb2 --- /dev/null +++ b/rayon/collections/btree_map/index.html @@ -0,0 +1,5 @@ +rayon::collections::btree_map - Rust +
Expand description

This module contains the parallel iterator types for B-Tree maps +(BTreeMap<K, V>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Parallel iterator over a B-Tree map
  • Parallel iterator over an immutable reference to a B-Tree map
  • Parallel iterator over a mutable reference to a B-Tree map
\ No newline at end of file diff --git a/rayon/collections/btree_map/sidebar-items.js b/rayon/collections/btree_map/sidebar-items.js new file mode 100644 index 0000000000..c748af5a29 --- /dev/null +++ b/rayon/collections/btree_map/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["IntoIter","Iter","IterMut"]}; \ No newline at end of file diff --git a/rayon/collections/btree_map/struct.IntoIter.html b/rayon/collections/btree_map/struct.IntoIter.html new file mode 100644 index 0000000000..06c33aec59 --- /dev/null +++ b/rayon/collections/btree_map/struct.IntoIter.html @@ -0,0 +1,197 @@ +IntoIter in rayon::collections::btree_map - Rust +
pub struct IntoIter<K: Ord + Send, V: Send> { /* private fields */ }
Expand description

Parallel iterator over a B-Tree map

+

Trait Implementations§

source§

impl<K: Debug + Ord + Send, V: Debug + Send> Debug for IntoIter<K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<K: Ord + Send, V: Send> ParallelIterator for IntoIter<K, V>

§

type Item = (K, V)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<K, V> Freeze for IntoIter<K, V>

§

impl<K, V> RefUnwindSafe for IntoIter<K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<K, V> Send for IntoIter<K, V>

§

impl<K, V> Sync for IntoIter<K, V>
where + K: Sync, + V: Sync,

§

impl<K, V> Unpin for IntoIter<K, V>
where + K: Unpin, + V: Unpin,

§

impl<K, V> UnwindSafe for IntoIter<K, V>
where + K: UnwindSafe, + V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/btree_map/struct.Iter.html b/rayon/collections/btree_map/struct.Iter.html new file mode 100644 index 0000000000..a042a6c743 --- /dev/null +++ b/rayon/collections/btree_map/struct.Iter.html @@ -0,0 +1,194 @@ +Iter in rayon::collections::btree_map - Rust +
pub struct Iter<'a, K: Ord + Sync, V: Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a B-Tree map

+

Trait Implementations§

source§

impl<'a, K: Ord + Sync, V: Sync> Clone for Iter<'a, K, V>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, K: Debug + Ord + Sync, V: Debug + Sync> Debug for Iter<'a, K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, K: Ord + Sync + 'a, V: Sync + 'a> ParallelIterator for Iter<'a, K, V>

§

type Item = (&'a K, &'a V)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, K, V> Freeze for Iter<'a, K, V>

§

impl<'a, K, V> RefUnwindSafe for Iter<'a, K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<'a, K, V> Send for Iter<'a, K, V>

§

impl<'a, K, V> Sync for Iter<'a, K, V>

§

impl<'a, K, V> Unpin for Iter<'a, K, V>

§

impl<'a, K, V> UnwindSafe for Iter<'a, K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/btree_map/struct.IterMut.html b/rayon/collections/btree_map/struct.IterMut.html new file mode 100644 index 0000000000..8715ef728c --- /dev/null +++ b/rayon/collections/btree_map/struct.IterMut.html @@ -0,0 +1,192 @@ +IterMut in rayon::collections::btree_map - Rust +
pub struct IterMut<'a, K: Ord + Sync, V: Send> { /* private fields */ }
Expand description

Parallel iterator over a mutable reference to a B-Tree map

+

Trait Implementations§

source§

impl<'a, K: Debug + Ord + Sync, V: Debug + Send> Debug for IterMut<'a, K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, K: Ord + Sync + 'a, V: Send + 'a> ParallelIterator for IterMut<'a, K, V>

§

type Item = (&'a K, &'a mut V)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, K, V> Freeze for IterMut<'a, K, V>

§

impl<'a, K, V> RefUnwindSafe for IterMut<'a, K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<'a, K, V> Send for IterMut<'a, K, V>

§

impl<'a, K, V> Sync for IterMut<'a, K, V>
where + V: Sync,

§

impl<'a, K, V> Unpin for IterMut<'a, K, V>

§

impl<'a, K, V> !UnwindSafe for IterMut<'a, K, V>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/btree_set/index.html b/rayon/collections/btree_set/index.html new file mode 100644 index 0000000000..4919fc9b3e --- /dev/null +++ b/rayon/collections/btree_set/index.html @@ -0,0 +1,5 @@ +rayon::collections::btree_set - Rust +
Expand description

This module contains the parallel iterator types for B-Tree sets +(BTreeSet<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Parallel iterator over a B-Tree set
  • Parallel iterator over an immutable reference to a B-Tree set
\ No newline at end of file diff --git a/rayon/collections/btree_set/sidebar-items.js b/rayon/collections/btree_set/sidebar-items.js new file mode 100644 index 0000000000..66cef52d90 --- /dev/null +++ b/rayon/collections/btree_set/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["IntoIter","Iter"]}; \ No newline at end of file diff --git a/rayon/collections/btree_set/struct.IntoIter.html b/rayon/collections/btree_set/struct.IntoIter.html new file mode 100644 index 0000000000..fd81e38b05 --- /dev/null +++ b/rayon/collections/btree_set/struct.IntoIter.html @@ -0,0 +1,193 @@ +IntoIter in rayon::collections::btree_set - Rust +
pub struct IntoIter<T: Ord + Send> { /* private fields */ }
Expand description

Parallel iterator over a B-Tree set

+

Trait Implementations§

source§

impl<T: Debug + Ord + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Ord + Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/btree_set/struct.Iter.html b/rayon/collections/btree_set/struct.Iter.html new file mode 100644 index 0000000000..0f5af91231 --- /dev/null +++ b/rayon/collections/btree_set/struct.Iter.html @@ -0,0 +1,192 @@ +Iter in rayon::collections::btree_set - Rust +
pub struct Iter<'a, T: Ord + Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a B-Tree set

+

Trait Implementations§

source§

impl<'a, T: Ord + Sync + 'a> Clone for Iter<'a, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, T: Debug + Ord + Sync> Debug for Iter<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Ord + Sync + 'a> ParallelIterator for Iter<'a, T>

§

type Item = &'a T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Iter<'a, T>

§

impl<'a, T> RefUnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Iter<'a, T>

§

impl<'a, T> Sync for Iter<'a, T>

§

impl<'a, T> Unpin for Iter<'a, T>

§

impl<'a, T> UnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/hash_map/index.html b/rayon/collections/hash_map/index.html new file mode 100644 index 0000000000..f47e36f390 --- /dev/null +++ b/rayon/collections/hash_map/index.html @@ -0,0 +1,6 @@ +rayon::collections::hash_map - Rust +

Module rayon::collections::hash_map

source ·
Expand description

This module contains the parallel iterator types for hash maps +(HashMap<K, V>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Draining parallel iterator that moves out of a hash map, +but keeps the total capacity.
  • Parallel iterator over a hash map
  • Parallel iterator over an immutable reference to a hash map
  • Parallel iterator over a mutable reference to a hash map
\ No newline at end of file diff --git a/rayon/collections/hash_map/sidebar-items.js b/rayon/collections/hash_map/sidebar-items.js new file mode 100644 index 0000000000..f7a97344ab --- /dev/null +++ b/rayon/collections/hash_map/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Drain","IntoIter","Iter","IterMut"]}; \ No newline at end of file diff --git a/rayon/collections/hash_map/struct.Drain.html b/rayon/collections/hash_map/struct.Drain.html new file mode 100644 index 0000000000..8fb0b3d7c4 --- /dev/null +++ b/rayon/collections/hash_map/struct.Drain.html @@ -0,0 +1,196 @@ +Drain in rayon::collections::hash_map - Rust +
pub struct Drain<'a, K: Hash + Eq + Send, V: Send> { /* private fields */ }
Expand description

Draining parallel iterator that moves out of a hash map, +but keeps the total capacity.

+

Trait Implementations§

source§

impl<'a, K: Debug + Hash + Eq + Send, V: Debug + Send> Debug for Drain<'a, K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<K: Hash + Eq + Send, V: Send> ParallelIterator for Drain<'_, K, V>

§

type Item = (K, V)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, K, V> Freeze for Drain<'a, K, V>

§

impl<'a, K, V> RefUnwindSafe for Drain<'a, K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<'a, K, V> Send for Drain<'a, K, V>

§

impl<'a, K, V> Sync for Drain<'a, K, V>
where + K: Sync, + V: Sync,

§

impl<'a, K, V> Unpin for Drain<'a, K, V>
where + K: Unpin, + V: Unpin,

§

impl<'a, K, V> !UnwindSafe for Drain<'a, K, V>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/hash_map/struct.IntoIter.html b/rayon/collections/hash_map/struct.IntoIter.html new file mode 100644 index 0000000000..a013638170 --- /dev/null +++ b/rayon/collections/hash_map/struct.IntoIter.html @@ -0,0 +1,197 @@ +IntoIter in rayon::collections::hash_map - Rust +
pub struct IntoIter<K: Hash + Eq + Send, V: Send> { /* private fields */ }
Expand description

Parallel iterator over a hash map

+

Trait Implementations§

source§

impl<K: Debug + Hash + Eq + Send, V: Debug + Send> Debug for IntoIter<K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<K: Hash + Eq + Send, V: Send> ParallelIterator for IntoIter<K, V>

§

type Item = (K, V)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<K, V> Freeze for IntoIter<K, V>

§

impl<K, V> RefUnwindSafe for IntoIter<K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<K, V> Send for IntoIter<K, V>

§

impl<K, V> Sync for IntoIter<K, V>
where + K: Sync, + V: Sync,

§

impl<K, V> Unpin for IntoIter<K, V>
where + K: Unpin, + V: Unpin,

§

impl<K, V> UnwindSafe for IntoIter<K, V>
where + K: UnwindSafe, + V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/hash_map/struct.Iter.html b/rayon/collections/hash_map/struct.Iter.html new file mode 100644 index 0000000000..adbe061f72 --- /dev/null +++ b/rayon/collections/hash_map/struct.Iter.html @@ -0,0 +1,194 @@ +Iter in rayon::collections::hash_map - Rust +
pub struct Iter<'a, K: Hash + Eq + Sync, V: Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a hash map

+

Trait Implementations§

source§

impl<'a, K: Hash + Eq + Sync, V: Sync> Clone for Iter<'a, K, V>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, K: Debug + Hash + Eq + Sync, V: Debug + Sync> Debug for Iter<'a, K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, K: Hash + Eq + Sync + 'a, V: Sync + 'a> ParallelIterator for Iter<'a, K, V>

§

type Item = (&'a K, &'a V)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, K, V> Freeze for Iter<'a, K, V>

§

impl<'a, K, V> RefUnwindSafe for Iter<'a, K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<'a, K, V> Send for Iter<'a, K, V>

§

impl<'a, K, V> Sync for Iter<'a, K, V>

§

impl<'a, K, V> Unpin for Iter<'a, K, V>

§

impl<'a, K, V> UnwindSafe for Iter<'a, K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/hash_map/struct.IterMut.html b/rayon/collections/hash_map/struct.IterMut.html new file mode 100644 index 0000000000..d40a8829a7 --- /dev/null +++ b/rayon/collections/hash_map/struct.IterMut.html @@ -0,0 +1,192 @@ +IterMut in rayon::collections::hash_map - Rust +
pub struct IterMut<'a, K: Hash + Eq + Sync, V: Send> { /* private fields */ }
Expand description

Parallel iterator over a mutable reference to a hash map

+

Trait Implementations§

source§

impl<'a, K: Debug + Hash + Eq + Sync, V: Debug + Send> Debug for IterMut<'a, K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, K: Hash + Eq + Sync + 'a, V: Send + 'a> ParallelIterator for IterMut<'a, K, V>

§

type Item = (&'a K, &'a mut V)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, K, V> Freeze for IterMut<'a, K, V>

§

impl<'a, K, V> RefUnwindSafe for IterMut<'a, K, V>
where + K: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<'a, K, V> Send for IterMut<'a, K, V>

§

impl<'a, K, V> Sync for IterMut<'a, K, V>
where + V: Sync,

§

impl<'a, K, V> Unpin for IterMut<'a, K, V>

§

impl<'a, K, V> !UnwindSafe for IterMut<'a, K, V>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/hash_set/index.html b/rayon/collections/hash_set/index.html new file mode 100644 index 0000000000..f820c202b7 --- /dev/null +++ b/rayon/collections/hash_set/index.html @@ -0,0 +1,6 @@ +rayon::collections::hash_set - Rust +

Module rayon::collections::hash_set

source ·
Expand description

This module contains the parallel iterator types for hash sets +(HashSet<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Draining parallel iterator that moves out of a hash set, +but keeps the total capacity.
  • Parallel iterator over a hash set
  • Parallel iterator over an immutable reference to a hash set
\ No newline at end of file diff --git a/rayon/collections/hash_set/sidebar-items.js b/rayon/collections/hash_set/sidebar-items.js new file mode 100644 index 0000000000..e9eb65cda7 --- /dev/null +++ b/rayon/collections/hash_set/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Drain","IntoIter","Iter"]}; \ No newline at end of file diff --git a/rayon/collections/hash_set/struct.Drain.html b/rayon/collections/hash_set/struct.Drain.html new file mode 100644 index 0000000000..bddd38fdc0 --- /dev/null +++ b/rayon/collections/hash_set/struct.Drain.html @@ -0,0 +1,193 @@ +Drain in rayon::collections::hash_set - Rust +
pub struct Drain<'a, T: Hash + Eq + Send> { /* private fields */ }
Expand description

Draining parallel iterator that moves out of a hash set, +but keeps the total capacity.

+

Trait Implementations§

source§

impl<'a, T: Debug + Hash + Eq + Send> Debug for Drain<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Hash + Eq + Send> ParallelIterator for Drain<'_, T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Drain<'a, T>

§

impl<'a, T> RefUnwindSafe for Drain<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Drain<'a, T>

§

impl<'a, T> Sync for Drain<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for Drain<'a, T>
where + T: Unpin,

§

impl<'a, T> !UnwindSafe for Drain<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/hash_set/struct.IntoIter.html b/rayon/collections/hash_set/struct.IntoIter.html new file mode 100644 index 0000000000..41e1b7ace3 --- /dev/null +++ b/rayon/collections/hash_set/struct.IntoIter.html @@ -0,0 +1,193 @@ +IntoIter in rayon::collections::hash_set - Rust +
pub struct IntoIter<T: Hash + Eq + Send> { /* private fields */ }
Expand description

Parallel iterator over a hash set

+

Trait Implementations§

source§

impl<T: Debug + Hash + Eq + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Hash + Eq + Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/hash_set/struct.Iter.html b/rayon/collections/hash_set/struct.Iter.html new file mode 100644 index 0000000000..d43a76074f --- /dev/null +++ b/rayon/collections/hash_set/struct.Iter.html @@ -0,0 +1,192 @@ +Iter in rayon::collections::hash_set - Rust +
pub struct Iter<'a, T: Hash + Eq + Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a hash set

+

Trait Implementations§

source§

impl<'a, T: Hash + Eq + Sync> Clone for Iter<'a, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, T: Debug + Hash + Eq + Sync> Debug for Iter<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Hash + Eq + Sync + 'a> ParallelIterator for Iter<'a, T>

§

type Item = &'a T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Iter<'a, T>

§

impl<'a, T> RefUnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Iter<'a, T>

§

impl<'a, T> Sync for Iter<'a, T>

§

impl<'a, T> Unpin for Iter<'a, T>

§

impl<'a, T> UnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/index.html b/rayon/collections/index.html new file mode 100644 index 0000000000..2888a54537 --- /dev/null +++ b/rayon/collections/index.html @@ -0,0 +1,19 @@ +rayon::collections - Rust +

Module rayon::collections

source ·
Expand description

Parallel iterator types for standard collections

+

You will rarely need to interact with this module directly unless you need +to name one of the iterator types.

+

Modules§

  • This module contains the parallel iterator types for heaps +(BinaryHeap<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
  • This module contains the parallel iterator types for B-Tree maps +(BTreeMap<K, V>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
  • This module contains the parallel iterator types for B-Tree sets +(BTreeSet<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
  • This module contains the parallel iterator types for hash maps +(HashMap<K, V>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
  • This module contains the parallel iterator types for hash sets +(HashSet<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
  • This module contains the parallel iterator types for linked lists +(LinkedList<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
  • This module contains the parallel iterator types for double-ended queues +(VecDeque<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
\ No newline at end of file diff --git a/rayon/collections/linked_list/index.html b/rayon/collections/linked_list/index.html new file mode 100644 index 0000000000..81f2be33c5 --- /dev/null +++ b/rayon/collections/linked_list/index.html @@ -0,0 +1,5 @@ +rayon::collections::linked_list - Rust +
Expand description

This module contains the parallel iterator types for linked lists +(LinkedList<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Parallel iterator over a linked list
  • Parallel iterator over an immutable reference to a linked list
  • Parallel iterator over a mutable reference to a linked list
\ No newline at end of file diff --git a/rayon/collections/linked_list/sidebar-items.js b/rayon/collections/linked_list/sidebar-items.js new file mode 100644 index 0000000000..c748af5a29 --- /dev/null +++ b/rayon/collections/linked_list/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["IntoIter","Iter","IterMut"]}; \ No newline at end of file diff --git a/rayon/collections/linked_list/struct.IntoIter.html b/rayon/collections/linked_list/struct.IntoIter.html new file mode 100644 index 0000000000..468aeb29d9 --- /dev/null +++ b/rayon/collections/linked_list/struct.IntoIter.html @@ -0,0 +1,194 @@ +IntoIter in rayon::collections::linked_list - Rust +
pub struct IntoIter<T: Send> { /* private fields */ }
Expand description

Parallel iterator over a linked list

+

Trait Implementations§

source§

impl<T: Clone + Send> Clone for IntoIter<T>

source§

fn clone(&self) -> IntoIter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/linked_list/struct.Iter.html b/rayon/collections/linked_list/struct.Iter.html new file mode 100644 index 0000000000..2561baa348 --- /dev/null +++ b/rayon/collections/linked_list/struct.Iter.html @@ -0,0 +1,192 @@ +Iter in rayon::collections::linked_list - Rust +
pub struct Iter<'a, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a linked list

+

Trait Implementations§

source§

impl<'a, T: Sync> Clone for Iter<'a, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, T: Debug + Sync> Debug for Iter<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Sync + 'a> ParallelIterator for Iter<'a, T>

§

type Item = &'a T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Iter<'a, T>

§

impl<'a, T> RefUnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Iter<'a, T>

§

impl<'a, T> Sync for Iter<'a, T>

§

impl<'a, T> Unpin for Iter<'a, T>

§

impl<'a, T> UnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/linked_list/struct.IterMut.html b/rayon/collections/linked_list/struct.IterMut.html new file mode 100644 index 0000000000..836459e64b --- /dev/null +++ b/rayon/collections/linked_list/struct.IterMut.html @@ -0,0 +1,191 @@ +IterMut in rayon::collections::linked_list - Rust +
pub struct IterMut<'a, T: Send> { /* private fields */ }
Expand description

Parallel iterator over a mutable reference to a linked list

+

Trait Implementations§

source§

impl<'a, T: Debug + Send> Debug for IterMut<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Send + 'a> ParallelIterator for IterMut<'a, T>

§

type Item = &'a mut T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for IterMut<'a, T>

§

impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for IterMut<'a, T>

§

impl<'a, T> Sync for IterMut<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for IterMut<'a, T>

§

impl<'a, T> !UnwindSafe for IterMut<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/sidebar-items.js b/rayon/collections/sidebar-items.js new file mode 100644 index 0000000000..461f840a35 --- /dev/null +++ b/rayon/collections/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["binary_heap","btree_map","btree_set","hash_map","hash_set","linked_list","vec_deque"]}; \ No newline at end of file diff --git a/rayon/collections/vec_deque/index.html b/rayon/collections/vec_deque/index.html new file mode 100644 index 0000000000..30add5dd50 --- /dev/null +++ b/rayon/collections/vec_deque/index.html @@ -0,0 +1,6 @@ +rayon::collections::vec_deque - Rust +
Expand description

This module contains the parallel iterator types for double-ended queues +(VecDeque<T>). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Draining parallel iterator that moves a range out of a double-ended queue, +but keeps the total capacity.
  • Parallel iterator over a double-ended queue
  • Parallel iterator over an immutable reference to a double-ended queue
  • Parallel iterator over a mutable reference to a double-ended queue
\ No newline at end of file diff --git a/rayon/collections/vec_deque/sidebar-items.js b/rayon/collections/vec_deque/sidebar-items.js new file mode 100644 index 0000000000..f7a97344ab --- /dev/null +++ b/rayon/collections/vec_deque/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Drain","IntoIter","Iter","IterMut"]}; \ No newline at end of file diff --git a/rayon/collections/vec_deque/struct.Drain.html b/rayon/collections/vec_deque/struct.Drain.html new file mode 100644 index 0000000000..71df9ada44 --- /dev/null +++ b/rayon/collections/vec_deque/struct.Drain.html @@ -0,0 +1,286 @@ +Drain in rayon::collections::vec_deque - Rust +
pub struct Drain<'a, T: Send> { /* private fields */ }
Expand description

Draining parallel iterator that moves a range out of a double-ended queue, +but keeps the total capacity.

+

Trait Implementations§

source§

impl<'a, T: Debug + Send> Debug for Drain<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Send> Drop for Drain<'a, T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a, T: Send> IndexedParallelIterator for Drain<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Send> ParallelIterator for Drain<'a, T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Drain<'a, T>

§

impl<'a, T> RefUnwindSafe for Drain<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Drain<'a, T>

§

impl<'a, T> Sync for Drain<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for Drain<'a, T>

§

impl<'a, T> !UnwindSafe for Drain<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/vec_deque/struct.IntoIter.html b/rayon/collections/vec_deque/struct.IntoIter.html new file mode 100644 index 0000000000..475aa921e6 --- /dev/null +++ b/rayon/collections/vec_deque/struct.IntoIter.html @@ -0,0 +1,288 @@ +IntoIter in rayon::collections::vec_deque - Rust +
pub struct IntoIter<T: Send> { /* private fields */ }
Expand description

Parallel iterator over a double-ended queue

+

Trait Implementations§

source§

impl<T: Clone + Send> Clone for IntoIter<T>

source§

fn clone(&self) -> IntoIter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> IndexedParallelIterator for IntoIter<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/vec_deque/struct.Iter.html b/rayon/collections/vec_deque/struct.Iter.html new file mode 100644 index 0000000000..f3d95e9a3d --- /dev/null +++ b/rayon/collections/vec_deque/struct.Iter.html @@ -0,0 +1,286 @@ +Iter in rayon::collections::vec_deque - Rust +
pub struct Iter<'a, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a double-ended queue

+

Trait Implementations§

source§

impl<'a, T: Sync> Clone for Iter<'a, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, T: Debug + Sync> Debug for Iter<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Sync + 'a> IndexedParallelIterator for Iter<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Sync + 'a> ParallelIterator for Iter<'a, T>

§

type Item = &'a T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Iter<'a, T>

§

impl<'a, T> RefUnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Iter<'a, T>

§

impl<'a, T> Sync for Iter<'a, T>

§

impl<'a, T> Unpin for Iter<'a, T>

§

impl<'a, T> UnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/collections/vec_deque/struct.IterMut.html b/rayon/collections/vec_deque/struct.IterMut.html new file mode 100644 index 0000000000..b642392f62 --- /dev/null +++ b/rayon/collections/vec_deque/struct.IterMut.html @@ -0,0 +1,285 @@ +IterMut in rayon::collections::vec_deque - Rust +
pub struct IterMut<'a, T: Send> { /* private fields */ }
Expand description

Parallel iterator over a mutable reference to a double-ended queue

+

Trait Implementations§

source§

impl<'a, T: Debug + Send> Debug for IterMut<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Send + 'a> IndexedParallelIterator for IterMut<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Send + 'a> ParallelIterator for IterMut<'a, T>

§

type Item = &'a mut T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for IterMut<'a, T>

§

impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for IterMut<'a, T>

§

impl<'a, T> Sync for IterMut<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for IterMut<'a, T>

§

impl<'a, T> !UnwindSafe for IterMut<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/enum.Yield.html b/rayon/enum.Yield.html new file mode 100644 index 0000000000..f462a1ab3b --- /dev/null +++ b/rayon/enum.Yield.html @@ -0,0 +1,28 @@ +Yield in rayon - Rust +

Enum rayon::Yield

source ·
pub enum Yield {
+    Executed,
+    Idle,
+}
Expand description

Result of yield_now() or yield_local().

+

Variants§

§

Executed

Work was found and executed.

+
§

Idle

No available work was found.

+

Trait Implementations§

source§

impl Clone for Yield

source§

fn clone(&self) -> Yield

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Yield

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq for Yield

source§

fn eq(&self, other: &Yield) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Yield

source§

impl Eq for Yield

source§

impl StructuralPartialEq for Yield

Auto Trait Implementations§

§

impl Freeze for Yield

§

impl RefUnwindSafe for Yield

§

impl Send for Yield

§

impl Sync for Yield

§

impl Unpin for Yield

§

impl UnwindSafe for Yield

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/fn.broadcast.html b/rayon/fn.broadcast.html new file mode 100644 index 0000000000..262baaf0f3 --- /dev/null +++ b/rayon/fn.broadcast.html @@ -0,0 +1,10 @@ +broadcast in rayon - Rust +

Function rayon::broadcast

source ·
pub fn broadcast<OP, R>(op: OP) -> Vec<R>
where + OP: Fn(BroadcastContext<'_>) -> R + Sync, + R: Send,
Expand description

Executes op within every thread in the current threadpool. If this is +called from a non-Rayon thread, it will execute in the global threadpool. +Any attempts to use join, scope, or parallel iterators will then operate +within that threadpool. When the call has completed on each thread, returns +a vector containing all of their return values.

+

For more information, see the ThreadPool::broadcast() method.

+
\ No newline at end of file diff --git a/rayon/fn.current_num_threads.html b/rayon/fn.current_num_threads.html new file mode 100644 index 0000000000..bb1cc09d24 --- /dev/null +++ b/rayon/fn.current_num_threads.html @@ -0,0 +1,15 @@ +current_num_threads in rayon - Rust +

Function rayon::current_num_threads

source ·
pub fn current_num_threads() -> usize
Expand description

Returns the number of threads in the current registry. If this +code is executing within a Rayon thread-pool, then this will be +the number of threads for the thread-pool of the current +thread. Otherwise, it will be the number of threads for the global +thread-pool.

+

This can be useful when trying to judge how many times to split +parallel work (the parallel iterator traits use this value +internally for this purpose).

+

§Future compatibility note

+

Note that unless this thread-pool was created with a +builder that specifies the number of threads, then this +number may vary over time in future versions (see the +num_threads() method for details).

+
\ No newline at end of file diff --git a/rayon/fn.current_thread_index.html b/rayon/fn.current_thread_index.html new file mode 100644 index 0000000000..f5186b9b44 --- /dev/null +++ b/rayon/fn.current_thread_index.html @@ -0,0 +1,17 @@ +current_thread_index in rayon - Rust +
pub fn current_thread_index() -> Option<usize>
Expand description

If called from a Rayon worker thread, returns the index of that +thread within its current pool; if not called from a Rayon thread, +returns None.

+

The index for a given thread will not change over the thread’s +lifetime. However, multiple threads may share the same index if +they are in distinct thread-pools.

+

See also: [the ThreadPool::current_thread_index() method].

+

§Future compatibility note

+

Currently, every thread-pool (including the global +thread-pool) has a fixed number of threads, but this may +change in future Rayon versions (see the num_threads() method +for details). In that case, the index for a +thread would not change during its lifetime, but thread +indices may wind up being reused if threads are terminated and +restarted.

+
\ No newline at end of file diff --git a/rayon/fn.in_place_scope.html b/rayon/fn.in_place_scope.html new file mode 100644 index 0000000000..d8b07e0aee --- /dev/null +++ b/rayon/fn.in_place_scope.html @@ -0,0 +1,21 @@ +in_place_scope in rayon - Rust +

Function rayon::in_place_scope

source ·
pub fn in_place_scope<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R,
Expand description

Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.

+

This is just like scope() except the closure runs on the same thread +that calls in_place_scope(). Only work that it spawns runs in the +thread pool.

+

§Panics

+

If a panic occurs, either in the closure given to in_place_scope() or in +any of the spawned jobs, that panic will be propagated and the +call to in_place_scope() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn(), it will +execute, even if the spawning task should later panic. in_place_scope() +returns once all spawned jobs have completed, and any panics are +propagated at that point.

+
\ No newline at end of file diff --git a/rayon/fn.in_place_scope_fifo.html b/rayon/fn.in_place_scope_fifo.html new file mode 100644 index 0000000000..c3c81dbe3e --- /dev/null +++ b/rayon/fn.in_place_scope_fifo.html @@ -0,0 +1,21 @@ +in_place_scope_fifo in rayon - Rust +

Function rayon::in_place_scope_fifo

source ·
pub fn in_place_scope_fifo<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R,
Expand description

Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.

+

This is just like scope_fifo() except the closure runs on the same thread +that calls in_place_scope_fifo(). Only work that it spawns runs in the +thread pool.

+

§Panics

+

If a panic occurs, either in the closure given to in_place_scope_fifo() or in +any of the spawned jobs, that panic will be propagated and the +call to in_place_scope_fifo() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn_fifo(), it will +execute, even if the spawning task should later panic. in_place_scope_fifo() +returns once all spawned jobs have completed, and any panics are +propagated at that point.

+
\ No newline at end of file diff --git a/rayon/fn.join.html b/rayon/fn.join.html new file mode 100644 index 0000000000..9b34ed3fc3 --- /dev/null +++ b/rayon/fn.join.html @@ -0,0 +1,74 @@ +join in rayon - Rust +

Function rayon::join

source ·
pub fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
where + A: FnOnce() -> RA + Send, + B: FnOnce() -> RB + Send, + RA: Send, + RB: Send,
Expand description

Takes two closures and potentially runs them in parallel. It +returns a pair of the results from those closures.

+

Conceptually, calling join() is similar to spawning two threads, +one executing each of the two closures. However, the +implementation is quite different and incurs very low +overhead. The underlying technique is called “work stealing”: the +Rayon runtime uses a fixed pool of worker threads and attempts to +only execute code in parallel when there are idle CPUs to handle +it.

+

When join is called from outside the thread pool, the calling +thread will block while the closures execute in the pool. When +join is called within the pool, the calling thread still actively +participates in the thread pool. It will begin by executing closure +A (on the current thread). While it is doing that, it will advertise +closure B as being available for other threads to execute. Once closure A +has completed, the current thread will try to execute closure B; +if however closure B has been stolen, then it will look for other work +while waiting for the thief to fully execute closure B. (This is the +typical work-stealing strategy).

+

§Examples

+

This example uses join to perform a quick-sort (note this is not a +particularly optimized implementation: if you actually want to +sort for real, you should prefer the par_sort method offered +by Rayon).

+ +
let mut v = vec![5, 1, 8, 22, 0, 44];
+quick_sort(&mut v);
+assert_eq!(v, vec![0, 1, 5, 8, 22, 44]);
+
+fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
+   if v.len() > 1 {
+       let mid = partition(v);
+       let (lo, hi) = v.split_at_mut(mid);
+       rayon::join(|| quick_sort(lo),
+                   || quick_sort(hi));
+   }
+}
+
+// Partition rearranges all items `<=` to the pivot
+// item (arbitrary selected to be the last item in the slice)
+// to the first half of the slice. It then returns the
+// "dividing point" where the pivot is placed.
+fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
+    let pivot = v.len() - 1;
+    let mut i = 0;
+    for j in 0..pivot {
+        if v[j] <= v[pivot] {
+            v.swap(i, j);
+            i += 1;
+        }
+    }
+    v.swap(i, pivot);
+    i
+}
+

§Warning about blocking I/O

+

The assumption is that the closures given to join() are +CPU-bound tasks that do not perform I/O or other blocking +operations. If you do perform I/O, and that I/O should block +(e.g., waiting for a network request), the overall performance may +be poor. Moreover, if you cause one closure to be blocked waiting +on another (for example, using a channel), that could lead to a +deadlock.

+

§Panics

+

No matter what happens, both closures will always be executed. If +a single closure panics, whether it be the first or second +closure, that panic will be propagated and hence join() will +panic with the same panic value. If both closures panic, join() +will panic with the panic value from the first closure.

+
\ No newline at end of file diff --git a/rayon/fn.join_context.html b/rayon/fn.join_context.html new file mode 100644 index 0000000000..cac333230e --- /dev/null +++ b/rayon/fn.join_context.html @@ -0,0 +1,13 @@ +join_context in rayon - Rust +

Function rayon::join_context

source ·
pub fn join_context<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
where + A: FnOnce(FnContext) -> RA + Send, + B: FnOnce(FnContext) -> RB + Send, + RA: Send, + RB: Send,
Expand description

Identical to join, except that the closures have a parameter +that provides context for the way the closure has been called, +especially indicating whether they’re executing on a different +thread than where join_context was called. This will occur if +the second job is stolen by a different thread, or if +join_context was called from outside the thread pool to begin +with.

+
\ No newline at end of file diff --git a/rayon/fn.max_num_threads.html b/rayon/fn.max_num_threads.html new file mode 100644 index 0000000000..37f5744c04 --- /dev/null +++ b/rayon/fn.max_num_threads.html @@ -0,0 +1,6 @@ +max_num_threads in rayon - Rust +

Function rayon::max_num_threads

source ·
pub fn max_num_threads() -> usize
Expand description

Returns the maximum number of threads that Rayon supports in a single thread-pool.

+

If a higher thread count is requested by calling ThreadPoolBuilder::num_threads or by setting +the RAYON_NUM_THREADS environment variable, then it will be reduced to this maximum.

+

The value may vary between different targets, and is subject to change in new Rayon versions.

+
\ No newline at end of file diff --git a/rayon/fn.scope.html b/rayon/fn.scope.html new file mode 100644 index 0000000000..d95ca9bfe0 --- /dev/null +++ b/rayon/fn.scope.html @@ -0,0 +1,191 @@ +scope in rayon - Rust +

Function rayon::scope

source ·
pub fn scope<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R + Send, + R: Send,
Expand description

Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.

+

scope() is a more flexible building block compared to join(), +since a loop can be used to spawn any number of tasks without +recursing. However, that flexibility comes at a performance price: +tasks spawned using scope() must be allocated onto the heap, +whereas join() can make exclusive use of the stack. Prefer +join() (or, even better, parallel iterators) where possible.

+

§Example

+

The Rayon join() function launches two closures and waits for them +to stop. One could implement join() using a scope like so, although +it would be less efficient than the real implementation:

+ +
pub fn join<A,B,RA,RB>(oper_a: A, oper_b: B) -> (RA, RB)
+    where A: FnOnce() -> RA + Send,
+          B: FnOnce() -> RB + Send,
+          RA: Send,
+          RB: Send,
+{
+    let mut result_a: Option<RA> = None;
+    let mut result_b: Option<RB> = None;
+    rayon::scope(|s| {
+        s.spawn(|_| result_a = Some(oper_a()));
+        s.spawn(|_| result_b = Some(oper_b()));
+    });
+    (result_a.unwrap(), result_b.unwrap())
+}
+

§A note on threading

+

The closure given to scope() executes in the Rayon thread-pool, +as do those given to spawn(). This means that you can’t access +thread-local variables (well, you can, but they may have +unexpected values).

+

§Task execution

+

Task execution potentially starts as soon as spawn() is called. +The task will end sometime before scope() returns. Note that the +closure given to scope may return much earlier. In general +the lifetime of a scope created like scope(body) goes something like this:

+
    +
  • Scope begins when scope(body) is called
  • +
  • Scope body body() is invoked +
      +
    • Scope tasks may be spawned
    • +
    +
  • +
  • Scope body returns
  • +
  • Scope tasks execute, possibly spawning more tasks
  • +
  • Once all tasks are done, scope ends and scope() returns
  • +
+

To see how and when tasks are joined, consider this example:

+ +
// point start
+rayon::scope(|s| {
+    s.spawn(|s| { // task s.1
+        s.spawn(|s| { // task s.1.1
+            rayon::scope(|t| {
+                t.spawn(|_| ()); // task t.1
+                t.spawn(|_| ()); // task t.2
+            });
+        });
+    });
+    s.spawn(|s| { // task s.2
+    });
+    // point mid
+});
+// point end
+

The various tasks that are run will execute roughly like so:

+
| (start)
+|
+| (scope `s` created)
++-----------------------------------------------+ (task s.2)
++-------+ (task s.1)                            |
+|       |                                       |
+|       +---+ (task s.1.1)                      |
+|       |   |                                   |
+|       |   | (scope `t` created)               |
+|       |   +----------------+ (task t.2)       |
+|       |   +---+ (task t.1) |                  |
+| (mid) |   |   |            |                  |
+:       |   + <-+------------+ (scope `t` ends) |
+:       |   |                                   |
+|<------+---+-----------------------------------+ (scope `s` ends)
+|
+| (end)
+
+

The point here is that everything spawned into scope s will +terminate (at latest) at the same point – right before the +original call to rayon::scope returns. This includes new +subtasks created by other subtasks (e.g., task s.1.1). If a new +scope is created (such as t), the things spawned into that scope +will be joined before that scope returns, which in turn occurs +before the creating task (task s.1.1 in this case) finishes.

+

There is no guaranteed order of execution for spawns in a scope, +given that other threads may steal tasks at any time. However, they +are generally prioritized in a LIFO order on the thread from which +they were spawned. So in this example, absent any stealing, we can +expect s.2 to execute before s.1, and t.2 before t.1. Other +threads always steal from the other end of the deque, like FIFO +order. The idea is that “recent” tasks are most likely to be fresh +in the local CPU’s cache, while other threads can steal older +“stale” tasks. For an alternate approach, consider +scope_fifo() instead.

+

§Accessing stack data

+

In general, spawned tasks may access stack data in place that +outlives the scope itself. Other data must be fully owned by the +spawned task.

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    s.spawn(|_| {
+        // We can access `ok` because outlives the scope `s`.
+        println!("ok: {:?}", ok);
+
+        // If we just try to use `bad` here, the closure will borrow `bad`
+        // (because we are just printing it out, and that only requires a
+        // borrow), which will result in a compilation error. Read on
+        // for options.
+        // println!("bad: {:?}", bad);
+   });
+});
+

As the comments example above suggest, to reference bad we must +take ownership of it. One way to do this is to detach the closure +from the surrounding stack frame, using the move keyword. This +will cause it to take ownership of all the variables it touches, +in this case including both ok and bad:

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    s.spawn(move |_| {
+        println!("ok: {:?}", ok);
+        println!("bad: {:?}", bad);
+    });
+
+    // That closure is fine, but now we can't use `ok` anywhere else,
+    // since it is owned by the previous task:
+    // s.spawn(|_| println!("ok: {:?}", ok));
+});
+

While this works, it could be a problem if we want to use ok elsewhere. +There are two choices. We can keep the closure as a move closure, but +instead of referencing the variable ok, we create a shadowed variable that +is a borrow of ok and capture that:

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    let ok: &Vec<i32> = &ok; // shadow the original `ok`
+    s.spawn(move |_| {
+        println!("ok: {:?}", ok); // captures the shadowed version
+        println!("bad: {:?}", bad);
+    });
+
+    // Now we too can use the shadowed `ok`, since `&Vec<i32>` references
+    // can be shared freely. Note that we need a `move` closure here though,
+    // because otherwise we'd be trying to borrow the shadowed `ok`,
+    // and that doesn't outlive `scope`.
+    s.spawn(move |_| println!("ok: {:?}", ok));
+});
+

Another option is not to use the move keyword but instead to take ownership +of individual variables:

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    s.spawn(|_| {
+        // Transfer ownership of `bad` into a local variable (also named `bad`).
+        // This will force the closure to take ownership of `bad` from the environment.
+        let bad = bad;
+        println!("ok: {:?}", ok); // `ok` is only borrowed.
+        println!("bad: {:?}", bad); // refers to our local variable, above.
+    });
+
+    s.spawn(|_| println!("ok: {:?}", ok)); // we too can borrow `ok`
+});
+

§Panics

+

If a panic occurs, either in the closure given to scope() or in +any of the spawned jobs, that panic will be propagated and the +call to scope() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn(), it will +execute, even if the spawning task should later panic. scope() +returns once all spawned jobs have completed, and any panics are +propagated at that point.

+
\ No newline at end of file diff --git a/rayon/fn.scope_fifo.html b/rayon/fn.scope_fifo.html new file mode 100644 index 0000000000..c1fba487b4 --- /dev/null +++ b/rayon/fn.scope_fifo.html @@ -0,0 +1,67 @@ +scope_fifo in rayon - Rust +

Function rayon::scope_fifo

source ·
pub fn scope_fifo<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R + Send, + R: Send,
Expand description

Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.

+

§Task execution

+

Tasks in a scope_fifo() run similarly to scope(), but there’s a +difference in the order of execution. Consider a similar example:

+ +
// point start
+rayon::scope_fifo(|s| {
+    s.spawn_fifo(|s| { // task s.1
+        s.spawn_fifo(|s| { // task s.1.1
+            rayon::scope_fifo(|t| {
+                t.spawn_fifo(|_| ()); // task t.1
+                t.spawn_fifo(|_| ()); // task t.2
+            });
+        });
+    });
+    s.spawn_fifo(|s| { // task s.2
+    });
+    // point mid
+});
+// point end
+

The various tasks that are run will execute roughly like so:

+
| (start)
+|
+| (FIFO scope `s` created)
++--------------------+ (task s.1)
++-------+ (task s.2) |
+|       |            +---+ (task s.1.1)
+|       |            |   |
+|       |            |   | (FIFO scope `t` created)
+|       |            |   +----------------+ (task t.1)
+|       |            |   +---+ (task t.2) |
+| (mid) |            |   |   |            |
+:       |            |   + <-+------------+ (scope `t` ends)
+:       |            |   |
+|<------+------------+---+ (scope `s` ends)
+|
+| (end)
+
+

Under scope_fifo(), the spawns are prioritized in a FIFO order on +the thread from which they were spawned, as opposed to scope()’s +LIFO. So in this example, we can expect s.1 to execute before +s.2, and t.1 before t.2. Other threads also steal tasks in +FIFO order, as usual. Overall, this has roughly the same order as +the now-deprecated breadth_first option, except the effect is +isolated to a particular scope. If spawns are intermingled from any +combination of scope() and scope_fifo(), or from different +threads, their order is only specified with respect to spawns in the +same scope and thread.

+

For more details on this design, see Rayon RFC #1.

+

§Panics

+

If a panic occurs, either in the closure given to scope_fifo() or +in any of the spawned jobs, that panic will be propagated and the +call to scope_fifo() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn_fifo(), it +will execute, even if the spawning task should later panic. +scope_fifo() returns once all spawned jobs have completed, and any +panics are propagated at that point.

+
\ No newline at end of file diff --git a/rayon/fn.spawn.html b/rayon/fn.spawn.html new file mode 100644 index 0000000000..0954b8250a --- /dev/null +++ b/rayon/fn.spawn.html @@ -0,0 +1,40 @@ +spawn in rayon - Rust +

Function rayon::spawn

source ·
pub fn spawn<F>(func: F)
where + F: FnOnce() + Send + 'static,
Expand description

Puts the task into the Rayon threadpool’s job queue in the “static” +or “global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope() +function to create a scope.

+

Since tasks spawned with this function cannot hold references into +the enclosing stack frame, you almost certainly want to use a +move closure as their argument (otherwise, the closure will +typically hold references to any variables from the enclosing +function that you happen to use).

+

This API assumes that the closure is executed purely for its +side-effects (i.e., it might send messages, modify data protected +by a mutex, or some such thing).

+

There is no guaranteed order of execution for spawns, given that +other threads may steal tasks at any time. However, they are +generally prioritized in a LIFO order on the thread from which +they were spawned. Other threads always steal from the other end of +the deque, like FIFO order. The idea is that “recent” tasks are +most likely to be fresh in the local CPU’s cache, while other +threads can steal older “stale” tasks. For an alternate approach, +consider spawn_fifo() instead.

+

§Panic handling

+

If this closure should panic, the resulting panic will be +propagated to the panic handler registered in the ThreadPoolBuilder, +if any. See ThreadPoolBuilder::panic_handler() for more +details.

+

§Examples

+

This code creates a Rayon task that increments a global counter.

+ +
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
+
+static GLOBAL_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
+
+rayon::spawn(move || {
+    GLOBAL_COUNTER.fetch_add(1, Ordering::SeqCst);
+});
+
\ No newline at end of file diff --git a/rayon/fn.spawn_broadcast.html b/rayon/fn.spawn_broadcast.html new file mode 100644 index 0000000000..d1b0df2005 --- /dev/null +++ b/rayon/fn.spawn_broadcast.html @@ -0,0 +1,8 @@ +spawn_broadcast in rayon - Rust +

Function rayon::spawn_broadcast

source ·
pub fn spawn_broadcast<OP>(op: OP)
where + OP: Fn(BroadcastContext<'_>) + Send + Sync + 'static,
Expand description

Spawns an asynchronous task on every thread in this thread-pool. This task +will run in the implicit, global scope, which means that it may outlast the +current stack frame – therefore, it cannot capture any references onto the +stack (you will likely need a move closure).

+

For more information, see the ThreadPool::spawn_broadcast() method.

+
\ No newline at end of file diff --git a/rayon/fn.spawn_fifo.html b/rayon/fn.spawn_fifo.html new file mode 100644 index 0000000000..8d0aa67e68 --- /dev/null +++ b/rayon/fn.spawn_fifo.html @@ -0,0 +1,20 @@ +spawn_fifo in rayon - Rust +

Function rayon::spawn_fifo

source ·
pub fn spawn_fifo<F>(func: F)
where + F: FnOnce() + Send + 'static,
Expand description

Fires off a task into the Rayon threadpool in the “static” or +“global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope_fifo() +function to create a scope.

+

The behavior is essentially the same as the spawn +function, except that calls from the same thread +will be prioritized in FIFO order. This is similar to the now- +deprecated breadth_first option, except the effect is isolated +to relative spawn_fifo calls, not all threadpool tasks.

+

For more details on this design, see Rayon RFC #1.

+

§Panic handling

+

If this closure should panic, the resulting panic will be +propagated to the panic handler registered in the ThreadPoolBuilder, +if any. See ThreadPoolBuilder::panic_handler() for more +details.

+
\ No newline at end of file diff --git a/rayon/fn.yield_local.html b/rayon/fn.yield_local.html new file mode 100644 index 0000000000..45f7baaf32 --- /dev/null +++ b/rayon/fn.yield_local.html @@ -0,0 +1,9 @@ +yield_local in rayon - Rust +

Function rayon::yield_local

source ·
pub fn yield_local() -> Option<Yield>
Expand description

Cooperatively yields execution to local Rayon work.

+

If the current thread is part of a rayon thread pool, this looks for a +single unit of pending work in this thread’s queue, then executes it. +Completion of that work might include nested work or further work stealing.

+

This is similar to yield_now(), but does not steal from other threads.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if this thread is not part of any pool at all.

+
\ No newline at end of file diff --git a/rayon/fn.yield_now.html b/rayon/fn.yield_now.html new file mode 100644 index 0000000000..89fee74da1 --- /dev/null +++ b/rayon/fn.yield_now.html @@ -0,0 +1,11 @@ +yield_now in rayon - Rust +

Function rayon::yield_now

source ·
pub fn yield_now() -> Option<Yield>
Expand description

Cooperatively yields execution to Rayon.

+

If the current thread is part of a rayon thread pool, this looks for a +single unit of pending work in the pool, then executes it. Completion of +that work might include nested work or further work stealing.

+

This is similar to std::thread::yield_now(), but does not literally make +that call. If you are implementing a polling loop, you may want to also +yield to the OS scheduler yourself if no Rayon work was found.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if this thread is not part of any pool at all.

+
\ No newline at end of file diff --git a/rayon/index.html b/rayon/index.html new file mode 100644 index 0000000000..840951bf93 --- /dev/null +++ b/rayon/index.html @@ -0,0 +1,121 @@ +rayon - Rust +

Crate rayon

source ·
Expand description

Rayon is a data-parallelism library that makes it easy to convert sequential +computations into parallel.

+

It is lightweight and convenient for introducing parallelism into existing +code. It guarantees data-race free executions and takes advantage of +parallelism when sensible, based on work-load at runtime.

+

§How to use Rayon

+

There are two ways to use Rayon:

+
    +
  • High-level parallel constructs are the simplest way to use Rayon and also +typically the most efficient. +
      +
    • Parallel iterators make it easy to convert a sequential iterator to +execute in parallel. + +
    • +
    • The par_sort method sorts &mut [T] slices (or vectors) in parallel.
    • +
    • par_extend can be used to efficiently grow collections with items produced +by a parallel iterator.
    • +
    +
  • +
  • Custom tasks let you divide your work into parallel tasks yourself. +
      +
    • join is used to subdivide a task into two pieces.
    • +
    • scope creates a scope within which you can create any number of parallel tasks.
    • +
    • ThreadPoolBuilder can be used to create your own thread pools or customize +the global one.
    • +
    +
  • +
+

§Basic usage and the Rayon prelude

+

First, you will need to add rayon to your Cargo.toml.

+

Next, to use parallel iterators or the other high-level methods, +you need to import several traits. Those traits are bundled into +the module rayon::prelude. It is recommended that you import +all of these traits at once by adding use rayon::prelude::* at +the top of each module that uses Rayon methods.

+

These traits give you access to the par_iter method which provides +parallel implementations of many iterative functions such as map, +for_each, filter, fold, and more.

+

§Crate Layout

+

Rayon extends many of the types found in the standard library with +parallel iterator implementations. The modules in the rayon +crate mirror std itself: so, e.g., the option module in +Rayon contains parallel iterators for the Option type, which is +found in the option module of std. Similarly, the +collections module in Rayon offers parallel iterator types for +the collections from std. You will rarely need to access +these submodules unless you need to name iterator types +explicitly.

+

§Targets without threading

+

Rayon has limited support for targets without std threading implementations. +See the rayon_core documentation for more information about its global fallback.

+

§Other questions?

+

See the Rayon FAQ.

+

Modules§

  • Parallel iterator types for arrays ([T; N])
  • Parallel iterator types for standard collections
  • Traits for writing parallel programs using an iterator-style interface
  • Parallel iterator types for options
  • The rayon prelude imports the various ParallelIterator traits. +The intention is that one can include use rayon::prelude::* and +have easy access to the various traits and methods you will need.
  • Parallel iterator types for ranges, +the type for values created by a..b expressions
  • Parallel iterator types for inclusive ranges, +the type for values created by a..=b expressions
  • Parallel iterator types for results
  • Parallel iterator types for slices
  • Parallel iterator types for strings
  • This module contains the parallel iterator types for owned strings +(String). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.
  • Parallel iterator types for vectors (Vec<T>)

Structs§

Enums§

Functions§

  • Executes op within every thread in the current threadpool. If this is +called from a non-Rayon thread, it will execute in the global threadpool. +Any attempts to use join, scope, or parallel iterators will then operate +within that threadpool. When the call has completed on each thread, returns +a vector containing all of their return values.
  • Returns the number of threads in the current registry. If this +code is executing within a Rayon thread-pool, then this will be +the number of threads for the thread-pool of the current +thread. Otherwise, it will be the number of threads for the global +thread-pool.
  • If called from a Rayon worker thread, returns the index of that +thread within its current pool; if not called from a Rayon thread, +returns None.
  • Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.
  • Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.
  • Takes two closures and potentially runs them in parallel. It +returns a pair of the results from those closures.
  • Identical to join, except that the closures have a parameter +that provides context for the way the closure has been called, +especially indicating whether they’re executing on a different +thread than where join_context was called. This will occur if +the second job is stolen by a different thread, or if +join_context was called from outside the thread pool to begin +with.
  • Returns the maximum number of threads that Rayon supports in a single thread-pool.
  • Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.
  • Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.
  • Puts the task into the Rayon threadpool’s job queue in the “static” +or “global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope() +function to create a scope.
  • Spawns an asynchronous task on every thread in this thread-pool. This task +will run in the implicit, global scope, which means that it may outlast the +current stack frame – therefore, it cannot capture any references onto the +stack (you will likely need a move closure).
  • Fires off a task into the Rayon threadpool in the “static” or +“global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope_fifo() +function to create a scope.
  • Cooperatively yields execution to local Rayon work.
  • Cooperatively yields execution to Rayon.
\ No newline at end of file diff --git a/rayon/iter/blocks/struct.ExponentialBlocks.html b/rayon/iter/blocks/struct.ExponentialBlocks.html new file mode 100644 index 0000000000..9a8822a975 --- /dev/null +++ b/rayon/iter/blocks/struct.ExponentialBlocks.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.ExponentialBlocks.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/blocks/struct.UniformBlocks.html b/rayon/iter/blocks/struct.UniformBlocks.html new file mode 100644 index 0000000000..60e8fa22c8 --- /dev/null +++ b/rayon/iter/blocks/struct.UniformBlocks.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.UniformBlocks.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/chain/struct.Chain.html b/rayon/iter/chain/struct.Chain.html new file mode 100644 index 0000000000..874e6e2f20 --- /dev/null +++ b/rayon/iter/chain/struct.Chain.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Chain.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/chunks/struct.Chunks.html b/rayon/iter/chunks/struct.Chunks.html new file mode 100644 index 0000000000..903c11a0bb --- /dev/null +++ b/rayon/iter/chunks/struct.Chunks.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Chunks.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/cloned/struct.Cloned.html b/rayon/iter/cloned/struct.Cloned.html new file mode 100644 index 0000000000..4921a052c3 --- /dev/null +++ b/rayon/iter/cloned/struct.Cloned.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Cloned.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/copied/struct.Copied.html b/rayon/iter/copied/struct.Copied.html new file mode 100644 index 0000000000..90ec1d8d48 --- /dev/null +++ b/rayon/iter/copied/struct.Copied.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Copied.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/empty/fn.empty.html b/rayon/iter/empty/fn.empty.html new file mode 100644 index 0000000000..18392cd294 --- /dev/null +++ b/rayon/iter/empty/fn.empty.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.empty.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/empty/struct.Empty.html b/rayon/iter/empty/struct.Empty.html new file mode 100644 index 0000000000..065ed93220 --- /dev/null +++ b/rayon/iter/empty/struct.Empty.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Empty.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/enum.Either.html b/rayon/iter/enum.Either.html new file mode 100644 index 0000000000..56e5f76246 --- /dev/null +++ b/rayon/iter/enum.Either.html @@ -0,0 +1,1019 @@ +Either in rayon::iter - Rust +

Enum rayon::iter::Either

source ·
pub enum Either<L, R> {
+    Left(L),
+    Right(R),
+}
Expand description

The enum Either with variants Left and Right is a general purpose +sum type with two cases.

+

The Either type is symmetric and treats its variants the same way, without +preference. +(For representing success or error, use the regular Result enum instead.)

+

Variants§

§

Left(L)

A value of type L.

+
§

Right(R)

A value of type R.

+

Implementations§

source§

impl<L, R> Either<L, R>

source

pub fn is_left(&self) -> bool

Return true if the value is the Left variant.

+ +
use either::*;
+
+let values = [Left(1), Right("the right value")];
+assert_eq!(values[0].is_left(), true);
+assert_eq!(values[1].is_left(), false);
+
source

pub fn is_right(&self) -> bool

Return true if the value is the Right variant.

+ +
use either::*;
+
+let values = [Left(1), Right("the right value")];
+assert_eq!(values[0].is_right(), false);
+assert_eq!(values[1].is_right(), true);
+
source

pub fn left(self) -> Option<L>

Convert the left side of Either<L, R> to an Option<L>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left("some value");
+assert_eq!(left.left(),  Some("some value"));
+
+let right: Either<(), _> = Right(321);
+assert_eq!(right.left(), None);
+
source

pub fn right(self) -> Option<R>

Convert the right side of Either<L, R> to an Option<R>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left("some value");
+assert_eq!(left.right(),  None);
+
+let right: Either<(), _> = Right(321);
+assert_eq!(right.right(), Some(321));
+
source

pub fn as_ref(&self) -> Either<&L, &R>

Convert &Either<L, R> to Either<&L, &R>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left("some value");
+assert_eq!(left.as_ref(), Left(&"some value"));
+
+let right: Either<(), _> = Right("some value");
+assert_eq!(right.as_ref(), Right(&"some value"));
+
source

pub fn as_mut(&mut self) -> Either<&mut L, &mut R>

Convert &mut Either<L, R> to Either<&mut L, &mut R>.

+ +
use either::*;
+
+fn mutate_left(value: &mut Either<u32, u32>) {
+    if let Some(l) = value.as_mut().left() {
+        *l = 999;
+    }
+}
+
+let mut left = Left(123);
+let mut right = Right(123);
+mutate_left(&mut left);
+mutate_left(&mut right);
+assert_eq!(left, Left(999));
+assert_eq!(right, Right(123));
+
source

pub fn as_pin_ref(self: Pin<&Either<L, R>>) -> Either<Pin<&L>, Pin<&R>>

Convert Pin<&Either<L, R>> to Either<Pin<&L>, Pin<&R>>, +pinned projections of the inner variants.

+
source

pub fn as_pin_mut( + self: Pin<&mut Either<L, R>> +) -> Either<Pin<&mut L>, Pin<&mut R>>

Convert Pin<&mut Either<L, R>> to Either<Pin<&mut L>, Pin<&mut R>>, +pinned projections of the inner variants.

+
source

pub fn flip(self) -> Either<R, L>

Convert Either<L, R> to Either<R, L>.

+ +
use either::*;
+
+let left: Either<_, ()> = Left(123);
+assert_eq!(left.flip(), Right(123));
+
+let right: Either<(), _> = Right("some value");
+assert_eq!(right.flip(), Left("some value"));
+
source

pub fn map_left<F, M>(self, f: F) -> Either<M, R>
where + F: FnOnce(L) -> M,

Apply the function f on the value in the Left variant if it is present rewrapping the +result in Left.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.map_left(|x| x * 2), Left(246));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.map_left(|x| x * 2), Right(123));
+
source

pub fn map_right<F, S>(self, f: F) -> Either<L, S>
where + F: FnOnce(R) -> S,

Apply the function f on the value in the Right variant if it is present rewrapping the +result in Right.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.map_right(|x| x * 2), Left(123));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.map_right(|x| x * 2), Right(246));
+
source

pub fn map_either<F, G, M, S>(self, f: F, g: G) -> Either<M, S>
where + F: FnOnce(L) -> M, + G: FnOnce(R) -> S,

Apply the functions f and g to the Left and Right variants +respectively. This is equivalent to +bimap +in functional programming.

+ +
use either::*;
+
+let f = |s: String| s.len();
+let g = |u: u8| u.to_string();
+
+let left: Either<String, u8> = Left("loopy".into());
+assert_eq!(left.map_either(f, g), Left(5));
+
+let right: Either<String, u8> = Right(42);
+assert_eq!(right.map_either(f, g), Right("42".into()));
+
source

pub fn map_either_with<Ctx, F, G, M, S>( + self, + ctx: Ctx, + f: F, + g: G +) -> Either<M, S>
where + F: FnOnce(Ctx, L) -> M, + G: FnOnce(Ctx, R) -> S,

Similar to map_either, with an added context ctx accessible to +both functions.

+ +
use either::*;
+
+let mut sum = 0;
+
+// Both closures want to update the same value, so pass it as context.
+let mut f = |sum: &mut usize, s: String| { *sum += s.len(); s.to_uppercase() };
+let mut g = |sum: &mut usize, u: usize| { *sum += u; u.to_string() };
+
+let left: Either<String, usize> = Left("loopy".into());
+assert_eq!(left.map_either_with(&mut sum, &mut f, &mut g), Left("LOOPY".into()));
+
+let right: Either<String, usize> = Right(42);
+assert_eq!(right.map_either_with(&mut sum, &mut f, &mut g), Right("42".into()));
+
+assert_eq!(sum, 47);
+
source

pub fn either<F, G, T>(self, f: F, g: G) -> T
where + F: FnOnce(L) -> T, + G: FnOnce(R) -> T,

Apply one of two functions depending on contents, unifying their result. If the value is +Left(L) then the first function f is applied; if it is Right(R) then the second +function g is applied.

+ +
use either::*;
+
+fn square(n: u32) -> i32 { (n * n) as i32 }
+fn negate(n: i32) -> i32 { -n }
+
+let left: Either<u32, i32> = Left(4);
+assert_eq!(left.either(square, negate), 16);
+
+let right: Either<u32, i32> = Right(-4);
+assert_eq!(right.either(square, negate), 4);
+
source

pub fn either_with<Ctx, F, G, T>(self, ctx: Ctx, f: F, g: G) -> T
where + F: FnOnce(Ctx, L) -> T, + G: FnOnce(Ctx, R) -> T,

Like either, but provide some context to whichever of the +functions ends up being called.

+ +
// In this example, the context is a mutable reference
+use either::*;
+
+let mut result = Vec::new();
+
+let values = vec![Left(2), Right(2.7)];
+
+for value in values {
+    value.either_with(&mut result,
+                      |ctx, integer| ctx.push(integer),
+                      |ctx, real| ctx.push(f64::round(real) as i32));
+}
+
+assert_eq!(result, vec![2, 3]);
+
source

pub fn left_and_then<F, S>(self, f: F) -> Either<S, R>
where + F: FnOnce(L) -> Either<S, R>,

Apply the function f on the value in the Left variant if it is present.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.left_and_then::<_,()>(|x| Right(x * 2)), Right(246));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.left_and_then(|x| Right::<(), _>(x * 2)), Right(123));
+
source

pub fn right_and_then<F, S>(self, f: F) -> Either<L, S>
where + F: FnOnce(R) -> Either<L, S>,

Apply the function f on the value in the Right variant if it is present.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.right_and_then(|x| Right(x * 2)), Left(123));
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.right_and_then(|x| Right(x * 2)), Right(246));
+
source

pub fn into_iter( + self +) -> Either<<L as IntoIterator>::IntoIter, <R as IntoIterator>::IntoIter>
where + L: IntoIterator, + R: IntoIterator<Item = <L as IntoIterator>::Item>,

Convert the inner value to an iterator.

+

This requires the Left and Right iterators to have the same item type. +See factor_into_iter to iterate different types.

+ +
use either::*;
+
+let left: Either<_, Vec<u32>> = Left(vec![1, 2, 3, 4, 5]);
+let mut right: Either<Vec<u32>, _> = Right(vec![]);
+right.extend(left.into_iter());
+assert_eq!(right, Right(vec![1, 2, 3, 4, 5]));
+
source

pub fn iter( + &self +) -> Either<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter>
where + &'a L: for<'a> IntoIterator, + &'a R: for<'a> IntoIterator<Item = <&'a L as IntoIterator>::Item>,

Borrow the inner value as an iterator.

+

This requires the Left and Right iterators to have the same item type. +See factor_iter to iterate different types.

+ +
use either::*;
+
+let left: Either<_, &[u32]> = Left(vec![2, 3]);
+let mut right: Either<Vec<u32>, _> = Right(&[4, 5][..]);
+let mut all = vec![1];
+all.extend(left.iter());
+all.extend(right.iter());
+assert_eq!(all, vec![1, 2, 3, 4, 5]);
+
source

pub fn iter_mut( + &mut self +) -> Either<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter>
where + &'a mut L: for<'a> IntoIterator, + &'a mut R: for<'a> IntoIterator<Item = <&'a mut L as IntoIterator>::Item>,

Mutably borrow the inner value as an iterator.

+

This requires the Left and Right iterators to have the same item type. +See factor_iter_mut to iterate different types.

+ +
use either::*;
+
+let mut left: Either<_, &mut [u32]> = Left(vec![2, 3]);
+for l in left.iter_mut() {
+    *l *= *l
+}
+assert_eq!(left, Left(vec![4, 9]));
+
+let mut inner = [4, 5];
+let mut right: Either<Vec<u32>, _> = Right(&mut inner[..]);
+for r in right.iter_mut() {
+    *r *= *r
+}
+assert_eq!(inner, [16, 25]);
+
source

pub fn factor_into_iter( + self +) -> IterEither<<L as IntoIterator>::IntoIter, <R as IntoIterator>::IntoIter>
where + L: IntoIterator, + R: IntoIterator,

Converts an Either of Iterators to be an Iterator of Eithers

+

Unlike into_iter, this does not require the +Left and Right iterators to have the same item type.

+ +
use either::*;
+let left: Either<_, Vec<u8>> = Left(&["hello"]);
+assert_eq!(left.factor_into_iter().next(), Some(Left(&"hello")));
+let right: Either<&[&str], _> = Right(vec![0, 1]);
+assert_eq!(right.factor_into_iter().collect::<Vec<_>>(), vec![Right(0), Right(1)]);
+
+
source

pub fn factor_iter( + &self +) -> IterEither<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter>
where + &'a L: for<'a> IntoIterator, + &'a R: for<'a> IntoIterator,

Borrows an Either of Iterators to be an Iterator of Eithers

+

Unlike iter, this does not require the +Left and Right iterators to have the same item type.

+ +
use either::*;
+let left: Either<_, Vec<u8>> = Left(["hello"]);
+assert_eq!(left.factor_iter().next(), Some(Left(&"hello")));
+let right: Either<[&str; 2], _> = Right(vec![0, 1]);
+assert_eq!(right.factor_iter().collect::<Vec<_>>(), vec![Right(&0), Right(&1)]);
+
+
source

pub fn factor_iter_mut( + &mut self +) -> IterEither<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter>
where + &'a mut L: for<'a> IntoIterator, + &'a mut R: for<'a> IntoIterator,

Mutably borrows an Either of Iterators to be an Iterator of Eithers

+

Unlike iter_mut, this does not require the +Left and Right iterators to have the same item type.

+ +
use either::*;
+let mut left: Either<_, Vec<u8>> = Left(["hello"]);
+left.factor_iter_mut().for_each(|x| *x.unwrap_left() = "goodbye");
+assert_eq!(left, Left(["goodbye"]));
+let mut right: Either<[&str; 2], _> = Right(vec![0, 1, 2]);
+right.factor_iter_mut().for_each(|x| if let Right(r) = x { *r = -*r; });
+assert_eq!(right, Right(vec![0, -1, -2]));
+
+
source

pub fn left_or(self, other: L) -> L

Return left value or given value

+

Arguments passed to left_or are eagerly evaluated; if you are passing +the result of a function call, it is recommended to use +left_or_else, which is lazily evaluated.

+
§Examples
+
let left: Either<&str, &str> = Left("left");
+assert_eq!(left.left_or("foo"), "left");
+
+let right: Either<&str, &str> = Right("right");
+assert_eq!(right.left_or("left"), "left");
+
source

pub fn left_or_default(self) -> L
where + L: Default,

Return left or a default

+
§Examples
+
let left: Either<String, u32> = Left("left".to_string());
+assert_eq!(left.left_or_default(), "left");
+
+let right: Either<String, u32> = Right(42);
+assert_eq!(right.left_or_default(), String::default());
+
source

pub fn left_or_else<F>(self, f: F) -> L
where + F: FnOnce(R) -> L,

Returns left value or computes it from a closure

+
§Examples
+
let left: Either<String, u32> = Left("3".to_string());
+assert_eq!(left.left_or_else(|_| unreachable!()), "3");
+
+let right: Either<String, u32> = Right(3);
+assert_eq!(right.left_or_else(|x| x.to_string()), "3");
+
source

pub fn right_or(self, other: R) -> R

Return right value or given value

+

Arguments passed to right_or are eagerly evaluated; if you are passing +the result of a function call, it is recommended to use +right_or_else, which is lazily evaluated.

+
§Examples
+
let right: Either<&str, &str> = Right("right");
+assert_eq!(right.right_or("foo"), "right");
+
+let left: Either<&str, &str> = Left("left");
+assert_eq!(left.right_or("right"), "right");
+
source

pub fn right_or_default(self) -> R
where + R: Default,

Return right or a default

+
§Examples
+
let left: Either<String, u32> = Left("left".to_string());
+assert_eq!(left.right_or_default(), u32::default());
+
+let right: Either<String, u32> = Right(42);
+assert_eq!(right.right_or_default(), 42);
+
source

pub fn right_or_else<F>(self, f: F) -> R
where + F: FnOnce(L) -> R,

Returns right value or computes it from a closure

+
§Examples
+
let left: Either<String, u32> = Left("3".to_string());
+assert_eq!(left.right_or_else(|x| x.parse().unwrap()), 3);
+
+let right: Either<String, u32> = Right(3);
+assert_eq!(right.right_or_else(|_| unreachable!()), 3);
+
source

pub fn unwrap_left(self) -> L
where + R: Debug,

Returns the left value

+
§Examples
+
let left: Either<_, ()> = Left(3);
+assert_eq!(left.unwrap_left(), 3);
+
§Panics
+

When Either is a Right value

+ +
let right: Either<(), _> = Right(3);
+right.unwrap_left();
+
source

pub fn unwrap_right(self) -> R
where + L: Debug,

Returns the right value

+
§Examples
+
let right: Either<(), _> = Right(3);
+assert_eq!(right.unwrap_right(), 3);
+
§Panics
+

When Either is a Left value

+ +
let left: Either<_, ()> = Left(3);
+left.unwrap_right();
+
source

pub fn expect_left(self, msg: &str) -> L
where + R: Debug,

Returns the left value

+
§Examples
+
let left: Either<_, ()> = Left(3);
+assert_eq!(left.expect_left("value was Right"), 3);
+
§Panics
+

When Either is a Right value

+ +
let right: Either<(), _> = Right(3);
+right.expect_left("value was Right");
+
source

pub fn expect_right(self, msg: &str) -> R
where + L: Debug,

Returns the right value

+
§Examples
+
let right: Either<(), _> = Right(3);
+assert_eq!(right.expect_right("value was Left"), 3);
+
§Panics
+

When Either is a Left value

+ +
let left: Either<_, ()> = Left(3);
+left.expect_right("value was Right");
+
source

pub fn either_into<T>(self) -> T
where + L: Into<T>, + R: Into<T>,

Convert the contained value into T

+
§Examples
+
// Both u16 and u32 can be converted to u64.
+let left: Either<u16, u32> = Left(3u16);
+assert_eq!(left.either_into::<u64>(), 3u64);
+let right: Either<u16, u32> = Right(7u32);
+assert_eq!(right.either_into::<u64>(), 7u64);
+
source§

impl<L, R> Either<Option<L>, Option<R>>

source

pub fn factor_none(self) -> Option<Either<L, R>>

Factors out None from an Either of Option.

+ +
use either::*;
+let left: Either<_, Option<String>> = Left(Some(vec![0]));
+assert_eq!(left.factor_none(), Some(Left(vec![0])));
+
+let right: Either<Option<Vec<u8>>, _> = Right(Some(String::new()));
+assert_eq!(right.factor_none(), Some(Right(String::new())));
+
source§

impl<L, R, E> Either<Result<L, E>, Result<R, E>>

source

pub fn factor_err(self) -> Result<Either<L, R>, E>

Factors out a homogenous type from an Either of Result.

+

Here, the homogeneous type is the Err type of the Result.

+ +
use either::*;
+let left: Either<_, Result<String, u32>> = Left(Ok(vec![0]));
+assert_eq!(left.factor_err(), Ok(Left(vec![0])));
+
+let right: Either<Result<Vec<u8>, u32>, _> = Right(Ok(String::new()));
+assert_eq!(right.factor_err(), Ok(Right(String::new())));
+
source§

impl<T, L, R> Either<Result<T, L>, Result<T, R>>

source

pub fn factor_ok(self) -> Result<T, Either<L, R>>

Factors out a homogenous type from an Either of Result.

+

Here, the homogeneous type is the Ok type of the Result.

+ +
use either::*;
+let left: Either<_, Result<u32, String>> = Left(Err(vec![0]));
+assert_eq!(left.factor_ok(), Err(Left(vec![0])));
+
+let right: Either<Result<u32, Vec<u8>>, _> = Right(Err(String::new()));
+assert_eq!(right.factor_ok(), Err(Right(String::new())));
+
source§

impl<T, L, R> Either<(T, L), (T, R)>

source

pub fn factor_first(self) -> (T, Either<L, R>)

Factor out a homogeneous type from an either of pairs.

+

Here, the homogeneous type is the first element of the pairs.

+ +
use either::*;
+let left: Either<_, (u32, String)> = Left((123, vec![0]));
+assert_eq!(left.factor_first().0, 123);
+
+let right: Either<(u32, Vec<u8>), _> = Right((123, String::new()));
+assert_eq!(right.factor_first().0, 123);
+
source§

impl<T, L, R> Either<(L, T), (R, T)>

source

pub fn factor_second(self) -> (Either<L, R>, T)

Factor out a homogeneous type from an either of pairs.

+

Here, the homogeneous type is the second element of the pairs.

+ +
use either::*;
+let left: Either<_, (String, u32)> = Left((vec![0], 123));
+assert_eq!(left.factor_second().1, 123);
+
+let right: Either<(Vec<u8>, u32), _> = Right((String::new(), 123));
+assert_eq!(right.factor_second().1, 123);
+
source§

impl<T> Either<T, T>

source

pub fn into_inner(self) -> T

Extract the value of an either over two equivalent types.

+ +
use either::*;
+
+let left: Either<_, u32> = Left(123);
+assert_eq!(left.into_inner(), 123);
+
+let right: Either<u32, _> = Right(123);
+assert_eq!(right.into_inner(), 123);
+
source

pub fn map<F, M>(self, f: F) -> Either<M, M>
where + F: FnOnce(T) -> M,

Map f over the contained value and return the result in the +corresponding variant.

+ +
use either::*;
+
+let value: Either<_, i32> = Right(42);
+
+let other = value.map(|x| x * 2);
+assert_eq!(other, Right(84));
+

Trait Implementations§

source§

impl<L, R, Target> AsMut<[Target]> for Either<L, R>
where + L: AsMut<[Target]>, + R: AsMut<[Target]>,

source§

fn as_mut(&mut self) -> &mut [Target]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<L, R, Target> AsMut<Target> for Either<L, R>
where + L: AsMut<Target>, + R: AsMut<Target>,

source§

fn as_mut(&mut self) -> &mut Target

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<L, R> AsMut<str> for Either<L, R>
where + L: AsMut<str>, + R: AsMut<str>,

source§

fn as_mut(&mut self) -> &mut str

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<L, R, Target> AsRef<[Target]> for Either<L, R>
where + L: AsRef<[Target]>, + R: AsRef<[Target]>,

source§

fn as_ref(&self) -> &[Target]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<L, R, Target> AsRef<Target> for Either<L, R>
where + L: AsRef<Target>, + R: AsRef<Target>,

source§

fn as_ref(&self) -> &Target

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<L, R> AsRef<str> for Either<L, R>
where + L: AsRef<str>, + R: AsRef<str>,

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<L, R> Clone for Either<L, R>
where + L: Clone, + R: Clone,

source§

fn clone(&self) -> Either<L, R>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Either<L, R>)

Performs copy-assignment from source. Read more
source§

impl<L, R> Debug for Either<L, R>
where + L: Debug, + R: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<L, R> Deref for Either<L, R>
where + L: Deref, + R: Deref<Target = <L as Deref>::Target>,

§

type Target = <L as Deref>::Target

The resulting type after dereferencing.
source§

fn deref(&self) -> &<Either<L, R> as Deref>::Target

Dereferences the value.
source§

impl<L, R> DerefMut for Either<L, R>
where + L: DerefMut, + R: DerefMut<Target = <L as Deref>::Target>,

source§

fn deref_mut(&mut self) -> &mut <Either<L, R> as Deref>::Target

Mutably dereferences the value.
source§

impl<L, R> Display for Either<L, R>
where + L: Display, + R: Display,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<L, R> DoubleEndedIterator for Either<L, R>
where + L: DoubleEndedIterator, + R: DoubleEndedIterator<Item = <L as Iterator>::Item>,

source§

fn next_back(&mut self) -> Option<<Either<L, R> as Iterator>::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn nth_back(&mut self, n: usize) -> Option<<Either<L, R> as Iterator>::Item>

Returns the nth element from the end of the iterator. Read more
source§

fn rfold<Acc, G>(self, init: Acc, f: G) -> Acc
where + G: FnMut(Acc, <Either<L, R> as Iterator>::Item) -> Acc,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
source§

fn rfind<P>(&mut self, predicate: P) -> Option<<Either<L, R> as Iterator>::Item>
where + P: FnMut(&<Either<L, R> as Iterator>::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
source§

impl<L, R> ExactSizeIterator for Either<L, R>
where + L: ExactSizeIterator, + R: ExactSizeIterator<Item = <L as Iterator>::Item>,

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<L, R, A> Extend<A> for Either<L, R>
where + L: Extend<A>, + R: Extend<A>,

source§

fn extend<T>(&mut self, iter: T)
where + T: IntoIterator<Item = A>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<L, R> From<Result<R, L>> for Either<L, R>

Convert from Result to Either with Ok => Right and Err => Left.

+
source§

fn from(r: Result<R, L>) -> Either<L, R>

Converts to this type from the input type.
source§

impl<L, R, A, B> FromParallelIterator<Either<L, R>> for (A, B)
where + L: Send, + R: Send, + A: Send + FromParallelIterator<L>, + B: Send + FromParallelIterator<R>,

source§

fn from_par_iter<I>(pi: I) -> Self
where + I: IntoParallelIterator<Item = Either<L, R>>,

Creates an instance of the collection from the parallel iterator par_iter. Read more
source§

impl<L, R> Future for Either<L, R>
where + L: Future, + R: Future<Output = <L as Future>::Output>,

Either<L, R> is a future if both L and R are futures.

+
§

type Output = <L as Future>::Output

The type of value produced on completion.
source§

fn poll( + self: Pin<&mut Either<L, R>>, + cx: &mut Context<'_> +) -> Poll<<Either<L, R> as Future>::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more
source§

impl<L, R> Hash for Either<L, R>
where + L: Hash, + R: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<L, R> IndexedParallelIterator for Either<L, R>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<L, R> Into<Result<R, L>> for Either<L, R>

Convert from Either to Result with Right => Ok and Left => Err.

+
source§

fn into(self) -> Result<R, L>

Converts this type into the (usually inferred) input type.
source§

impl<L, R> Iterator for Either<L, R>
where + L: Iterator, + R: Iterator<Item = <L as Iterator>::Item>,

Either<L, R> is an iterator if both L and R are iterators.

+
§

type Item = <L as Iterator>::Item

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<<Either<L, R> as Iterator>::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn fold<Acc, G>(self, init: Acc, f: G) -> Acc
where + G: FnMut(Acc, <Either<L, R> as Iterator>::Item) -> Acc,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
source§

fn for_each<F>(self, f: F)
where + F: FnMut(<Either<L, R> as Iterator>::Item),

Calls a closure on each element of an iterator. Read more
source§

fn count(self) -> usize

Consumes the iterator, counting the number of iterations and returning it. Read more
source§

fn last(self) -> Option<<Either<L, R> as Iterator>::Item>

Consumes the iterator, returning the last element. Read more
source§

fn nth(&mut self, n: usize) -> Option<<Either<L, R> as Iterator>::Item>

Returns the nth element of the iterator. Read more
source§

fn collect<B>(self) -> B
where + B: FromIterator<<Either<L, R> as Iterator>::Item>,

Transforms an iterator into a collection. Read more
source§

fn partition<B, F>(self, f: F) -> (B, B)
where + B: Default + Extend<<Either<L, R> as Iterator>::Item>, + F: FnMut(&<Either<L, R> as Iterator>::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn all<F>(&mut self, f: F) -> bool
where + F: FnMut(<Either<L, R> as Iterator>::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
source§

fn any<F>(&mut self, f: F) -> bool
where + F: FnMut(<Either<L, R> as Iterator>::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
source§

fn find<P>(&mut self, predicate: P) -> Option<<Either<L, R> as Iterator>::Item>
where + P: FnMut(&<Either<L, R> as Iterator>::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + F: FnMut(<Either<L, R> as Iterator>::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(<Either<L, R> as Iterator>::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> bool,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<L, R> Ord for Either<L, R>
where + L: Ord, + R: Ord,

source§

fn cmp(&self, other: &Either<L, R>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<L, R, A, B> ParallelExtend<Either<L, R>> for (A, B)
where + L: Send, + R: Send, + A: Send + ParallelExtend<L>, + B: Send + ParallelExtend<R>,

source§

fn par_extend<I>(&mut self, pi: I)
where + I: IntoParallelIterator<Item = Either<L, R>>,

Extends an instance of the collection with the elements drawn +from the parallel iterator par_iter. Read more
source§

impl<L, R, T> ParallelExtend<T> for Either<L, R>
where + L: ParallelExtend<T>, + R: ParallelExtend<T>, + T: Send,

Either<L, R> can be extended if both L and R are parallel extendable.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

Extends an instance of the collection with the elements drawn +from the parallel iterator par_iter. Read more
source§

impl<L, R> ParallelIterator for Either<L, R>
where + L: ParallelIterator, + R: ParallelIterator<Item = L::Item>,

Either<L, R> is a parallel iterator if both L and R are parallel iterators.

+
§

type Item = <L as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<L, R> PartialEq for Either<L, R>
where + L: PartialEq, + R: PartialEq,

source§

fn eq(&self, other: &Either<L, R>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<L, R> PartialOrd for Either<L, R>
where + L: PartialOrd, + R: PartialOrd,

source§

fn partial_cmp(&self, other: &Either<L, R>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl<L, R> Copy for Either<L, R>
where + L: Copy, + R: Copy,

source§

impl<L, R> Eq for Either<L, R>
where + L: Eq, + R: Eq,

source§

impl<L, R> FusedIterator for Either<L, R>
where + L: FusedIterator, + R: FusedIterator<Item = <L as Iterator>::Item>,

source§

impl<L, R> StructuralPartialEq for Either<L, R>

Auto Trait Implementations§

§

impl<L, R> Freeze for Either<L, R>
where + L: Freeze, + R: Freeze,

§

impl<L, R> RefUnwindSafe for Either<L, R>
where + L: RefUnwindSafe, + R: RefUnwindSafe,

§

impl<L, R> Send for Either<L, R>
where + L: Send, + R: Send,

§

impl<L, R> Sync for Either<L, R>
where + L: Sync, + R: Sync,

§

impl<L, R> Unpin for Either<L, R>
where + L: Unpin, + R: Unpin,

§

impl<L, R> UnwindSafe for Either<L, R>
where + L: UnwindSafe, + R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<F> IntoFuture for F
where + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/enumerate/struct.Enumerate.html b/rayon/iter/enumerate/struct.Enumerate.html new file mode 100644 index 0000000000..65ff148277 --- /dev/null +++ b/rayon/iter/enumerate/struct.Enumerate.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Enumerate.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/filter/struct.Filter.html b/rayon/iter/filter/struct.Filter.html new file mode 100644 index 0000000000..ea557a22f7 --- /dev/null +++ b/rayon/iter/filter/struct.Filter.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Filter.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/filter_map/struct.FilterMap.html b/rayon/iter/filter_map/struct.FilterMap.html new file mode 100644 index 0000000000..69f892fce7 --- /dev/null +++ b/rayon/iter/filter_map/struct.FilterMap.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.FilterMap.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/flat_map/struct.FlatMap.html b/rayon/iter/flat_map/struct.FlatMap.html new file mode 100644 index 0000000000..1e6b3cde25 --- /dev/null +++ b/rayon/iter/flat_map/struct.FlatMap.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.FlatMap.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/flat_map_iter/struct.FlatMapIter.html b/rayon/iter/flat_map_iter/struct.FlatMapIter.html new file mode 100644 index 0000000000..13e2f7625d --- /dev/null +++ b/rayon/iter/flat_map_iter/struct.FlatMapIter.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.FlatMapIter.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/flatten/struct.Flatten.html b/rayon/iter/flatten/struct.Flatten.html new file mode 100644 index 0000000000..274aa659fa --- /dev/null +++ b/rayon/iter/flatten/struct.Flatten.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Flatten.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/flatten_iter/struct.FlattenIter.html b/rayon/iter/flatten_iter/struct.FlattenIter.html new file mode 100644 index 0000000000..286457c017 --- /dev/null +++ b/rayon/iter/flatten_iter/struct.FlattenIter.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.FlattenIter.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/fn.empty.html b/rayon/iter/fn.empty.html new file mode 100644 index 0000000000..146855ffc7 --- /dev/null +++ b/rayon/iter/fn.empty.html @@ -0,0 +1,14 @@ +empty in rayon::iter - Rust +

Function rayon::iter::empty

source ·
pub fn empty<T: Send>() -> Empty<T>
Expand description

Creates a parallel iterator that produces nothing.

+

This admits no parallelism on its own, but it could be used for code that +deals with generic parallel iterators.

+

§Examples

+
use rayon::prelude::*;
+use rayon::iter::empty;
+
+let pi = (0..1234).into_par_iter()
+    .chain(empty())
+    .chain(1234..10_000);
+
+assert_eq!(pi.count(), 10_000);
+
\ No newline at end of file diff --git a/rayon/iter/fn.once.html b/rayon/iter/fn.once.html new file mode 100644 index 0000000000..beee914960 --- /dev/null +++ b/rayon/iter/fn.once.html @@ -0,0 +1,17 @@ +once in rayon::iter - Rust +

Function rayon::iter::once

source ·
pub fn once<T: Send>(item: T) -> Once<T>
Expand description

Creates a parallel iterator that produces an element exactly once.

+

This admits no parallelism on its own, but it could be chained to existing +parallel iterators to extend their contents, or otherwise used for any code +that deals with generic parallel iterators.

+

§Examples

+
use rayon::prelude::*;
+use rayon::iter::once;
+
+let pi = (0..1234).into_par_iter()
+    .chain(once(-1))
+    .chain(1234..10_000);
+
+assert_eq!(pi.clone().count(), 10_001);
+assert_eq!(pi.clone().filter(|&x| x < 0).count(), 1);
+assert_eq!(pi.position_any(|x| x < 0), Some(1234));
+
\ No newline at end of file diff --git a/rayon/iter/fn.repeat.html b/rayon/iter/fn.repeat.html new file mode 100644 index 0000000000..74db3db9b1 --- /dev/null +++ b/rayon/iter/fn.repeat.html @@ -0,0 +1,12 @@ +repeat in rayon::iter - Rust +

Function rayon::iter::repeat

source ·
pub fn repeat<T: Clone + Send>(elt: T) -> Repeat<T>
Expand description

Creates a parallel iterator that endlessly repeats elt (by +cloning it). Note that this iterator has “infinite” length, so +typically you would want to use zip or take or some other +means to shorten it, or consider using +the repeatn() function instead.

+

§Examples

+
use rayon::prelude::*;
+use rayon::iter::repeat;
+let x: Vec<(i32, i32)> = repeat(22).zip(0..3).collect();
+assert_eq!(x, vec![(22, 0), (22, 1), (22, 2)]);
+
\ No newline at end of file diff --git a/rayon/iter/fn.repeatn.html b/rayon/iter/fn.repeatn.html new file mode 100644 index 0000000000..f346b30f0a --- /dev/null +++ b/rayon/iter/fn.repeatn.html @@ -0,0 +1,9 @@ +repeatn in rayon::iter - Rust +

Function rayon::iter::repeatn

source ·
pub fn repeatn<T: Clone + Send>(elt: T, n: usize) -> RepeatN<T>
Expand description

Creates a parallel iterator that produces n repeats of elt +(by cloning it).

+

§Examples

+
use rayon::prelude::*;
+use rayon::iter::repeatn;
+let x: Vec<(i32, i32)> = repeatn(22, 3).zip(0..3).collect();
+assert_eq!(x, vec![(22, 0), (22, 1), (22, 2)]);
+
\ No newline at end of file diff --git a/rayon/iter/fn.split.html b/rayon/iter/fn.split.html new file mode 100644 index 0000000000..2e0959d698 --- /dev/null +++ b/rayon/iter/fn.split.html @@ -0,0 +1,86 @@ +split in rayon::iter - Rust +

Function rayon::iter::split

source ·
pub fn split<D, S>(data: D, splitter: S) -> Split<D, S>
where + D: Send, + S: Fn(D) -> (D, Option<D>) + Sync,
Expand description

The split function takes arbitrary data and a closure that knows how to +split it, and turns this into a ParallelIterator.

+

§Examples

+

As a simple example, Rayon can recursively split ranges of indices

+ +
use rayon::iter;
+use rayon::prelude::*;
+use std::ops::Range;
+
+
+// We define a range of indices as follows
+type Range1D = Range<usize>;
+
+// Splitting it in two can be done like this
+fn split_range1(r: Range1D) -> (Range1D, Option<Range1D>) {
+    // We are mathematically unable to split the range if there is only
+    // one point inside of it, but we could stop splitting before that.
+    if r.end - r.start <= 1 { return (r, None); }
+
+    // Here, our range is considered large enough to be splittable
+    let midpoint = r.start + (r.end - r.start) / 2;
+    (r.start..midpoint, Some(midpoint..r.end))
+}
+
+// By using iter::split, Rayon will split the range until it has enough work
+// to feed the CPU cores, then give us the resulting sub-ranges
+iter::split(0..4096, split_range1).for_each(|sub_range| {
+    // As our initial range had a power-of-two size, the final sub-ranges
+    // should have power-of-two sizes too
+    assert!((sub_range.end - sub_range.start).is_power_of_two());
+});
+

This recursive splitting can be extended to two or three dimensions, +to reproduce a classic “block-wise” parallelization scheme of graphics and +numerical simulations:

+ +
// A two-dimensional range of indices can be built out of two 1D ones
+struct Range2D {
+    // Range of horizontal indices
+    pub rx: Range1D,
+
+    // Range of vertical indices
+    pub ry: Range1D,
+}
+
+// We want to recursively split them by the largest dimension until we have
+// enough sub-ranges to feed our mighty multi-core CPU. This function
+// carries out one such split.
+fn split_range2(r2: Range2D) -> (Range2D, Option<Range2D>) {
+    // Decide on which axis (horizontal/vertical) the range should be split
+    let width = r2.rx.end - r2.rx.start;
+    let height = r2.ry.end - r2.ry.start;
+    if width >= height {
+        // This is a wide range, split it on the horizontal axis
+        let (split_rx, ry) = (split_range1(r2.rx), r2.ry);
+        let out1 = Range2D {
+            rx: split_rx.0,
+            ry: ry.clone(),
+        };
+        let out2 = split_rx.1.map(|rx| Range2D { rx, ry });
+        (out1, out2)
+    } else {
+        // This is a tall range, split it on the vertical axis
+        let (rx, split_ry) = (r2.rx, split_range1(r2.ry));
+        let out1 = Range2D {
+            rx: rx.clone(),
+            ry: split_ry.0,
+        };
+        let out2 = split_ry.1.map(|ry| Range2D { rx, ry, });
+        (out1, out2)
+    }
+}
+
+// Again, rayon can handle the recursive splitting for us
+let range = Range2D { rx: 0..800, ry: 0..600 };
+iter::split(range, split_range2).for_each(|sub_range| {
+    // If the sub-ranges were indeed split by the largest dimension, then
+    // if no dimension was twice larger than the other initially, this
+    // property will remain true in the final sub-ranges.
+    let width = sub_range.rx.end - sub_range.rx.start;
+    let height = sub_range.ry.end - sub_range.ry.start;
+    assert!((width / 2 <= height) && (height / 2 <= width));
+});
+
\ No newline at end of file diff --git a/rayon/iter/fn.walk_tree.html b/rayon/iter/fn.walk_tree.html new file mode 100644 index 0000000000..6bfbf9419a --- /dev/null +++ b/rayon/iter/fn.walk_tree.html @@ -0,0 +1,33 @@ +walk_tree in rayon::iter - Rust +

Function rayon::iter::walk_tree

source ·
pub fn walk_tree<S, B, I>(root: S, children_of: B) -> WalkTree<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S>, + I::IntoIter: DoubleEndedIterator,
Expand description

Create a tree like parallel iterator from an initial root node. +The children_of function should take a node and iterate on all of its child nodes. +The best parallelization is obtained when the tree is balanced +but we should also be able to handle harder cases.

+

§Ordering

+

This function does not guarantee any ordering but will +use whatever algorithm is thought to achieve the fastest traversal. +See also walk_tree_prefix which guarantees a +prefix order and walk_tree_postfix which guarantees a postfix order.

+

§Example

     4
+    / \
+   /   \
+  2     3
+       / \
+      1   2
+
+
use rayon::iter::walk_tree;
+use rayon::prelude::*;
+
+let par_iter = walk_tree(4, |&e| {
+    if e <= 2 {
+        Vec::new()
+    } else {
+        vec![e / 2, e / 2 + 1]
+    }
+});
+assert_eq!(par_iter.sum::<u32>(), 12);
+
\ No newline at end of file diff --git a/rayon/iter/fn.walk_tree_postfix.html b/rayon/iter/fn.walk_tree_postfix.html new file mode 100644 index 0000000000..fe8543a401 --- /dev/null +++ b/rayon/iter/fn.walk_tree_postfix.html @@ -0,0 +1,93 @@ +walk_tree_postfix in rayon::iter - Rust +

Function rayon::iter::walk_tree_postfix

source ·
pub fn walk_tree_postfix<S, B, I>(
+    root: S,
+    children_of: B
+) -> WalkTreePostfix<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S>,
Expand description

Create a tree like postfix parallel iterator from an initial root node. +The children_of function should take a node and iterate on all of its child nodes. +The best parallelization is obtained when the tree is balanced +but we should also be able to handle harder cases.

+

§Ordering

+

This function guarantees a postfix ordering. See also walk_tree_prefix which guarantees a +prefix order. If you don’t care about ordering, you should use walk_tree, which will use +whatever is believed to be fastest.

+

Between siblings, children are reduced in order – that is first children are reduced first.

+

For example a perfect binary tree of 7 nodes will reduced in the following order:

+
     a
+    / \
+   /   \
+  b     c
+ / \   / \
+d   e f   g
+
+reduced as d,e,b,f,g,c,a
+
+

§Example

     4
+    / \
+   /   \
+  2     3
+       / \
+      1   2
+
+
use rayon::iter::walk_tree_postfix;
+use rayon::prelude::*;
+
+let par_iter = walk_tree_postfix(4, |&e| {
+    if e <= 2 {
+        Vec::new()
+    } else {
+        vec![e / 2, e / 2 + 1]
+    }
+});
+assert_eq!(par_iter.sum::<u32>(), 12);
+

§Example

+
use rayon::prelude::*;
+use rayon::iter::walk_tree_postfix;
+
+struct Node {
+    content: u32,
+    left: Option<Box<Node>>,
+    right: Option<Box<Node>>,
+}
+
+// Here we loop on the following tree:
+//
+//       10
+//      /  \
+//     /    \
+//    3     14
+//            \
+//             \
+//              18
+
+let root = Node {
+    content: 10,
+    left: Some(Box::new(Node {
+        content: 3,
+        left: None,
+        right: None,
+    })),
+    right: Some(Box::new(Node {
+        content: 14,
+        left: None,
+        right: Some(Box::new(Node {
+            content: 18,
+            left: None,
+            right: None,
+        })),
+    })),
+};
+
+let mut v: Vec<u32> = walk_tree_postfix(&root, |r| {
+    r.left
+        .as_ref()
+        .into_iter()
+        .chain(r.right.as_ref())
+        .map(|n| &**n)
+})
+.map(|node| node.content)
+.collect();
+assert_eq!(v, vec![3, 18, 14, 10]);
+
\ No newline at end of file diff --git a/rayon/iter/fn.walk_tree_prefix.html b/rayon/iter/fn.walk_tree_prefix.html new file mode 100644 index 0000000000..1ac0e35338 --- /dev/null +++ b/rayon/iter/fn.walk_tree_prefix.html @@ -0,0 +1,94 @@ +walk_tree_prefix in rayon::iter - Rust +

Function rayon::iter::walk_tree_prefix

source ·
pub fn walk_tree_prefix<S, B, I>(
+    root: S,
+    children_of: B
+) -> WalkTreePrefix<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S>, + I::IntoIter: DoubleEndedIterator,
Expand description

Create a tree-like prefix parallel iterator from an initial root node. +The children_of function should take a node and return an iterator over its child nodes. +The best parallelization is obtained when the tree is balanced +but we should also be able to handle harder cases.

+

§Ordering

+

This function guarantees a prefix ordering. See also walk_tree_postfix, +which guarantees a postfix order. +If you don’t care about ordering, you should use walk_tree, +which will use whatever is believed to be fastest. +For example a perfect binary tree of 7 nodes will reduced in the following order:

+
     a
+    / \
+   /   \
+  b     c
+ / \   / \
+d   e f   g
+
+reduced as a,b,d,e,c,f,g
+
+

§Example

     4
+    / \
+   /   \
+  2     3
+       / \
+      1   2
+
+
use rayon::iter::walk_tree_prefix;
+use rayon::prelude::*;
+
+let par_iter = walk_tree_prefix(4, |&e| {
+    if e <= 2 {
+        Vec::new()
+    } else {
+        vec![e / 2, e / 2 + 1]
+    }
+});
+assert_eq!(par_iter.sum::<u32>(), 12);
+

§Example

+
use rayon::prelude::*;
+use rayon::iter::walk_tree_prefix;
+
+struct Node {
+    content: u32,
+    left: Option<Box<Node>>,
+    right: Option<Box<Node>>,
+}
+
+// Here we loop on the following tree:
+//
+//       10
+//      /  \
+//     /    \
+//    3     14
+//            \
+//             \
+//              18
+
+let root = Node {
+    content: 10,
+    left: Some(Box::new(Node {
+        content: 3,
+        left: None,
+        right: None,
+    })),
+    right: Some(Box::new(Node {
+        content: 14,
+        left: None,
+        right: Some(Box::new(Node {
+            content: 18,
+            left: None,
+            right: None,
+        })),
+    })),
+};
+
+let mut v: Vec<u32> = walk_tree_prefix(&root, |r| {
+    r.left
+        .as_ref()
+        .into_iter()
+        .chain(r.right.as_ref())
+        .map(|n| &**n)
+})
+.map(|node| node.content)
+.collect();
+assert_eq!(v, vec![10, 3, 14, 18]);
+
\ No newline at end of file diff --git a/rayon/iter/fold/struct.Fold.html b/rayon/iter/fold/struct.Fold.html new file mode 100644 index 0000000000..1eb4b458f8 --- /dev/null +++ b/rayon/iter/fold/struct.Fold.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Fold.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/fold/struct.FoldWith.html b/rayon/iter/fold/struct.FoldWith.html new file mode 100644 index 0000000000..5451ddfa4e --- /dev/null +++ b/rayon/iter/fold/struct.FoldWith.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.FoldWith.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/fold_chunks/struct.FoldChunks.html b/rayon/iter/fold_chunks/struct.FoldChunks.html new file mode 100644 index 0000000000..6dbdb47674 --- /dev/null +++ b/rayon/iter/fold_chunks/struct.FoldChunks.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.FoldChunks.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/fold_chunks_with/struct.FoldChunksWith.html b/rayon/iter/fold_chunks_with/struct.FoldChunksWith.html new file mode 100644 index 0000000000..610d3485bd --- /dev/null +++ b/rayon/iter/fold_chunks_with/struct.FoldChunksWith.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.FoldChunksWith.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/index.html b/rayon/iter/index.html new file mode 100644 index 0000000000..079f658cae --- /dev/null +++ b/rayon/iter/index.html @@ -0,0 +1,133 @@ +rayon::iter - Rust +

Module rayon::iter

source ·
Expand description

Traits for writing parallel programs using an iterator-style interface

+

You will rarely need to interact with this module directly unless you have +need to name one of the iterator types.

+

Parallel iterators make it easy to write iterator-like chains that +execute in parallel: typically all you have to do is convert the +first .iter() (or iter_mut(), into_iter(), etc) method into +par_iter() (or par_iter_mut(), into_par_iter(), etc). For +example, to compute the sum of the squares of a sequence of +integers, one might write:

+ +
use rayon::prelude::*;
+fn sum_of_squares(input: &[i32]) -> i32 {
+    input.par_iter()
+         .map(|i| i * i)
+         .sum()
+}
+

Or, to increment all the integers in a slice, you could write:

+ +
use rayon::prelude::*;
+fn increment_all(input: &mut [i32]) {
+    input.par_iter_mut()
+         .for_each(|p| *p += 1);
+}
+

To use parallel iterators, first import the traits by adding +something like use rayon::prelude::* to your module. You can +then call par_iter, par_iter_mut, or into_par_iter to get a +parallel iterator. Like a regular iterator, parallel +iterators work by first constructing a computation and then +executing it.

+

In addition to par_iter() and friends, some types offer other +ways to create (or consume) parallel iterators:

+
    +
  • Slices (&[T], &mut [T]) offer methods like par_split and +par_windows, as well as various parallel sorting +operations. See the ParallelSlice trait for the full list.
  • +
  • Strings (&str) offer methods like par_split and par_lines. +See the ParallelString trait for the full list.
  • +
  • Various collections offer par_extend, which grows a +collection given a parallel iterator. (If you don’t have a +collection to extend, you can use collect() to create a new +one from scratch.)
  • +
+

To see the full range of methods available on parallel iterators, +check out the ParallelIterator and IndexedParallelIterator +traits.

+

If you’d like to build a custom parallel iterator, or to write your own +combinator, then check out the split function and the plumbing module.

+

Note: Several of the ParallelIterator methods rely on a Try trait which +has been deliberately obscured from the public API. This trait is intended +to mirror the unstable std::ops::Try with implementations for Option and +Result, where Some/Ok values will let those iterators continue, but +None/Err values will exit early.

+

A note about object safety: It is currently not possible to wrap +a ParallelIterator (or any trait that depends on it) using a +Box<dyn ParallelIterator> or other kind of dynamic allocation, +because ParallelIterator is not object-safe. +(This keeps the implementation simpler and allows extra optimizations.)

+

Modules§

  • Traits and functions used to implement parallel iteration. These are +low-level details – users of parallel iterators should not need to +interact with them directly. See the plumbing README for a general overview.

Structs§

  • Chain is an iterator that joins b after a in one continuous iterator. +This struct is created by the chain() method on ParallelIterator
  • Chunks is an iterator that groups elements of an underlying iterator.
  • Cloned is an iterator that clones the elements of an underlying iterator.
  • Copied is an iterator that copies the elements of an underlying iterator.
  • Iterator adaptor for the empty() function.
  • Enumerate is an iterator that returns the current count along with the element. +This struct is created by the enumerate() method on IndexedParallelIterator
  • ExponentialBlocks is a parallel iterator that consumes itself as a sequence +of parallel blocks of increasing sizes (exponentially).
  • Filter takes a predicate filter_op and filters out elements that match. +This struct is created by the filter() method on ParallelIterator
  • FilterMap creates an iterator that uses filter_op to both filter and map elements. +This struct is created by the filter_map() method on ParallelIterator.
  • FlatMap maps each element to a parallel iterator, then flattens these iterators together. +This struct is created by the flat_map() method on ParallelIterator
  • FlatMapIter maps each element to a serial iterator, then flattens these iterators together. +This struct is created by the flat_map_iter() method on ParallelIterator
  • Flatten turns each element to a parallel iterator, then flattens these iterators +together. This struct is created by the flatten() method on ParallelIterator.
  • FlattenIter turns each element to a serial iterator, then flattens these iterators +together. This struct is created by the flatten_iter() method on ParallelIterator.
  • Fold is an iterator that applies a function over an iterator producing a single value. +This struct is created by the fold() method on ParallelIterator
  • FoldChunks is an iterator that groups elements of an underlying iterator and applies a +function over them, producing a single value for each group.
  • FoldChunksWith is an iterator that groups elements of an underlying iterator and applies a +function over them, producing a single value for each group.
  • FoldWith is an iterator that applies a function over an iterator producing a single value. +This struct is created by the fold_with() method on ParallelIterator
  • Inspect is an iterator that calls a function with a reference to each +element before yielding it.
  • Interleave is an iterator that interleaves elements of iterators +i and j in one continuous iterator. This struct is created by +the interleave() method on IndexedParallelIterator
  • InterleaveShortest is an iterator that works similarly to +Interleave, but this version stops returning elements once one +of the iterators run out.
  • Intersperse is an iterator that inserts a particular item between each +item of the adapted iterator. This struct is created by the +intersperse() method on ParallelIterator
  • IterBridge is a parallel iterator that wraps a sequential iterator.
  • Map is an iterator that transforms the elements of an underlying iterator.
  • MapInit is an iterator that transforms the elements of an underlying iterator.
  • MapWith is an iterator that transforms the elements of an underlying iterator.
  • MaxLen is an iterator that imposes a maximum length on iterator splits. +This struct is created by the with_max_len() method on IndexedParallelIterator
  • MinLen is an iterator that imposes a minimum length on iterator splits. +This struct is created by the with_min_len() method on IndexedParallelIterator
  • MultiZip is an iterator that zips up a tuple of parallel iterators to +produce tuples of their items.
  • Iterator adaptor for the once() function.
  • PanicFuse is an adaptor that wraps an iterator with a fuse in case +of panics, to halt all threads as soon as possible.
  • Positions takes a predicate predicate and filters out elements that match, +yielding their indices.
  • Iterator adaptor for the repeat() function.
  • Iterator adaptor for the repeatn() function.
  • Rev is an iterator that produces elements in reverse order. This struct +is created by the rev() method on IndexedParallelIterator
  • Skip is an iterator that skips over the first n elements. +This struct is created by the skip() method on IndexedParallelIterator
  • SkipAny is an iterator that skips over n elements from anywhere in I. +This struct is created by the skip_any() method on ParallelIterator
  • SkipAnyWhile is an iterator that skips over elements from anywhere in I +until the callback returns false. +This struct is created by the skip_any_while() method on ParallelIterator
  • Split is a parallel iterator using arbitrary data and a splitting function. +This struct is created by the split() function.
  • StepBy is an iterator that skips n elements between each yield, where n is the given step. +This struct is created by the step_by() method on IndexedParallelIterator
  • Take is an iterator that iterates over the first n elements. +This struct is created by the take() method on IndexedParallelIterator
  • TakeAny is an iterator that iterates over n elements from anywhere in I. +This struct is created by the take_any() method on ParallelIterator
  • TakeAnyWhile is an iterator that iterates over elements from anywhere in I +until the callback returns false. +This struct is created by the take_any_while() method on ParallelIterator
  • TryFold is an iterator that applies a function over an iterator producing a single value. +This struct is created by the try_fold() method on ParallelIterator
  • TryFoldWith is an iterator that applies a function over an iterator producing a single value. +This struct is created by the try_fold_with() method on ParallelIterator
  • UniformBlocks is a parallel iterator that consumes itself as a sequence +of parallel blocks of constant sizes.
  • Update is an iterator that mutates the elements of an +underlying iterator before they are yielded.
  • ParallelIterator for arbitrary tree-shaped patterns. +Returned by the walk_tree() function.
  • ParallelIterator for arbitrary tree-shaped patterns. +Returned by the walk_tree_postfix() function.
  • ParallelIterator for arbitrary tree-shaped patterns. +Returned by the walk_tree_prefix() function.
  • WhileSome is an iterator that yields the Some elements of an iterator, +halting as soon as any None is produced.
  • Zip is an iterator that zips up a and b into a single iterator +of pairs. This struct is created by the zip() method on +IndexedParallelIterator
  • An IndexedParallelIterator that iterates over two parallel iterators of equal +length simultaneously.

Enums§

  • The enum Either with variants Left and Right is a general purpose +sum type with two cases.

Traits§

Functions§

  • Creates a parallel iterator that produces nothing.
  • Creates a parallel iterator that produces an element exactly once.
  • Creates a parallel iterator that endlessly repeats elt (by +cloning it). Note that this iterator has “infinite” length, so +typically you would want to use zip or take or some other +means to shorten it, or consider using +the repeatn() function instead.
  • Creates a parallel iterator that produces n repeats of elt +(by cloning it).
  • The split function takes arbitrary data and a closure that knows how to +split it, and turns this into a ParallelIterator.
  • Create a tree like parallel iterator from an initial root node. +The children_of function should take a node and iterate on all of its child nodes. +The best parallelization is obtained when the tree is balanced +but we should also be able to handle harder cases.
  • Create a tree like postfix parallel iterator from an initial root node. +The children_of function should take a node and iterate on all of its child nodes. +The best parallelization is obtained when the tree is balanced +but we should also be able to handle harder cases.
  • Create a tree-like prefix parallel iterator from an initial root node. +The children_of function should take a node and return an iterator over its child nodes. +The best parallelization is obtained when the tree is balanced +but we should also be able to handle harder cases.
\ No newline at end of file diff --git a/rayon/iter/inspect/struct.Inspect.html b/rayon/iter/inspect/struct.Inspect.html new file mode 100644 index 0000000000..ddf97b21e0 --- /dev/null +++ b/rayon/iter/inspect/struct.Inspect.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Inspect.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/interleave/struct.Interleave.html b/rayon/iter/interleave/struct.Interleave.html new file mode 100644 index 0000000000..5290581323 --- /dev/null +++ b/rayon/iter/interleave/struct.Interleave.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Interleave.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/interleave_shortest/struct.InterleaveShortest.html b/rayon/iter/interleave_shortest/struct.InterleaveShortest.html new file mode 100644 index 0000000000..8ec82ed0cb --- /dev/null +++ b/rayon/iter/interleave_shortest/struct.InterleaveShortest.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.InterleaveShortest.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/intersperse/struct.Intersperse.html b/rayon/iter/intersperse/struct.Intersperse.html new file mode 100644 index 0000000000..ba68261469 --- /dev/null +++ b/rayon/iter/intersperse/struct.Intersperse.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Intersperse.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/len/struct.MaxLen.html b/rayon/iter/len/struct.MaxLen.html new file mode 100644 index 0000000000..8fa4e1e619 --- /dev/null +++ b/rayon/iter/len/struct.MaxLen.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.MaxLen.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/len/struct.MinLen.html b/rayon/iter/len/struct.MinLen.html new file mode 100644 index 0000000000..67074f4875 --- /dev/null +++ b/rayon/iter/len/struct.MinLen.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.MinLen.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/map/struct.Map.html b/rayon/iter/map/struct.Map.html new file mode 100644 index 0000000000..ee837e8ee5 --- /dev/null +++ b/rayon/iter/map/struct.Map.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Map.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/map_with/struct.MapInit.html b/rayon/iter/map_with/struct.MapInit.html new file mode 100644 index 0000000000..06066aa6b0 --- /dev/null +++ b/rayon/iter/map_with/struct.MapInit.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.MapInit.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/map_with/struct.MapWith.html b/rayon/iter/map_with/struct.MapWith.html new file mode 100644 index 0000000000..8a6c03a7e5 --- /dev/null +++ b/rayon/iter/map_with/struct.MapWith.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.MapWith.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/multizip/struct.MultiZip.html b/rayon/iter/multizip/struct.MultiZip.html new file mode 100644 index 0000000000..7bde7e0309 --- /dev/null +++ b/rayon/iter/multizip/struct.MultiZip.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.MultiZip.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/once/fn.once.html b/rayon/iter/once/fn.once.html new file mode 100644 index 0000000000..9352c02e4f --- /dev/null +++ b/rayon/iter/once/fn.once.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.once.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/once/struct.Once.html b/rayon/iter/once/struct.Once.html new file mode 100644 index 0000000000..5799bac542 --- /dev/null +++ b/rayon/iter/once/struct.Once.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Once.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/panic_fuse/struct.PanicFuse.html b/rayon/iter/panic_fuse/struct.PanicFuse.html new file mode 100644 index 0000000000..9b20fe79b1 --- /dev/null +++ b/rayon/iter/panic_fuse/struct.PanicFuse.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.PanicFuse.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/par_bridge/struct.IterBridge.html b/rayon/iter/par_bridge/struct.IterBridge.html new file mode 100644 index 0000000000..9e2e9f949b --- /dev/null +++ b/rayon/iter/par_bridge/struct.IterBridge.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.IterBridge.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/par_bridge/trait.ParallelBridge.html b/rayon/iter/par_bridge/trait.ParallelBridge.html new file mode 100644 index 0000000000..2b6da37adf --- /dev/null +++ b/rayon/iter/par_bridge/trait.ParallelBridge.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/trait.ParallelBridge.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/plumbing/fn.bridge.html b/rayon/iter/plumbing/fn.bridge.html new file mode 100644 index 0000000000..07ed903e4d --- /dev/null +++ b/rayon/iter/plumbing/fn.bridge.html @@ -0,0 +1,11 @@ +bridge in rayon::iter::plumbing - Rust +

Function rayon::iter::plumbing::bridge

source ·
pub fn bridge<I, C>(par_iter: I, consumer: C) -> C::Result
where + I: IndexedParallelIterator, + C: Consumer<I::Item>,
Expand description

This helper function is used to “connect” a parallel iterator to a +consumer. It will convert the par_iter into a producer P and +then pull items from P and feed them to consumer, splitting and +creating parallel threads as needed.

+

This is useful when you are implementing your own parallel +iterators: it is often used as the definition of the +drive_unindexed or drive methods.

+
\ No newline at end of file diff --git a/rayon/iter/plumbing/fn.bridge_producer_consumer.html b/rayon/iter/plumbing/fn.bridge_producer_consumer.html new file mode 100644 index 0000000000..e274a47a68 --- /dev/null +++ b/rayon/iter/plumbing/fn.bridge_producer_consumer.html @@ -0,0 +1,16 @@ +bridge_producer_consumer in rayon::iter::plumbing - Rust +
pub fn bridge_producer_consumer<P, C>(
+    len: usize,
+    producer: P,
+    consumer: C
+) -> C::Result
where + P: Producer, + C: Consumer<P::Item>,
Expand description

This helper function is used to “connect” a producer and a +consumer. You may prefer to call bridge, which wraps this +function. This function will draw items from producer and feed +them to consumer, splitting and creating parallel tasks when +needed.

+

This is useful when you are implementing your own parallel +iterators: it is often used as the definition of the +drive_unindexed or drive methods.

+
\ No newline at end of file diff --git a/rayon/iter/plumbing/fn.bridge_unindexed.html b/rayon/iter/plumbing/fn.bridge_unindexed.html new file mode 100644 index 0000000000..fa1bdb1cc4 --- /dev/null +++ b/rayon/iter/plumbing/fn.bridge_unindexed.html @@ -0,0 +1,5 @@ +bridge_unindexed in rayon::iter::plumbing - Rust +
pub fn bridge_unindexed<P, C>(producer: P, consumer: C) -> C::Result
Expand description

A variant of bridge_producer_consumer where the producer is an unindexed producer.

+
\ No newline at end of file diff --git a/rayon/iter/plumbing/index.html b/rayon/iter/plumbing/index.html new file mode 100644 index 0000000000..b27899f293 --- /dev/null +++ b/rayon/iter/plumbing/index.html @@ -0,0 +1,46 @@ +rayon::iter::plumbing - Rust +

Module rayon::iter::plumbing

source ·
Expand description

Traits and functions used to implement parallel iteration. These are +low-level details – users of parallel iterators should not need to +interact with them directly. See the plumbing README for a general overview.

+

Traits§

  • A consumer is effectively a generalized “fold” operation, +and in fact each consumer will eventually be converted into a +Folder. What makes a consumer special is that, like a +Producer, it can be split into multiple consumers using +the split_at method. When a consumer is split, it produces two +consumers, as well as a reducer. The two consumers can be fed +items independently, and when they are done the reducer is used to +combine their two results into one. See the plumbing +README for further details.
  • The Folder trait encapsulates the standard fold +operation. It can be fed many items using the consume +method. At the end, once all items have been consumed, it can then +be converted (using complete) into a final value.
  • A Producer is effectively a “splittable IntoIterator”. That +is, a producer is a value which can be converted into an iterator +at any time: at that point, it simply produces items on demand, +like any iterator. But what makes a Producer special is that, +before we convert to an iterator, we can also split it at a +particular point using the split_at method. This will yield up +two producers, one producing the items before that point, and one +producing the items after that point (these two producers can then +independently be split further, or be converted into iterators). +In Rayon, this splitting is used to divide between threads. +See the plumbing README for further details.
  • The ProducerCallback trait is a kind of generic closure, +analogous to FnOnce. See the corresponding section in +the plumbing README for more details.
  • The reducer is the final step of a Consumer – after a consumer +has been split into two parts, and each of those parts has been +fully processed, we are left with two results. The reducer is then +used to combine those two results into one. See the plumbing +README for further details.
  • A stateless consumer can be freely copied. These consumers can be +used like regular consumers, but they also support a +split_off_left method that does not take an index to split, but +simply splits at some arbitrary point (for_each, for example, +produces an unindexed consumer).
  • A variant on Producer which does not know its exact length or +cannot represent it in a usize. These producers act like +ordinary producers except that they cannot be told to split at a +particular point. Instead, you just ask them to split ‘somewhere’.

Functions§

  • This helper function is used to “connect” a parallel iterator to a +consumer. It will convert the par_iter into a producer P and +then pull items from P and feed them to consumer, splitting and +creating parallel threads as needed.
  • This helper function is used to “connect” a producer and a +consumer. You may prefer to call bridge, which wraps this +function. This function will draw items from producer and feed +them to consumer, splitting and creating parallel tasks when +needed.
  • A variant of bridge_producer_consumer where the producer is an unindexed producer.
\ No newline at end of file diff --git a/rayon/iter/plumbing/sidebar-items.js b/rayon/iter/plumbing/sidebar-items.js new file mode 100644 index 0000000000..6a784ea324 --- /dev/null +++ b/rayon/iter/plumbing/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["bridge","bridge_producer_consumer","bridge_unindexed"],"trait":["Consumer","Folder","Producer","ProducerCallback","Reducer","UnindexedConsumer","UnindexedProducer"]}; \ No newline at end of file diff --git a/rayon/iter/plumbing/trait.Consumer.html b/rayon/iter/plumbing/trait.Consumer.html new file mode 100644 index 0000000000..cdd8b09972 --- /dev/null +++ b/rayon/iter/plumbing/trait.Consumer.html @@ -0,0 +1,31 @@ +Consumer in rayon::iter::plumbing - Rust +

Trait rayon::iter::plumbing::Consumer

source ·
pub trait Consumer<Item>: Send + Sized {
+    type Folder: Folder<Item, Result = Self::Result>;
+    type Reducer: Reducer<Self::Result>;
+    type Result: Send;
+
+    // Required methods
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer);
+    fn into_folder(self) -> Self::Folder;
+    fn full(&self) -> bool;
+}
Expand description

A consumer is effectively a generalized “fold” operation, +and in fact each consumer will eventually be converted into a +Folder. What makes a consumer special is that, like a +Producer, it can be split into multiple consumers using +the split_at method. When a consumer is split, it produces two +consumers, as well as a reducer. The two consumers can be fed +items independently, and when they are done the reducer is used to +combine their two results into one. See the plumbing +README for further details.

+

Required Associated Types§

source

type Folder: Folder<Item, Result = Self::Result>

The type of folder that this consumer can be converted into.

+
source

type Reducer: Reducer<Self::Result>

The type of reducer that is produced if this consumer is split.

+
source

type Result: Send

The type of result that this consumer will ultimately produce.

+

Required Methods§

source

fn split_at(self, index: usize) -> (Self, Self, Self::Reducer)

Divide the consumer into two consumers, one processing items +0..index and one processing items from index... Also +produces a reducer that can be used to reduce the results at +the end.

+
source

fn into_folder(self) -> Self::Folder

Convert the consumer into a folder that can consume items +sequentially, eventually producing a final result.

+
source

fn full(&self) -> bool

Hint whether this Consumer would like to stop processing +further items, e.g. if a search has been completed.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/rayon/iter/plumbing/trait.Folder.html b/rayon/iter/plumbing/trait.Folder.html new file mode 100644 index 0000000000..58281371c1 --- /dev/null +++ b/rayon/iter/plumbing/trait.Folder.html @@ -0,0 +1,29 @@ +Folder in rayon::iter::plumbing - Rust +

Trait rayon::iter::plumbing::Folder

source ·
pub trait Folder<Item>: Sized {
+    type Result;
+
+    // Required methods
+    fn consume(self, item: Item) -> Self;
+    fn complete(self) -> Self::Result;
+    fn full(&self) -> bool;
+
+    // Provided method
+    fn consume_iter<I>(self, iter: I) -> Self
+       where I: IntoIterator<Item = Item> { ... }
+}
Expand description

The Folder trait encapsulates the standard fold +operation. It can be fed many items using the consume +method. At the end, once all items have been consumed, it can then +be converted (using complete) into a final value.

+

Required Associated Types§

source

type Result

The type of result that will ultimately be produced by the folder.

+

Required Methods§

source

fn consume(self, item: Item) -> Self

Consume next item and return new sequential state.

+
source

fn complete(self) -> Self::Result

Finish consuming items, produce final result.

+
source

fn full(&self) -> bool

Hint whether this Folder would like to stop processing +further items, e.g. if a search has been completed.

+

Provided Methods§

source

fn consume_iter<I>(self, iter: I) -> Self
where + I: IntoIterator<Item = Item>,

Consume items from the iterator until full, and return new sequential state.

+

This method is optional. The default simply iterates over +iter, invoking consume and checking after each iteration +whether full returns false.

+

The main reason to override it is if you can provide a more +specialized, efficient implementation.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/rayon/iter/plumbing/trait.Producer.html b/rayon/iter/plumbing/trait.Producer.html new file mode 100644 index 0000000000..a446ba427c --- /dev/null +++ b/rayon/iter/plumbing/trait.Producer.html @@ -0,0 +1,60 @@ +Producer in rayon::iter::plumbing - Rust +

Trait rayon::iter::plumbing::Producer

source ·
pub trait Producer: Send + Sized {
+    type Item;
+    type IntoIter: Iterator<Item = Self::Item> + DoubleEndedIterator + ExactSizeIterator;
+
+    // Required methods
+    fn into_iter(self) -> Self::IntoIter;
+    fn split_at(self, index: usize) -> (Self, Self);
+
+    // Provided methods
+    fn min_len(&self) -> usize { ... }
+    fn max_len(&self) -> usize { ... }
+    fn fold_with<F>(self, folder: F) -> F
+       where F: Folder<Self::Item> { ... }
+}
Expand description

A Producer is effectively a “splittable IntoIterator”. That +is, a producer is a value which can be converted into an iterator +at any time: at that point, it simply produces items on demand, +like any iterator. But what makes a Producer special is that, +before we convert to an iterator, we can also split it at a +particular point using the split_at method. This will yield up +two producers, one producing the items before that point, and one +producing the items after that point (these two producers can then +independently be split further, or be converted into iterators). +In Rayon, this splitting is used to divide between threads. +See the plumbing README for further details.

+

Note that each producer will always produce a fixed number of +items N. However, this number N is not queryable through the API; +the consumer is expected to track it.

+

NB. You might expect Producer to extend the IntoIterator +trait. However, rust-lang/rust#20671 prevents us from +declaring the DoubleEndedIterator and ExactSizeIterator +constraints on a required IntoIterator trait, so we inline +IntoIterator here until that issue is fixed.

+

Required Associated Types§

source

type Item

The type of item that will be produced by this producer once +it is converted into an iterator.

+
source

type IntoIter: Iterator<Item = Self::Item> + DoubleEndedIterator + ExactSizeIterator

The type of iterator we will become.

+

Required Methods§

source

fn into_iter(self) -> Self::IntoIter

Convert self into an iterator; at this point, no more parallel splits +are possible.

+
source

fn split_at(self, index: usize) -> (Self, Self)

Split into two producers; one produces items 0..index, the +other index..N. Index must be less than or equal to N.

+

Provided Methods§

source

fn min_len(&self) -> usize

The minimum number of items that we will process +sequentially. Defaults to 1, which means that we will split +all the way down to a single item. This can be raised higher +using the with_min_len method, which will force us to +create sequential tasks at a larger granularity. Note that +Rayon automatically normally attempts to adjust the size of +parallel splits to reduce overhead, so this should not be +needed.

+
source

fn max_len(&self) -> usize

The maximum number of items that we will process +sequentially. Defaults to MAX, which means that we can choose +not to split at all. This can be lowered using the +with_max_len method, which will force us to create more +parallel tasks. Note that Rayon automatically normally +attempts to adjust the size of parallel splits to reduce +overhead, so this should not be needed.

+
source

fn fold_with<F>(self, folder: F) -> F
where + F: Folder<Self::Item>,

Iterate the producer, feeding each element to folder, and +stop when the folder is full (or all elements have been consumed).

+

The provided implementation is sufficient for most iterables.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/rayon/iter/plumbing/trait.ProducerCallback.html b/rayon/iter/plumbing/trait.ProducerCallback.html new file mode 100644 index 0000000000..45e86f3e59 --- /dev/null +++ b/rayon/iter/plumbing/trait.ProducerCallback.html @@ -0,0 +1,17 @@ +ProducerCallback in rayon::iter::plumbing - Rust +
pub trait ProducerCallback<T> {
+    type Output;
+
+    // Required method
+    fn callback<P>(self, producer: P) -> Self::Output
+       where P: Producer<Item = T>;
+}
Expand description

The ProducerCallback trait is a kind of generic closure, +analogous to FnOnce. See the corresponding section in +the plumbing README for more details.

+

Required Associated Types§

source

type Output

The type of value returned by this callback. Analogous to +Output from the FnOnce trait.

+

Required Methods§

source

fn callback<P>(self, producer: P) -> Self::Output
where + P: Producer<Item = T>,

Invokes the callback with the given producer as argument. The +key point of this trait is that this method is generic over +P, and hence implementors must be defined for any producer.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/rayon/iter/plumbing/trait.Reducer.html b/rayon/iter/plumbing/trait.Reducer.html new file mode 100644 index 0000000000..f85fadb805 --- /dev/null +++ b/rayon/iter/plumbing/trait.Reducer.html @@ -0,0 +1,12 @@ +Reducer in rayon::iter::plumbing - Rust +

Trait rayon::iter::plumbing::Reducer

source ·
pub trait Reducer<Result> {
+    // Required method
+    fn reduce(self, left: Result, right: Result) -> Result;
+}
Expand description

The reducer is the final step of a Consumer – after a consumer +has been split into two parts, and each of those parts has been +fully processed, we are left with two results. The reducer is then +used to combine those two results into one. See the plumbing +README for further details.

+

Required Methods§

source

fn reduce(self, left: Result, right: Result) -> Result

Reduce two final results into one; this is executed after a +split.

+

Implementors§

\ No newline at end of file diff --git a/rayon/iter/plumbing/trait.UnindexedConsumer.html b/rayon/iter/plumbing/trait.UnindexedConsumer.html new file mode 100644 index 0000000000..8a3dd09644 --- /dev/null +++ b/rayon/iter/plumbing/trait.UnindexedConsumer.html @@ -0,0 +1,20 @@ +UnindexedConsumer in rayon::iter::plumbing - Rust +
pub trait UnindexedConsumer<I>: Consumer<I> {
+    // Required methods
+    fn split_off_left(&self) -> Self;
+    fn to_reducer(&self) -> Self::Reducer;
+}
Expand description

A stateless consumer can be freely copied. These consumers can be +used like regular consumers, but they also support a +split_off_left method that does not take an index to split, but +simply splits at some arbitrary point (for_each, for example, +produces an unindexed consumer).

+

Required Methods§

source

fn split_off_left(&self) -> Self

Splits off a “left” consumer and returns it. The self +consumer should then be used to consume the “right” portion of +the data. (The ordering matters for methods like find_first – +values produced by the returned value are given precedence +over values produced by self.) Once the left and right +halves have been fully consumed, you should reduce the results +with the result of to_reducer.

+
source

fn to_reducer(&self) -> Self::Reducer

Creates a reducer that can be used to combine the results from +a split consumer.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/rayon/iter/plumbing/trait.UnindexedProducer.html b/rayon/iter/plumbing/trait.UnindexedProducer.html new file mode 100644 index 0000000000..b6110aac7c --- /dev/null +++ b/rayon/iter/plumbing/trait.UnindexedProducer.html @@ -0,0 +1,21 @@ +UnindexedProducer in rayon::iter::plumbing - Rust +
pub trait UnindexedProducer: Send + Sized {
+    type Item;
+
+    // Required methods
+    fn split(self) -> (Self, Option<Self>);
+    fn fold_with<F>(self, folder: F) -> F
+       where F: Folder<Self::Item>;
+}
Expand description

A variant on Producer which does not know its exact length or +cannot represent it in a usize. These producers act like +ordinary producers except that they cannot be told to split at a +particular point. Instead, you just ask them to split ‘somewhere’.

+

(In principle, Producer could extend this trait; however, it +does not because to do so would require producers to carry their +own length with them.)

+

Required Associated Types§

source

type Item

The type of item returned by this producer.

+

Required Methods§

source

fn split(self) -> (Self, Option<Self>)

Split midway into a new producer if possible, otherwise return None.

+
source

fn fold_with<F>(self, folder: F) -> F
where + F: Folder<Self::Item>,

Iterate the producer, feeding each element to folder, and +stop when the folder is full (or all elements have been consumed).

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/rayon/iter/positions/struct.Positions.html b/rayon/iter/positions/struct.Positions.html new file mode 100644 index 0000000000..31d2a50890 --- /dev/null +++ b/rayon/iter/positions/struct.Positions.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Positions.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/repeat/fn.repeat.html b/rayon/iter/repeat/fn.repeat.html new file mode 100644 index 0000000000..d38390f68e --- /dev/null +++ b/rayon/iter/repeat/fn.repeat.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.repeat.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/repeat/fn.repeatn.html b/rayon/iter/repeat/fn.repeatn.html new file mode 100644 index 0000000000..46d75a71d6 --- /dev/null +++ b/rayon/iter/repeat/fn.repeatn.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.repeatn.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/repeat/struct.Repeat.html b/rayon/iter/repeat/struct.Repeat.html new file mode 100644 index 0000000000..8e5b1c1d04 --- /dev/null +++ b/rayon/iter/repeat/struct.Repeat.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Repeat.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/repeat/struct.RepeatN.html b/rayon/iter/repeat/struct.RepeatN.html new file mode 100644 index 0000000000..b7d333bc9a --- /dev/null +++ b/rayon/iter/repeat/struct.RepeatN.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.RepeatN.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/rev/struct.Rev.html b/rayon/iter/rev/struct.Rev.html new file mode 100644 index 0000000000..3bdf0290b2 --- /dev/null +++ b/rayon/iter/rev/struct.Rev.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Rev.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/sidebar-items.js b/rayon/iter/sidebar-items.js new file mode 100644 index 0000000000..f6be02cc54 --- /dev/null +++ b/rayon/iter/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Either"],"fn":["empty","once","repeat","repeatn","split","walk_tree","walk_tree_postfix","walk_tree_prefix"],"mod":["plumbing"],"struct":["Chain","Chunks","Cloned","Copied","Empty","Enumerate","ExponentialBlocks","Filter","FilterMap","FlatMap","FlatMapIter","Flatten","FlattenIter","Fold","FoldChunks","FoldChunksWith","FoldWith","Inspect","Interleave","InterleaveShortest","Intersperse","IterBridge","Map","MapInit","MapWith","MaxLen","MinLen","MultiZip","Once","PanicFuse","Positions","Repeat","RepeatN","Rev","Skip","SkipAny","SkipAnyWhile","Split","StepBy","Take","TakeAny","TakeAnyWhile","TryFold","TryFoldWith","UniformBlocks","Update","WalkTree","WalkTreePostfix","WalkTreePrefix","WhileSome","Zip","ZipEq"],"trait":["FromParallelIterator","IndexedParallelIterator","IntoParallelIterator","IntoParallelRefIterator","IntoParallelRefMutIterator","ParallelBridge","ParallelDrainFull","ParallelDrainRange","ParallelExtend","ParallelIterator"]}; \ No newline at end of file diff --git a/rayon/iter/skip/struct.Skip.html b/rayon/iter/skip/struct.Skip.html new file mode 100644 index 0000000000..0195af071a --- /dev/null +++ b/rayon/iter/skip/struct.Skip.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Skip.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/skip_any/struct.SkipAny.html b/rayon/iter/skip_any/struct.SkipAny.html new file mode 100644 index 0000000000..a42cb3cdcc --- /dev/null +++ b/rayon/iter/skip_any/struct.SkipAny.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.SkipAny.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/skip_any_while/struct.SkipAnyWhile.html b/rayon/iter/skip_any_while/struct.SkipAnyWhile.html new file mode 100644 index 0000000000..aec2ce11f4 --- /dev/null +++ b/rayon/iter/skip_any_while/struct.SkipAnyWhile.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.SkipAnyWhile.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/splitter/fn.split.html b/rayon/iter/splitter/fn.split.html new file mode 100644 index 0000000000..7ed6c62f4c --- /dev/null +++ b/rayon/iter/splitter/fn.split.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.split.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/splitter/struct.Split.html b/rayon/iter/splitter/struct.Split.html new file mode 100644 index 0000000000..809200db84 --- /dev/null +++ b/rayon/iter/splitter/struct.Split.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Split.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/step_by/struct.StepBy.html b/rayon/iter/step_by/struct.StepBy.html new file mode 100644 index 0000000000..05530f1a05 --- /dev/null +++ b/rayon/iter/step_by/struct.StepBy.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.StepBy.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/struct.Chain.html b/rayon/iter/struct.Chain.html new file mode 100644 index 0000000000..e90cbdb616 --- /dev/null +++ b/rayon/iter/struct.Chain.html @@ -0,0 +1,305 @@ +Chain in rayon::iter - Rust +

Struct rayon::iter::Chain

source ·
pub struct Chain<A, B>
where + A: ParallelIterator, + B: ParallelIterator<Item = A::Item>,
{ /* private fields */ }
Expand description

Chain is an iterator that joins b after a in one continuous iterator. +This struct is created by the chain() method on ParallelIterator

+

Trait Implementations§

source§

impl<A, B> Clone for Chain<A, B>
where + A: ParallelIterator + Clone, + B: ParallelIterator<Item = A::Item> + Clone,

source§

fn clone(&self) -> Chain<A, B>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<A, B> Debug for Chain<A, B>
where + A: ParallelIterator + Debug, + B: ParallelIterator<Item = A::Item> + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<A, B> IndexedParallelIterator for Chain<A, B>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B> ParallelIterator for Chain<A, B>
where + A: ParallelIterator, + B: ParallelIterator<Item = A::Item>,

§

type Item = <A as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<A, B> Freeze for Chain<A, B>
where + A: Freeze, + B: Freeze,

§

impl<A, B> RefUnwindSafe for Chain<A, B>
where + A: RefUnwindSafe, + B: RefUnwindSafe,

§

impl<A, B> Send for Chain<A, B>

§

impl<A, B> Sync for Chain<A, B>
where + A: Sync, + B: Sync,

§

impl<A, B> Unpin for Chain<A, B>
where + A: Unpin, + B: Unpin,

§

impl<A, B> UnwindSafe for Chain<A, B>
where + A: UnwindSafe, + B: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Chunks.html b/rayon/iter/struct.Chunks.html new file mode 100644 index 0000000000..3c5c940618 --- /dev/null +++ b/rayon/iter/struct.Chunks.html @@ -0,0 +1,295 @@ +Chunks in rayon::iter - Rust +

Struct rayon::iter::Chunks

source ·
pub struct Chunks<I>{ /* private fields */ }
Expand description

Chunks is an iterator that groups elements of an underlying iterator.

+

This struct is created by the chunks() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I> Clone for Chunks<I>

source§

fn clone(&self) -> Chunks<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I> Debug for Chunks<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for Chunks<I>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for Chunks<I>

§

type Item = Vec<<I as ParallelIterator>::Item>

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: Consumer<Vec<I::Item>>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Chunks<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Chunks<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Chunks<I>

§

impl<I> Sync for Chunks<I>
where + I: Sync,

§

impl<I> Unpin for Chunks<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Chunks<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Cloned.html b/rayon/iter/struct.Cloned.html new file mode 100644 index 0000000000..abf3b1bc48 --- /dev/null +++ b/rayon/iter/struct.Cloned.html @@ -0,0 +1,294 @@ +Cloned in rayon::iter - Rust +

Struct rayon::iter::Cloned

source ·
pub struct Cloned<I: ParallelIterator> { /* private fields */ }
Expand description

Cloned is an iterator that clones the elements of an underlying iterator.

+

This struct is created by the cloned() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for Cloned<I>

source§

fn clone(&self) -> Cloned<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for Cloned<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T, I> IndexedParallelIterator for Cloned<I>
where + I: IndexedParallelIterator<Item = &'a T>, + T: 'a + Clone + Send + Sync,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T, I> ParallelIterator for Cloned<I>
where + I: ParallelIterator<Item = &'a T>, + T: 'a + Clone + Send + Sync,

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Cloned<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Cloned<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Cloned<I>

§

impl<I> Sync for Cloned<I>
where + I: Sync,

§

impl<I> Unpin for Cloned<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Cloned<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Copied.html b/rayon/iter/struct.Copied.html new file mode 100644 index 0000000000..7ce4d26529 --- /dev/null +++ b/rayon/iter/struct.Copied.html @@ -0,0 +1,294 @@ +Copied in rayon::iter - Rust +

Struct rayon::iter::Copied

source ·
pub struct Copied<I: ParallelIterator> { /* private fields */ }
Expand description

Copied is an iterator that copies the elements of an underlying iterator.

+

This struct is created by the copied() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for Copied<I>

source§

fn clone(&self) -> Copied<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for Copied<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T, I> IndexedParallelIterator for Copied<I>
where + I: IndexedParallelIterator<Item = &'a T>, + T: 'a + Copy + Send + Sync,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T, I> ParallelIterator for Copied<I>
where + I: ParallelIterator<Item = &'a T>, + T: 'a + Copy + Send + Sync,

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Copied<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Copied<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Copied<I>

§

impl<I> Sync for Copied<I>
where + I: Sync,

§

impl<I> Unpin for Copied<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Copied<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Empty.html b/rayon/iter/struct.Empty.html new file mode 100644 index 0000000000..4931738b48 --- /dev/null +++ b/rayon/iter/struct.Empty.html @@ -0,0 +1,288 @@ +Empty in rayon::iter - Rust +

Struct rayon::iter::Empty

source ·
pub struct Empty<T: Send> { /* private fields */ }
Expand description

Iterator adaptor for the empty() function.

+

Trait Implementations§

source§

impl<T: Send> Clone for Empty<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Send> Debug for Empty<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> IndexedParallelIterator for Empty<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Send> ParallelIterator for Empty<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Empty<T>

§

impl<T> RefUnwindSafe for Empty<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Empty<T>

§

impl<T> Sync for Empty<T>
where + T: Sync,

§

impl<T> Unpin for Empty<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Empty<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Enumerate.html b/rayon/iter/struct.Enumerate.html new file mode 100644 index 0000000000..f9e9d2acd1 --- /dev/null +++ b/rayon/iter/struct.Enumerate.html @@ -0,0 +1,291 @@ +Enumerate in rayon::iter - Rust +

Struct rayon::iter::Enumerate

source ·
pub struct Enumerate<I: IndexedParallelIterator> { /* private fields */ }
Expand description

Enumerate is an iterator that returns the current count along with the element. +This struct is created by the enumerate() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + IndexedParallelIterator> Clone for Enumerate<I>

source§

fn clone(&self) -> Enumerate<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + IndexedParallelIterator> Debug for Enumerate<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for Enumerate<I>

source§

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for Enumerate<I>

§

type Item = (usize, <I as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Enumerate<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Enumerate<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Enumerate<I>

§

impl<I> Sync for Enumerate<I>
where + I: Sync,

§

impl<I> Unpin for Enumerate<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Enumerate<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.ExponentialBlocks.html b/rayon/iter/struct.ExponentialBlocks.html new file mode 100644 index 0000000000..27825c8be1 --- /dev/null +++ b/rayon/iter/struct.ExponentialBlocks.html @@ -0,0 +1,199 @@ +ExponentialBlocks in rayon::iter - Rust +
pub struct ExponentialBlocks<I> { /* private fields */ }
Expand description

ExponentialBlocks is a parallel iterator that consumes itself as a sequence +of parallel blocks of increasing sizes (exponentially).

+

This struct is created by the by_exponential_blocks() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone> Clone for ExponentialBlocks<I>

source§

fn clone(&self) -> ExponentialBlocks<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug> Debug for ExponentialBlocks<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> ParallelIterator for ExponentialBlocks<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I> Freeze for ExponentialBlocks<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for ExponentialBlocks<I>
where + I: RefUnwindSafe,

§

impl<I> Send for ExponentialBlocks<I>
where + I: Send,

§

impl<I> Sync for ExponentialBlocks<I>
where + I: Sync,

§

impl<I> Unpin for ExponentialBlocks<I>
where + I: Unpin,

§

impl<I> UnwindSafe for ExponentialBlocks<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Filter.html b/rayon/iter/struct.Filter.html new file mode 100644 index 0000000000..afe245c5f2 --- /dev/null +++ b/rayon/iter/struct.Filter.html @@ -0,0 +1,204 @@ +Filter in rayon::iter - Rust +

Struct rayon::iter::Filter

source ·
pub struct Filter<I: ParallelIterator, P> { /* private fields */ }
Expand description

Filter takes a predicate filter_op and filters out elements that match. +This struct is created by the filter() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, P: Clone> Clone for Filter<I, P>

source§

fn clone(&self) -> Filter<I, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, P> Debug for Filter<I, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, P> ParallelIterator for Filter<I, P>
where + I: ParallelIterator, + P: Fn(&I::Item) -> bool + Sync + Send,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, P> Freeze for Filter<I, P>
where + I: Freeze, + P: Freeze,

§

impl<I, P> RefUnwindSafe for Filter<I, P>
where + I: RefUnwindSafe, + P: RefUnwindSafe,

§

impl<I, P> Send for Filter<I, P>
where + P: Send,

§

impl<I, P> Sync for Filter<I, P>
where + I: Sync, + P: Sync,

§

impl<I, P> Unpin for Filter<I, P>
where + I: Unpin, + P: Unpin,

§

impl<I, P> UnwindSafe for Filter<I, P>
where + I: UnwindSafe, + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.FilterMap.html b/rayon/iter/struct.FilterMap.html new file mode 100644 index 0000000000..2ce5c18cde --- /dev/null +++ b/rayon/iter/struct.FilterMap.html @@ -0,0 +1,205 @@ +FilterMap in rayon::iter - Rust +

Struct rayon::iter::FilterMap

source ·
pub struct FilterMap<I: ParallelIterator, P> { /* private fields */ }
Expand description

FilterMap creates an iterator that uses filter_op to both filter and map elements. +This struct is created by the filter_map() method on ParallelIterator.

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, P: Clone> Clone for FilterMap<I, P>

source§

fn clone(&self) -> FilterMap<I, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, P> Debug for FilterMap<I, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, P, R> ParallelIterator for FilterMap<I, P>
where + I: ParallelIterator, + P: Fn(I::Item) -> Option<R> + Sync + Send, + R: Send,

§

type Item = R

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, P> Freeze for FilterMap<I, P>
where + I: Freeze, + P: Freeze,

§

impl<I, P> RefUnwindSafe for FilterMap<I, P>
where + I: RefUnwindSafe, + P: RefUnwindSafe,

§

impl<I, P> Send for FilterMap<I, P>
where + P: Send,

§

impl<I, P> Sync for FilterMap<I, P>
where + I: Sync, + P: Sync,

§

impl<I, P> Unpin for FilterMap<I, P>
where + I: Unpin, + P: Unpin,

§

impl<I, P> UnwindSafe for FilterMap<I, P>
where + I: UnwindSafe, + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.FlatMap.html b/rayon/iter/struct.FlatMap.html new file mode 100644 index 0000000000..bb3d39e5b9 --- /dev/null +++ b/rayon/iter/struct.FlatMap.html @@ -0,0 +1,205 @@ +FlatMap in rayon::iter - Rust +

Struct rayon::iter::FlatMap

source ·
pub struct FlatMap<I: ParallelIterator, F> { /* private fields */ }
Expand description

FlatMap maps each element to a parallel iterator, then flattens these iterators together. +This struct is created by the flat_map() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, F: Clone> Clone for FlatMap<I, F>

source§

fn clone(&self) -> FlatMap<I, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, F> Debug for FlatMap<I, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, F, PI> ParallelIterator for FlatMap<I, F>
where + I: ParallelIterator, + F: Fn(I::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

§

type Item = <PI as IntoParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, F> Freeze for FlatMap<I, F>
where + F: Freeze, + I: Freeze,

§

impl<I, F> RefUnwindSafe for FlatMap<I, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe,

§

impl<I, F> Send for FlatMap<I, F>
where + F: Send,

§

impl<I, F> Sync for FlatMap<I, F>
where + F: Sync, + I: Sync,

§

impl<I, F> Unpin for FlatMap<I, F>
where + F: Unpin, + I: Unpin,

§

impl<I, F> UnwindSafe for FlatMap<I, F>
where + F: UnwindSafe, + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.FlatMapIter.html b/rayon/iter/struct.FlatMapIter.html new file mode 100644 index 0000000000..ac1d3415c9 --- /dev/null +++ b/rayon/iter/struct.FlatMapIter.html @@ -0,0 +1,206 @@ +FlatMapIter in rayon::iter - Rust +

Struct rayon::iter::FlatMapIter

source ·
pub struct FlatMapIter<I: ParallelIterator, F> { /* private fields */ }
Expand description

FlatMapIter maps each element to a serial iterator, then flattens these iterators together. +This struct is created by the flat_map_iter() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, F: Clone> Clone for FlatMapIter<I, F>

source§

fn clone(&self) -> FlatMapIter<I, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, F> Debug for FlatMapIter<I, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, F, SI> ParallelIterator for FlatMapIter<I, F>
where + I: ParallelIterator, + F: Fn(I::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

§

type Item = <SI as IntoIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, F> Freeze for FlatMapIter<I, F>
where + F: Freeze, + I: Freeze,

§

impl<I, F> RefUnwindSafe for FlatMapIter<I, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe,

§

impl<I, F> Send for FlatMapIter<I, F>
where + F: Send,

§

impl<I, F> Sync for FlatMapIter<I, F>
where + F: Sync, + I: Sync,

§

impl<I, F> Unpin for FlatMapIter<I, F>
where + F: Unpin, + I: Unpin,

§

impl<I, F> UnwindSafe for FlatMapIter<I, F>
where + F: UnwindSafe, + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Flatten.html b/rayon/iter/struct.Flatten.html new file mode 100644 index 0000000000..a84e1bb494 --- /dev/null +++ b/rayon/iter/struct.Flatten.html @@ -0,0 +1,198 @@ +Flatten in rayon::iter - Rust +

Struct rayon::iter::Flatten

source ·
pub struct Flatten<I: ParallelIterator> { /* private fields */ }
Expand description

Flatten turns each element to a parallel iterator, then flattens these iterators +together. This struct is created by the flatten() method on ParallelIterator.

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for Flatten<I>

source§

fn clone(&self) -> Flatten<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for Flatten<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> ParallelIterator for Flatten<I>

§

type Item = <<I as ParallelIterator>::Item as IntoParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Flatten<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Flatten<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Flatten<I>

§

impl<I> Sync for Flatten<I>
where + I: Sync,

§

impl<I> Unpin for Flatten<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Flatten<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.FlattenIter.html b/rayon/iter/struct.FlattenIter.html new file mode 100644 index 0000000000..369eeee9f4 --- /dev/null +++ b/rayon/iter/struct.FlattenIter.html @@ -0,0 +1,199 @@ +FlattenIter in rayon::iter - Rust +

Struct rayon::iter::FlattenIter

source ·
pub struct FlattenIter<I: ParallelIterator> { /* private fields */ }
Expand description

FlattenIter turns each element to a serial iterator, then flattens these iterators +together. This struct is created by the flatten_iter() method on ParallelIterator.

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for FlattenIter<I>

source§

fn clone(&self) -> FlattenIter<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for FlattenIter<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> ParallelIterator for FlattenIter<I>
where + I: ParallelIterator, + I::Item: IntoIterator, + <I::Item as IntoIterator>::Item: Send,

§

type Item = <<I as ParallelIterator>::Item as IntoIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I> Freeze for FlattenIter<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for FlattenIter<I>
where + I: RefUnwindSafe,

§

impl<I> Send for FlattenIter<I>

§

impl<I> Sync for FlattenIter<I>
where + I: Sync,

§

impl<I> Unpin for FlattenIter<I>
where + I: Unpin,

§

impl<I> UnwindSafe for FlattenIter<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Fold.html b/rayon/iter/struct.Fold.html new file mode 100644 index 0000000000..ebc63ee4e5 --- /dev/null +++ b/rayon/iter/struct.Fold.html @@ -0,0 +1,213 @@ +Fold in rayon::iter - Rust +

Struct rayon::iter::Fold

source ·
pub struct Fold<I, ID, F> { /* private fields */ }
Expand description

Fold is an iterator that applies a function over an iterator producing a single value. +This struct is created by the fold() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone, ID: Clone, F: Clone> Clone for Fold<I, ID, F>

source§

fn clone(&self) -> Fold<I, ID, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, ID, F> Debug for Fold<I, ID, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<U, I, ID, F> ParallelIterator for Fold<I, ID, F>
where + I: ParallelIterator, + F: Fn(U, I::Item) -> U + Sync + Send, + ID: Fn() -> U + Sync + Send, + U: Send,

§

type Item = U

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, ID, F> Freeze for Fold<I, ID, F>
where + F: Freeze, + I: Freeze, + ID: Freeze,

§

impl<I, ID, F> RefUnwindSafe for Fold<I, ID, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe, + ID: RefUnwindSafe,

§

impl<I, ID, F> Send for Fold<I, ID, F>
where + F: Send, + I: Send, + ID: Send,

§

impl<I, ID, F> Sync for Fold<I, ID, F>
where + F: Sync, + I: Sync, + ID: Sync,

§

impl<I, ID, F> Unpin for Fold<I, ID, F>
where + F: Unpin, + I: Unpin, + ID: Unpin,

§

impl<I, ID, F> UnwindSafe for Fold<I, ID, F>
where + F: UnwindSafe, + I: UnwindSafe, + ID: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.FoldChunks.html b/rayon/iter/struct.FoldChunks.html new file mode 100644 index 0000000000..af59fb2906 --- /dev/null +++ b/rayon/iter/struct.FoldChunks.html @@ -0,0 +1,313 @@ +FoldChunks in rayon::iter - Rust +

Struct rayon::iter::FoldChunks

source ·
pub struct FoldChunks<I, ID, F>{ /* private fields */ }
Expand description

FoldChunks is an iterator that groups elements of an underlying iterator and applies a +function over them, producing a single value for each group.

+

This struct is created by the fold_chunks() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I, ID: Clone, F: Clone> Clone for FoldChunks<I, ID, F>

source§

fn clone(&self) -> FoldChunks<I, ID, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: IndexedParallelIterator + Debug, ID, F> Debug for FoldChunks<I, ID, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, ID, U, F> IndexedParallelIterator for FoldChunks<I, ID, F>
where + I: IndexedParallelIterator, + ID: Fn() -> U + Send + Sync, + F: Fn(U, I::Item) -> U + Send + Sync, + U: Send,

source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, ID, U, F> ParallelIterator for FoldChunks<I, ID, F>
where + I: IndexedParallelIterator, + ID: Fn() -> U + Send + Sync, + F: Fn(U, I::Item) -> U + Send + Sync, + U: Send,

§

type Item = U

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: Consumer<U>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, ID, F> Freeze for FoldChunks<I, ID, F>
where + F: Freeze, + I: Freeze, + ID: Freeze,

§

impl<I, ID, F> RefUnwindSafe for FoldChunks<I, ID, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe, + ID: RefUnwindSafe,

§

impl<I, ID, F> Send for FoldChunks<I, ID, F>
where + F: Send, + ID: Send,

§

impl<I, ID, F> Sync for FoldChunks<I, ID, F>
where + F: Sync, + I: Sync, + ID: Sync,

§

impl<I, ID, F> Unpin for FoldChunks<I, ID, F>
where + F: Unpin, + I: Unpin, + ID: Unpin,

§

impl<I, ID, F> UnwindSafe for FoldChunks<I, ID, F>
where + F: UnwindSafe, + I: UnwindSafe, + ID: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.FoldChunksWith.html b/rayon/iter/struct.FoldChunksWith.html new file mode 100644 index 0000000000..fe1c9b88ab --- /dev/null +++ b/rayon/iter/struct.FoldChunksWith.html @@ -0,0 +1,311 @@ +FoldChunksWith in rayon::iter - Rust +

Struct rayon::iter::FoldChunksWith

source ·
pub struct FoldChunksWith<I, U, F>{ /* private fields */ }
Expand description

FoldChunksWith is an iterator that groups elements of an underlying iterator and applies a +function over them, producing a single value for each group.

+

This struct is created by the fold_chunks_with() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I, U: Clone, F: Clone> Clone for FoldChunksWith<I, U, F>

source§

fn clone(&self) -> FoldChunksWith<I, U, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: IndexedParallelIterator + Debug, U: Debug, F> Debug for FoldChunksWith<I, U, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, U, F> IndexedParallelIterator for FoldChunksWith<I, U, F>
where + I: IndexedParallelIterator, + U: Send + Clone, + F: Fn(U, I::Item) -> U + Send + Sync,

source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, U, F> ParallelIterator for FoldChunksWith<I, U, F>
where + I: IndexedParallelIterator, + U: Send + Clone, + F: Fn(U, I::Item) -> U + Send + Sync,

§

type Item = U

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: Consumer<U>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, U, F> Freeze for FoldChunksWith<I, U, F>
where + F: Freeze, + I: Freeze, + U: Freeze,

§

impl<I, U, F> RefUnwindSafe for FoldChunksWith<I, U, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe, + U: RefUnwindSafe,

§

impl<I, U, F> Send for FoldChunksWith<I, U, F>
where + F: Send, + U: Send,

§

impl<I, U, F> Sync for FoldChunksWith<I, U, F>
where + F: Sync, + I: Sync, + U: Sync,

§

impl<I, U, F> Unpin for FoldChunksWith<I, U, F>
where + F: Unpin, + I: Unpin, + U: Unpin,

§

impl<I, U, F> UnwindSafe for FoldChunksWith<I, U, F>
where + F: UnwindSafe, + I: UnwindSafe, + U: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.FoldWith.html b/rayon/iter/struct.FoldWith.html new file mode 100644 index 0000000000..88f6cc4202 --- /dev/null +++ b/rayon/iter/struct.FoldWith.html @@ -0,0 +1,212 @@ +FoldWith in rayon::iter - Rust +

Struct rayon::iter::FoldWith

source ·
pub struct FoldWith<I, U, F> { /* private fields */ }
Expand description

FoldWith is an iterator that applies a function over an iterator producing a single value. +This struct is created by the fold_with() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone, U: Clone, F: Clone> Clone for FoldWith<I, U, F>

source§

fn clone(&self) -> FoldWith<I, U, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, U: Debug, F> Debug for FoldWith<I, U, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<U, I, F> ParallelIterator for FoldWith<I, U, F>
where + I: ParallelIterator, + F: Fn(U, I::Item) -> U + Sync + Send, + U: Send + Clone,

§

type Item = U

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, U, F> Freeze for FoldWith<I, U, F>
where + F: Freeze, + I: Freeze, + U: Freeze,

§

impl<I, U, F> RefUnwindSafe for FoldWith<I, U, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe, + U: RefUnwindSafe,

§

impl<I, U, F> Send for FoldWith<I, U, F>
where + F: Send, + I: Send, + U: Send,

§

impl<I, U, F> Sync for FoldWith<I, U, F>
where + F: Sync, + I: Sync, + U: Sync,

§

impl<I, U, F> Unpin for FoldWith<I, U, F>
where + F: Unpin, + I: Unpin, + U: Unpin,

§

impl<I, U, F> UnwindSafe for FoldWith<I, U, F>
where + F: UnwindSafe, + I: UnwindSafe, + U: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Inspect.html b/rayon/iter/struct.Inspect.html new file mode 100644 index 0000000000..b52e576ba6 --- /dev/null +++ b/rayon/iter/struct.Inspect.html @@ -0,0 +1,301 @@ +Inspect in rayon::iter - Rust +

Struct rayon::iter::Inspect

source ·
pub struct Inspect<I: ParallelIterator, F> { /* private fields */ }
Expand description

Inspect is an iterator that calls a function with a reference to each +element before yielding it.

+

This struct is created by the inspect() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, F: Clone> Clone for Inspect<I, F>

source§

fn clone(&self) -> Inspect<I, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, F> Debug for Inspect<I, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, F> IndexedParallelIterator for Inspect<I, F>
where + I: IndexedParallelIterator, + F: Fn(&I::Item) + Sync + Send,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, F> ParallelIterator for Inspect<I, F>
where + I: ParallelIterator, + F: Fn(&I::Item) + Sync + Send,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, F> Freeze for Inspect<I, F>
where + F: Freeze, + I: Freeze,

§

impl<I, F> RefUnwindSafe for Inspect<I, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe,

§

impl<I, F> Send for Inspect<I, F>
where + F: Send,

§

impl<I, F> Sync for Inspect<I, F>
where + F: Sync, + I: Sync,

§

impl<I, F> Unpin for Inspect<I, F>
where + F: Unpin, + I: Unpin,

§

impl<I, F> UnwindSafe for Inspect<I, F>
where + F: UnwindSafe, + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Interleave.html b/rayon/iter/struct.Interleave.html new file mode 100644 index 0000000000..ebdc6fabc1 --- /dev/null +++ b/rayon/iter/struct.Interleave.html @@ -0,0 +1,306 @@ +Interleave in rayon::iter - Rust +

Struct rayon::iter::Interleave

source ·
pub struct Interleave<I, J>{ /* private fields */ }
Expand description

Interleave is an iterator that interleaves elements of iterators +i and j in one continuous iterator. This struct is created by +the interleave() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I, J> Clone for Interleave<I, J>

source§

fn clone(&self) -> Interleave<I, J>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I, J> Debug for Interleave<I, J>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, J> IndexedParallelIterator for Interleave<I, J>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, J> ParallelIterator for Interleave<I, J>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: Consumer<I::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, J> Freeze for Interleave<I, J>
where + I: Freeze, + J: Freeze,

§

impl<I, J> RefUnwindSafe for Interleave<I, J>
where + I: RefUnwindSafe, + J: RefUnwindSafe,

§

impl<I, J> Send for Interleave<I, J>

§

impl<I, J> Sync for Interleave<I, J>
where + I: Sync, + J: Sync,

§

impl<I, J> Unpin for Interleave<I, J>
where + I: Unpin, + J: Unpin,

§

impl<I, J> UnwindSafe for Interleave<I, J>
where + I: UnwindSafe, + J: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.InterleaveShortest.html b/rayon/iter/struct.InterleaveShortest.html new file mode 100644 index 0000000000..5d98ca464e --- /dev/null +++ b/rayon/iter/struct.InterleaveShortest.html @@ -0,0 +1,308 @@ +InterleaveShortest in rayon::iter - Rust +
pub struct InterleaveShortest<I, J>{ /* private fields */ }
Expand description

InterleaveShortest is an iterator that works similarly to +Interleave, but this version stops returning elements once one +of the iterators run out.

+

This struct is created by the interleave_shortest() method on +IndexedParallelIterator.

+

Trait Implementations§

source§

impl<I, J> Clone for InterleaveShortest<I, J>

source§

fn clone(&self) -> InterleaveShortest<I, J>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I, J> Debug for InterleaveShortest<I, J>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, J> IndexedParallelIterator for InterleaveShortest<I, J>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, J> ParallelIterator for InterleaveShortest<I, J>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: Consumer<I::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, J> Freeze for InterleaveShortest<I, J>
where + I: Freeze, + J: Freeze,

§

impl<I, J> RefUnwindSafe for InterleaveShortest<I, J>
where + I: RefUnwindSafe, + J: RefUnwindSafe,

§

impl<I, J> Send for InterleaveShortest<I, J>

§

impl<I, J> Sync for InterleaveShortest<I, J>
where + I: Sync, + J: Sync,

§

impl<I, J> Unpin for InterleaveShortest<I, J>
where + I: Unpin, + J: Unpin,

§

impl<I, J> UnwindSafe for InterleaveShortest<I, J>
where + I: UnwindSafe, + J: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Intersperse.html b/rayon/iter/struct.Intersperse.html new file mode 100644 index 0000000000..d26f0544ac --- /dev/null +++ b/rayon/iter/struct.Intersperse.html @@ -0,0 +1,306 @@ +Intersperse in rayon::iter - Rust +

Struct rayon::iter::Intersperse

source ·
pub struct Intersperse<I>
where + I: ParallelIterator, + I::Item: Clone,
{ /* private fields */ }
Expand description

Intersperse is an iterator that inserts a particular item between each +item of the adapted iterator. This struct is created by the +intersperse() method on ParallelIterator

+

Trait Implementations§

source§

impl<I> Clone for Intersperse<I>
where + I: ParallelIterator + Clone, + I::Item: Clone + Clone,

source§

fn clone(&self) -> Intersperse<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I> Debug for Intersperse<I>
where + I: ParallelIterator + Debug, + I::Item: Clone + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for Intersperse<I>
where + I: IndexedParallelIterator, + I::Item: Clone + Send,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for Intersperse<I>
where + I: ParallelIterator, + I::Item: Clone + Send,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<I::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Intersperse<I>
where + I: Freeze, + <I as ParallelIterator>::Item: Freeze,

§

impl<I> RefUnwindSafe for Intersperse<I>

§

impl<I> Send for Intersperse<I>

§

impl<I> Sync for Intersperse<I>
where + I: Sync, + <I as ParallelIterator>::Item: Sync,

§

impl<I> Unpin for Intersperse<I>
where + I: Unpin, + <I as ParallelIterator>::Item: Unpin,

§

impl<I> UnwindSafe for Intersperse<I>
where + I: UnwindSafe, + <I as ParallelIterator>::Item: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.IterBridge.html b/rayon/iter/struct.IterBridge.html new file mode 100644 index 0000000000..1b503cd374 --- /dev/null +++ b/rayon/iter/struct.IterBridge.html @@ -0,0 +1,199 @@ +IterBridge in rayon::iter - Rust +

Struct rayon::iter::IterBridge

source ·
pub struct IterBridge<Iter> { /* private fields */ }
Expand description

IterBridge is a parallel iterator that wraps a sequential iterator.

+

This type is created when using the par_bridge method on ParallelBridge. See the +ParallelBridge documentation for details.

+

Trait Implementations§

source§

impl<Iter: Clone> Clone for IterBridge<Iter>

source§

fn clone(&self) -> IterBridge<Iter>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Iter: Debug> Debug for IterBridge<Iter>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Iter: Iterator + Send> ParallelIterator for IterBridge<Iter>
where + Iter::Item: Send,

§

type Item = <Iter as Iterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<Iter> Freeze for IterBridge<Iter>
where + Iter: Freeze,

§

impl<Iter> RefUnwindSafe for IterBridge<Iter>
where + Iter: RefUnwindSafe,

§

impl<Iter> Send for IterBridge<Iter>
where + Iter: Send,

§

impl<Iter> Sync for IterBridge<Iter>
where + Iter: Sync,

§

impl<Iter> Unpin for IterBridge<Iter>
where + Iter: Unpin,

§

impl<Iter> UnwindSafe for IterBridge<Iter>
where + Iter: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Map.html b/rayon/iter/struct.Map.html new file mode 100644 index 0000000000..830b9df9b1 --- /dev/null +++ b/rayon/iter/struct.Map.html @@ -0,0 +1,302 @@ +Map in rayon::iter - Rust +

Struct rayon::iter::Map

source ·
pub struct Map<I: ParallelIterator, F> { /* private fields */ }
Expand description

Map is an iterator that transforms the elements of an underlying iterator.

+

This struct is created by the map() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, F: Clone> Clone for Map<I, F>

source§

fn clone(&self) -> Map<I, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, F> Debug for Map<I, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, F, R> IndexedParallelIterator for Map<I, F>
where + I: IndexedParallelIterator, + F: Fn(I::Item) -> R + Sync + Send, + R: Send,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, F, R> ParallelIterator for Map<I, F>
where + I: ParallelIterator, + F: Fn(I::Item) -> R + Sync + Send, + R: Send,

§

type Item = <F as FnOnce(<I as ParallelIterator>::Item)>::Output

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, F> Freeze for Map<I, F>
where + F: Freeze, + I: Freeze,

§

impl<I, F> RefUnwindSafe for Map<I, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe,

§

impl<I, F> Send for Map<I, F>
where + F: Send,

§

impl<I, F> Sync for Map<I, F>
where + F: Sync, + I: Sync,

§

impl<I, F> Unpin for Map<I, F>
where + F: Unpin, + I: Unpin,

§

impl<I, F> UnwindSafe for Map<I, F>
where + F: UnwindSafe, + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.MapInit.html b/rayon/iter/struct.MapInit.html new file mode 100644 index 0000000000..d6c7c42c05 --- /dev/null +++ b/rayon/iter/struct.MapInit.html @@ -0,0 +1,310 @@ +MapInit in rayon::iter - Rust +

Struct rayon::iter::MapInit

source ·
pub struct MapInit<I: ParallelIterator, INIT, F> { /* private fields */ }
Expand description

MapInit is an iterator that transforms the elements of an underlying iterator.

+

This struct is created by the map_init() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, INIT: Clone, F: Clone> Clone for MapInit<I, INIT, F>

source§

fn clone(&self) -> MapInit<I, INIT, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, INIT, F> Debug for MapInit<I, INIT, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, INIT, T, F, R> IndexedParallelIterator for MapInit<I, INIT, F>
where + I: IndexedParallelIterator, + INIT: Fn() -> T + Sync + Send, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, INIT, T, F, R> ParallelIterator for MapInit<I, INIT, F>
where + I: ParallelIterator, + INIT: Fn() -> T + Sync + Send, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

§

type Item = R

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, INIT, F> Freeze for MapInit<I, INIT, F>
where + F: Freeze, + I: Freeze, + INIT: Freeze,

§

impl<I, INIT, F> RefUnwindSafe for MapInit<I, INIT, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe, + INIT: RefUnwindSafe,

§

impl<I, INIT, F> Send for MapInit<I, INIT, F>
where + F: Send, + INIT: Send,

§

impl<I, INIT, F> Sync for MapInit<I, INIT, F>
where + F: Sync, + I: Sync, + INIT: Sync,

§

impl<I, INIT, F> Unpin for MapInit<I, INIT, F>
where + F: Unpin, + I: Unpin, + INIT: Unpin,

§

impl<I, INIT, F> UnwindSafe for MapInit<I, INIT, F>
where + F: UnwindSafe, + I: UnwindSafe, + INIT: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.MapWith.html b/rayon/iter/struct.MapWith.html new file mode 100644 index 0000000000..ffd02e2692 --- /dev/null +++ b/rayon/iter/struct.MapWith.html @@ -0,0 +1,310 @@ +MapWith in rayon::iter - Rust +

Struct rayon::iter::MapWith

source ·
pub struct MapWith<I: ParallelIterator, T, F> { /* private fields */ }
Expand description

MapWith is an iterator that transforms the elements of an underlying iterator.

+

This struct is created by the map_with() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, T: Clone, F: Clone> Clone for MapWith<I, T, F>

source§

fn clone(&self) -> MapWith<I, T, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, T: Debug, F> Debug for MapWith<I, T, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, T, F, R> IndexedParallelIterator for MapWith<I, T, F>
where + I: IndexedParallelIterator, + T: Send + Clone, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, T, F, R> ParallelIterator for MapWith<I, T, F>
where + I: ParallelIterator, + T: Send + Clone, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

§

type Item = R

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, T, F> Freeze for MapWith<I, T, F>
where + F: Freeze, + I: Freeze, + T: Freeze,

§

impl<I, T, F> RefUnwindSafe for MapWith<I, T, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<I, T, F> Send for MapWith<I, T, F>
where + F: Send, + T: Send,

§

impl<I, T, F> Sync for MapWith<I, T, F>
where + F: Sync, + I: Sync, + T: Sync,

§

impl<I, T, F> Unpin for MapWith<I, T, F>
where + F: Unpin, + I: Unpin, + T: Unpin,

§

impl<I, T, F> UnwindSafe for MapWith<I, T, F>
where + F: UnwindSafe, + I: UnwindSafe, + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.MaxLen.html b/rayon/iter/struct.MaxLen.html new file mode 100644 index 0000000000..8f05d24f1f --- /dev/null +++ b/rayon/iter/struct.MaxLen.html @@ -0,0 +1,291 @@ +MaxLen in rayon::iter - Rust +

Struct rayon::iter::MaxLen

source ·
pub struct MaxLen<I: IndexedParallelIterator> { /* private fields */ }
Expand description

MaxLen is an iterator that imposes a maximum length on iterator splits. +This struct is created by the with_max_len() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + IndexedParallelIterator> Clone for MaxLen<I>

source§

fn clone(&self) -> MaxLen<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + IndexedParallelIterator> Debug for MaxLen<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for MaxLen<I>

source§

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for MaxLen<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for MaxLen<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for MaxLen<I>
where + I: RefUnwindSafe,

§

impl<I> Send for MaxLen<I>

§

impl<I> Sync for MaxLen<I>
where + I: Sync,

§

impl<I> Unpin for MaxLen<I>
where + I: Unpin,

§

impl<I> UnwindSafe for MaxLen<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.MinLen.html b/rayon/iter/struct.MinLen.html new file mode 100644 index 0000000000..a2881eb8bc --- /dev/null +++ b/rayon/iter/struct.MinLen.html @@ -0,0 +1,291 @@ +MinLen in rayon::iter - Rust +

Struct rayon::iter::MinLen

source ·
pub struct MinLen<I: IndexedParallelIterator> { /* private fields */ }
Expand description

MinLen is an iterator that imposes a minimum length on iterator splits. +This struct is created by the with_min_len() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + IndexedParallelIterator> Clone for MinLen<I>

source§

fn clone(&self) -> MinLen<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + IndexedParallelIterator> Debug for MinLen<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for MinLen<I>

source§

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for MinLen<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for MinLen<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for MinLen<I>
where + I: RefUnwindSafe,

§

impl<I> Send for MinLen<I>

§

impl<I> Sync for MinLen<I>
where + I: Sync,

§

impl<I> Unpin for MinLen<I>
where + I: Unpin,

§

impl<I> UnwindSafe for MinLen<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.MultiZip.html b/rayon/iter/struct.MultiZip.html new file mode 100644 index 0000000000..ad71802634 --- /dev/null +++ b/rayon/iter/struct.MultiZip.html @@ -0,0 +1,3389 @@ +MultiZip in rayon::iter - Rust +

Struct rayon::iter::MultiZip

source ·
pub struct MultiZip<T> { /* private fields */ }
Expand description

MultiZip is an iterator that zips up a tuple of parallel iterators to +produce tuples of their items.

+

It is created by calling into_par_iter() on a tuple of types that +implement IntoParallelIterator, or par_iter()/par_iter_mut() with +types that are iterable by reference.

+

The implementation currently support tuples up to length 12.

+

§Examples

+
use rayon::prelude::*;
+
+// This will iterate `r` by mutable reference, like `par_iter_mut()`, while
+// ranges are all iterated by value like `into_par_iter()`.
+// Note that the zipped iterator is only as long as the shortest input.
+let mut r = vec![0; 3];
+(&mut r, 1..10, 10..100, 100..1000).into_par_iter()
+    .for_each(|(r, x, y, z)| *r = x * y + z);
+
+assert_eq!(&r, &[1 * 10 + 100, 2 * 11 + 101, 3 * 12 + 102]);
+

For a group that should all be iterated by reference, you can use a tuple reference.

+ +
use rayon::prelude::*;
+
+let xs: Vec<_> = (1..10).collect();
+let ys: Vec<_> = (10..100).collect();
+let zs: Vec<_> = (100..1000).collect();
+
+// Reference each input separately with `IntoParallelIterator`:
+let r1: Vec<_> = (&xs, &ys, &zs).into_par_iter()
+    .map(|(x, y, z)| x * y + z)
+    .collect();
+
+// Reference them all together with `IntoParallelRefIterator`:
+let r2: Vec<_> = (xs, ys, zs).par_iter()
+    .map(|(x, y, z)| x * y + z)
+    .collect();
+
+assert_eq!(r1, r2);
+

Mutable references to a tuple will work similarly.

+ +
use rayon::prelude::*;
+
+let mut xs: Vec<_> = (1..4).collect();
+let mut ys: Vec<_> = (-4..-1).collect();
+let mut zs = vec![0; 3];
+
+// Mutably reference each input separately with `IntoParallelIterator`:
+(&mut xs, &mut ys, &mut zs).into_par_iter().for_each(|(x, y, z)| {
+    *z += *x + *y;
+    std::mem::swap(x, y);
+});
+
+assert_eq!(xs, (vec![-4, -3, -2]));
+assert_eq!(ys, (vec![1, 2, 3]));
+assert_eq!(zs, (vec![-3, -1, 1]));
+
+// Mutably reference them all together with `IntoParallelRefMutIterator`:
+let mut tuple = (xs, ys, zs);
+tuple.par_iter_mut().for_each(|(x, y, z)| {
+    *z += *x + *y;
+    std::mem::swap(x, y);
+});
+
+assert_eq!(tuple, (vec![1, 2, 3], vec![-4, -3, -2], vec![-6, -2, 2]));
+

Trait Implementations§

source§

impl<T: Clone> Clone for MultiZip<T>

source§

fn clone(&self) -> MultiZip<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for MultiZip<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<A> IndexedParallelIterator for MultiZip<(A,)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B> IndexedParallelIterator for MultiZip<(A, B)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C> IndexedParallelIterator for MultiZip<(A, B, C)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D> IndexedParallelIterator for MultiZip<(A, B, C, D)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E> IndexedParallelIterator for MultiZip<(A, B, C, D, E)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E, F> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E, F, G> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E, F, G, H> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E, F, G, H, I> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E, F, G, H, I, J> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E, F, G, H, I, J, K> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>

source§

fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A> ParallelIterator for MultiZip<(A,)>

§

type Item = (<A as ParallelIterator>::Item,)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B> ParallelIterator for MultiZip<(A, B)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C> ParallelIterator for MultiZip<(A, B, C)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D> ParallelIterator for MultiZip<(A, B, C, D)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E> ParallelIterator for MultiZip<(A, B, C, D, E)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E, F> ParallelIterator for MultiZip<(A, B, C, D, E, F)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E, F, G> ParallelIterator for MultiZip<(A, B, C, D, E, F, G)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E, F, G, H> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E, F, G, H, I> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E, F, G, H, I, J> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E, F, G, H, I, J, K> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item, <K as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item, <K as ParallelIterator>::Item, <L as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
where + CONSUMER: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for MultiZip<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for MultiZip<T>
where + T: RefUnwindSafe,

§

impl<T> Send for MultiZip<T>
where + T: Send,

§

impl<T> Sync for MultiZip<T>
where + T: Sync,

§

impl<T> Unpin for MultiZip<T>
where + T: Unpin,

§

impl<T> UnwindSafe for MultiZip<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Once.html b/rayon/iter/struct.Once.html new file mode 100644 index 0000000000..6bae6cc70c --- /dev/null +++ b/rayon/iter/struct.Once.html @@ -0,0 +1,289 @@ +Once in rayon::iter - Rust +

Struct rayon::iter::Once

source ·
pub struct Once<T: Send> { /* private fields */ }
Expand description

Iterator adaptor for the once() function.

+

Trait Implementations§

source§

impl<T: Clone + Send> Clone for Once<T>

source§

fn clone(&self) -> Once<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Send> Debug for Once<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> IndexedParallelIterator for Once<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Send> ParallelIterator for Once<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Once<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for Once<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Once<T>

§

impl<T> Sync for Once<T>
where + T: Sync,

§

impl<T> Unpin for Once<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Once<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.PanicFuse.html b/rayon/iter/struct.PanicFuse.html new file mode 100644 index 0000000000..1de6891118 --- /dev/null +++ b/rayon/iter/struct.PanicFuse.html @@ -0,0 +1,293 @@ +PanicFuse in rayon::iter - Rust +

Struct rayon::iter::PanicFuse

source ·
pub struct PanicFuse<I: ParallelIterator> { /* private fields */ }
Expand description

PanicFuse is an adaptor that wraps an iterator with a fuse in case +of panics, to halt all threads as soon as possible.

+

This struct is created by the panic_fuse() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for PanicFuse<I>

source§

fn clone(&self) -> PanicFuse<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for PanicFuse<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for PanicFuse<I>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for PanicFuse<I>
where + I: ParallelIterator,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for PanicFuse<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for PanicFuse<I>
where + I: RefUnwindSafe,

§

impl<I> Send for PanicFuse<I>

§

impl<I> Sync for PanicFuse<I>
where + I: Sync,

§

impl<I> Unpin for PanicFuse<I>
where + I: Unpin,

§

impl<I> UnwindSafe for PanicFuse<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Positions.html b/rayon/iter/struct.Positions.html new file mode 100644 index 0000000000..b182f3298e --- /dev/null +++ b/rayon/iter/struct.Positions.html @@ -0,0 +1,205 @@ +Positions in rayon::iter - Rust +

Struct rayon::iter::Positions

source ·
pub struct Positions<I: IndexedParallelIterator, P> { /* private fields */ }
Expand description

Positions takes a predicate predicate and filters out elements that match, +yielding their indices.

+

This struct is created by the positions() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + IndexedParallelIterator, P: Clone> Clone for Positions<I, P>

source§

fn clone(&self) -> Positions<I, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: IndexedParallelIterator + Debug, P> Debug for Positions<I, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, P> ParallelIterator for Positions<I, P>
where + I: IndexedParallelIterator, + P: Fn(I::Item) -> bool + Sync + Send,

§

type Item = usize

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, P> Freeze for Positions<I, P>
where + I: Freeze, + P: Freeze,

§

impl<I, P> RefUnwindSafe for Positions<I, P>
where + I: RefUnwindSafe, + P: RefUnwindSafe,

§

impl<I, P> Send for Positions<I, P>
where + P: Send,

§

impl<I, P> Sync for Positions<I, P>
where + I: Sync, + P: Sync,

§

impl<I, P> Unpin for Positions<I, P>
where + I: Unpin, + P: Unpin,

§

impl<I, P> UnwindSafe for Positions<I, P>
where + I: UnwindSafe, + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Repeat.html b/rayon/iter/struct.Repeat.html new file mode 100644 index 0000000000..9e265d4ef6 --- /dev/null +++ b/rayon/iter/struct.Repeat.html @@ -0,0 +1,206 @@ +Repeat in rayon::iter - Rust +

Struct rayon::iter::Repeat

source ·
pub struct Repeat<T: Clone + Send> { /* private fields */ }
Expand description

Iterator adaptor for the repeat() function.

+

Implementations§

source§

impl<T> Repeat<T>
where + T: Clone + Send,

source

pub fn take(self, n: usize) -> RepeatN<T>

Takes only n repeats of the element, similar to the general +take().

+

The resulting RepeatN is an IndexedParallelIterator, allowing +more functionality than Repeat alone.

+
source

pub fn zip<Z>(self, zip_op: Z) -> Zip<RepeatN<T>, Z::Iter>

Iterates tuples, repeating the element with items from another +iterator, similar to the general +zip().

+

Trait Implementations§

source§

impl<T: Clone + Clone + Send> Clone for Repeat<T>

source§

fn clone(&self) -> Repeat<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Clone + Send> Debug for Repeat<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> ParallelIterator for Repeat<T>
where + T: Clone + Send,

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Repeat<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for Repeat<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Repeat<T>

§

impl<T> Sync for Repeat<T>
where + T: Sync,

§

impl<T> Unpin for Repeat<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Repeat<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.RepeatN.html b/rayon/iter/struct.RepeatN.html new file mode 100644 index 0000000000..a1f607707a --- /dev/null +++ b/rayon/iter/struct.RepeatN.html @@ -0,0 +1,291 @@ +RepeatN in rayon::iter - Rust +

Struct rayon::iter::RepeatN

source ·
pub struct RepeatN<T: Clone + Send> { /* private fields */ }
Expand description

Iterator adaptor for the repeatn() function.

+

Trait Implementations§

source§

impl<T: Clone + Clone + Send> Clone for RepeatN<T>

source§

fn clone(&self) -> RepeatN<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Clone + Send> Debug for RepeatN<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> IndexedParallelIterator for RepeatN<T>
where + T: Clone + Send,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T> ParallelIterator for RepeatN<T>
where + T: Clone + Send,

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for RepeatN<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for RepeatN<T>
where + T: RefUnwindSafe,

§

impl<T> Send for RepeatN<T>

§

impl<T> Sync for RepeatN<T>
where + T: Sync,

§

impl<T> Unpin for RepeatN<T>
where + T: Unpin,

§

impl<T> UnwindSafe for RepeatN<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Rev.html b/rayon/iter/struct.Rev.html new file mode 100644 index 0000000000..96e3fbb31c --- /dev/null +++ b/rayon/iter/struct.Rev.html @@ -0,0 +1,291 @@ +Rev in rayon::iter - Rust +

Struct rayon::iter::Rev

source ·
pub struct Rev<I: IndexedParallelIterator> { /* private fields */ }
Expand description

Rev is an iterator that produces elements in reverse order. This struct +is created by the rev() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + IndexedParallelIterator> Clone for Rev<I>

source§

fn clone(&self) -> Rev<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + IndexedParallelIterator> Debug for Rev<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for Rev<I>

source§

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for Rev<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Rev<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Rev<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Rev<I>

§

impl<I> Sync for Rev<I>
where + I: Sync,

§

impl<I> Unpin for Rev<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Rev<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Skip.html b/rayon/iter/struct.Skip.html new file mode 100644 index 0000000000..e5e895a8a3 --- /dev/null +++ b/rayon/iter/struct.Skip.html @@ -0,0 +1,292 @@ +Skip in rayon::iter - Rust +

Struct rayon::iter::Skip

source ·
pub struct Skip<I> { /* private fields */ }
Expand description

Skip is an iterator that skips over the first n elements. +This struct is created by the skip() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone> Clone for Skip<I>

source§

fn clone(&self) -> Skip<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug> Debug for Skip<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for Skip<I>

source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for Skip<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Skip<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Skip<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Skip<I>
where + I: Send,

§

impl<I> Sync for Skip<I>
where + I: Sync,

§

impl<I> Unpin for Skip<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Skip<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.SkipAny.html b/rayon/iter/struct.SkipAny.html new file mode 100644 index 0000000000..0abaa87753 --- /dev/null +++ b/rayon/iter/struct.SkipAny.html @@ -0,0 +1,197 @@ +SkipAny in rayon::iter - Rust +

Struct rayon::iter::SkipAny

source ·
pub struct SkipAny<I: ParallelIterator> { /* private fields */ }
Expand description

SkipAny is an iterator that skips over n elements from anywhere in I. +This struct is created by the skip_any() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for SkipAny<I>

source§

fn clone(&self) -> SkipAny<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for SkipAny<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> ParallelIterator for SkipAny<I>
where + I: ParallelIterator,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I> Freeze for SkipAny<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for SkipAny<I>
where + I: RefUnwindSafe,

§

impl<I> Send for SkipAny<I>

§

impl<I> Sync for SkipAny<I>
where + I: Sync,

§

impl<I> Unpin for SkipAny<I>
where + I: Unpin,

§

impl<I> UnwindSafe for SkipAny<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.SkipAnyWhile.html b/rayon/iter/struct.SkipAnyWhile.html new file mode 100644 index 0000000000..f6abad8a9d --- /dev/null +++ b/rayon/iter/struct.SkipAnyWhile.html @@ -0,0 +1,205 @@ +SkipAnyWhile in rayon::iter - Rust +

Struct rayon::iter::SkipAnyWhile

source ·
pub struct SkipAnyWhile<I: ParallelIterator, P> { /* private fields */ }
Expand description

SkipAnyWhile is an iterator that skips over elements from anywhere in I +until the callback returns false. +This struct is created by the skip_any_while() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, P: Clone> Clone for SkipAnyWhile<I, P>

source§

fn clone(&self) -> SkipAnyWhile<I, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, P> Debug for SkipAnyWhile<I, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, P> ParallelIterator for SkipAnyWhile<I, P>
where + I: ParallelIterator, + P: Fn(&I::Item) -> bool + Sync + Send,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, P> Freeze for SkipAnyWhile<I, P>
where + I: Freeze, + P: Freeze,

§

impl<I, P> RefUnwindSafe for SkipAnyWhile<I, P>
where + I: RefUnwindSafe, + P: RefUnwindSafe,

§

impl<I, P> Send for SkipAnyWhile<I, P>
where + P: Send,

§

impl<I, P> Sync for SkipAnyWhile<I, P>
where + I: Sync, + P: Sync,

§

impl<I, P> Unpin for SkipAnyWhile<I, P>
where + I: Unpin, + P: Unpin,

§

impl<I, P> UnwindSafe for SkipAnyWhile<I, P>
where + I: UnwindSafe, + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Split.html b/rayon/iter/struct.Split.html new file mode 100644 index 0000000000..14dd38b61c --- /dev/null +++ b/rayon/iter/struct.Split.html @@ -0,0 +1,205 @@ +Split in rayon::iter - Rust +

Struct rayon::iter::Split

source ·
pub struct Split<D, S> { /* private fields */ }
Expand description

Split is a parallel iterator using arbitrary data and a splitting function. +This struct is created by the split() function.

+

Trait Implementations§

source§

impl<D: Clone, S: Clone> Clone for Split<D, S>

source§

fn clone(&self) -> Split<D, S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<D: Debug, S> Debug for Split<D, S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<D, S> ParallelIterator for Split<D, S>
where + D: Send, + S: Fn(D) -> (D, Option<D>) + Sync + Send,

§

type Item = D

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<D, S> Freeze for Split<D, S>
where + D: Freeze, + S: Freeze,

§

impl<D, S> RefUnwindSafe for Split<D, S>
where + D: RefUnwindSafe, + S: RefUnwindSafe,

§

impl<D, S> Send for Split<D, S>
where + D: Send, + S: Send,

§

impl<D, S> Sync for Split<D, S>
where + D: Sync, + S: Sync,

§

impl<D, S> Unpin for Split<D, S>
where + D: Unpin, + S: Unpin,

§

impl<D, S> UnwindSafe for Split<D, S>
where + D: UnwindSafe, + S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.StepBy.html b/rayon/iter/struct.StepBy.html new file mode 100644 index 0000000000..5c3490794c --- /dev/null +++ b/rayon/iter/struct.StepBy.html @@ -0,0 +1,291 @@ +StepBy in rayon::iter - Rust +

Struct rayon::iter::StepBy

source ·
pub struct StepBy<I: IndexedParallelIterator> { /* private fields */ }
Expand description

StepBy is an iterator that skips n elements between each yield, where n is the given step. +This struct is created by the step_by() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + IndexedParallelIterator> Clone for StepBy<I>

source§

fn clone(&self) -> StepBy<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + IndexedParallelIterator> Debug for StepBy<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for StepBy<I>

source§

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for StepBy<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for StepBy<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for StepBy<I>
where + I: RefUnwindSafe,

§

impl<I> Send for StepBy<I>

§

impl<I> Sync for StepBy<I>
where + I: Sync,

§

impl<I> Unpin for StepBy<I>
where + I: Unpin,

§

impl<I> UnwindSafe for StepBy<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Take.html b/rayon/iter/struct.Take.html new file mode 100644 index 0000000000..be11c8e840 --- /dev/null +++ b/rayon/iter/struct.Take.html @@ -0,0 +1,292 @@ +Take in rayon::iter - Rust +

Struct rayon::iter::Take

source ·
pub struct Take<I> { /* private fields */ }
Expand description

Take is an iterator that iterates over the first n elements. +This struct is created by the take() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone> Clone for Take<I>

source§

fn clone(&self) -> Take<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug> Debug for Take<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> IndexedParallelIterator for Take<I>

source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I> ParallelIterator for Take<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Take<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for Take<I>
where + I: RefUnwindSafe,

§

impl<I> Send for Take<I>
where + I: Send,

§

impl<I> Sync for Take<I>
where + I: Sync,

§

impl<I> Unpin for Take<I>
where + I: Unpin,

§

impl<I> UnwindSafe for Take<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.TakeAny.html b/rayon/iter/struct.TakeAny.html new file mode 100644 index 0000000000..a9bdd15bba --- /dev/null +++ b/rayon/iter/struct.TakeAny.html @@ -0,0 +1,197 @@ +TakeAny in rayon::iter - Rust +

Struct rayon::iter::TakeAny

source ·
pub struct TakeAny<I: ParallelIterator> { /* private fields */ }
Expand description

TakeAny is an iterator that iterates over n elements from anywhere in I. +This struct is created by the take_any() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for TakeAny<I>

source§

fn clone(&self) -> TakeAny<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for TakeAny<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> ParallelIterator for TakeAny<I>
where + I: ParallelIterator,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I> Freeze for TakeAny<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for TakeAny<I>
where + I: RefUnwindSafe,

§

impl<I> Send for TakeAny<I>

§

impl<I> Sync for TakeAny<I>
where + I: Sync,

§

impl<I> Unpin for TakeAny<I>
where + I: Unpin,

§

impl<I> UnwindSafe for TakeAny<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.TakeAnyWhile.html b/rayon/iter/struct.TakeAnyWhile.html new file mode 100644 index 0000000000..64ee87b351 --- /dev/null +++ b/rayon/iter/struct.TakeAnyWhile.html @@ -0,0 +1,205 @@ +TakeAnyWhile in rayon::iter - Rust +

Struct rayon::iter::TakeAnyWhile

source ·
pub struct TakeAnyWhile<I: ParallelIterator, P> { /* private fields */ }
Expand description

TakeAnyWhile is an iterator that iterates over elements from anywhere in I +until the callback returns false. +This struct is created by the take_any_while() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, P: Clone> Clone for TakeAnyWhile<I, P>

source§

fn clone(&self) -> TakeAnyWhile<I, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, P> Debug for TakeAnyWhile<I, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, P> ParallelIterator for TakeAnyWhile<I, P>
where + I: ParallelIterator, + P: Fn(&I::Item) -> bool + Sync + Send,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, P> Freeze for TakeAnyWhile<I, P>
where + I: Freeze, + P: Freeze,

§

impl<I, P> RefUnwindSafe for TakeAnyWhile<I, P>
where + I: RefUnwindSafe, + P: RefUnwindSafe,

§

impl<I, P> Send for TakeAnyWhile<I, P>
where + P: Send,

§

impl<I, P> Sync for TakeAnyWhile<I, P>
where + I: Sync, + P: Sync,

§

impl<I, P> Unpin for TakeAnyWhile<I, P>
where + I: Unpin, + P: Unpin,

§

impl<I, P> UnwindSafe for TakeAnyWhile<I, P>
where + I: UnwindSafe, + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.TryFold.html b/rayon/iter/struct.TryFold.html new file mode 100644 index 0000000000..56550fa6cc --- /dev/null +++ b/rayon/iter/struct.TryFold.html @@ -0,0 +1,218 @@ +TryFold in rayon::iter - Rust +

Struct rayon::iter::TryFold

source ·
pub struct TryFold<I, U, ID, F> { /* private fields */ }
Expand description

TryFold is an iterator that applies a function over an iterator producing a single value. +This struct is created by the try_fold() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone, U: Clone, ID: Clone, F: Clone> Clone for TryFold<I, U, ID, F>

source§

fn clone(&self) -> TryFold<I, U, ID, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<U, I: ParallelIterator + Debug, ID, F> Debug for TryFold<I, U, ID, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<U, I, ID, F> ParallelIterator for TryFold<I, U, ID, F>
where + I: ParallelIterator, + F: Fn(U::Output, I::Item) -> U + Sync + Send, + ID: Fn() -> U::Output + Sync + Send, + U: Try + Send,

§

type Item = U

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, U, ID, F> Freeze for TryFold<I, U, ID, F>
where + F: Freeze, + I: Freeze, + ID: Freeze,

§

impl<I, U, ID, F> RefUnwindSafe for TryFold<I, U, ID, F>

§

impl<I, U, ID, F> Send for TryFold<I, U, ID, F>
where + F: Send, + I: Send, + ID: Send, + U: Send,

§

impl<I, U, ID, F> Sync for TryFold<I, U, ID, F>
where + F: Sync, + I: Sync, + ID: Sync, + U: Sync,

§

impl<I, U, ID, F> Unpin for TryFold<I, U, ID, F>
where + F: Unpin, + I: Unpin, + ID: Unpin, + U: Unpin,

§

impl<I, U, ID, F> UnwindSafe for TryFold<I, U, ID, F>
where + F: UnwindSafe, + I: UnwindSafe, + ID: UnwindSafe, + U: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.TryFoldWith.html b/rayon/iter/struct.TryFoldWith.html new file mode 100644 index 0000000000..baf697c3f6 --- /dev/null +++ b/rayon/iter/struct.TryFoldWith.html @@ -0,0 +1,215 @@ +TryFoldWith in rayon::iter - Rust +

Struct rayon::iter::TryFoldWith

source ·
pub struct TryFoldWith<I, U: Try, F> { /* private fields */ }
Expand description

TryFoldWith is an iterator that applies a function over an iterator producing a single value. +This struct is created by the try_fold_with() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone, U: Clone + Try, F: Clone> Clone for TryFoldWith<I, U, F>
where + U::Output: Clone,

source§

fn clone(&self) -> TryFoldWith<I, U, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, U: Try, F> Debug for TryFoldWith<I, U, F>
where + U::Output: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<U, I, F> ParallelIterator for TryFoldWith<I, U, F>
where + I: ParallelIterator, + F: Fn(U::Output, I::Item) -> U + Sync + Send, + U: Try + Send, + U::Output: Clone + Send,

§

type Item = U

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I, U, F> Freeze for TryFoldWith<I, U, F>
where + F: Freeze, + I: Freeze, + <U as Try>::Output: Freeze,

§

impl<I, U, F> RefUnwindSafe for TryFoldWith<I, U, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe, + <U as Try>::Output: RefUnwindSafe,

§

impl<I, U, F> Send for TryFoldWith<I, U, F>
where + F: Send, + I: Send, + <U as Try>::Output: Send,

§

impl<I, U, F> Sync for TryFoldWith<I, U, F>
where + F: Sync, + I: Sync, + <U as Try>::Output: Sync,

§

impl<I, U, F> Unpin for TryFoldWith<I, U, F>
where + F: Unpin, + I: Unpin, + <U as Try>::Output: Unpin,

§

impl<I, U, F> UnwindSafe for TryFoldWith<I, U, F>
where + F: UnwindSafe, + I: UnwindSafe, + <U as Try>::Output: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.UniformBlocks.html b/rayon/iter/struct.UniformBlocks.html new file mode 100644 index 0000000000..0e0c3a755a --- /dev/null +++ b/rayon/iter/struct.UniformBlocks.html @@ -0,0 +1,199 @@ +UniformBlocks in rayon::iter - Rust +

Struct rayon::iter::UniformBlocks

source ·
pub struct UniformBlocks<I> { /* private fields */ }
Expand description

UniformBlocks is a parallel iterator that consumes itself as a sequence +of parallel blocks of constant sizes.

+

This struct is created by the by_uniform_blocks() method on IndexedParallelIterator

+

Trait Implementations§

source§

impl<I: Clone> Clone for UniformBlocks<I>

source§

fn clone(&self) -> UniformBlocks<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug> Debug for UniformBlocks<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I> ParallelIterator for UniformBlocks<I>

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I> Freeze for UniformBlocks<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for UniformBlocks<I>
where + I: RefUnwindSafe,

§

impl<I> Send for UniformBlocks<I>
where + I: Send,

§

impl<I> Sync for UniformBlocks<I>
where + I: Sync,

§

impl<I> Unpin for UniformBlocks<I>
where + I: Unpin,

§

impl<I> UnwindSafe for UniformBlocks<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Update.html b/rayon/iter/struct.Update.html new file mode 100644 index 0000000000..ecc121fc6c --- /dev/null +++ b/rayon/iter/struct.Update.html @@ -0,0 +1,301 @@ +Update in rayon::iter - Rust +

Struct rayon::iter::Update

source ·
pub struct Update<I: ParallelIterator, F> { /* private fields */ }
Expand description

Update is an iterator that mutates the elements of an +underlying iterator before they are yielded.

+

This struct is created by the update() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator, F: Clone> Clone for Update<I, F>

source§

fn clone(&self) -> Update<I, F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: ParallelIterator + Debug, F> Debug for Update<I, F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, F> IndexedParallelIterator for Update<I, F>
where + I: IndexedParallelIterator, + F: Fn(&mut I::Item) + Send + Sync,

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<I, F> ParallelIterator for Update<I, F>
where + I: ParallelIterator, + F: Fn(&mut I::Item) + Send + Sync,

§

type Item = <I as ParallelIterator>::Item

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<I, F> Freeze for Update<I, F>
where + F: Freeze, + I: Freeze,

§

impl<I, F> RefUnwindSafe for Update<I, F>
where + F: RefUnwindSafe, + I: RefUnwindSafe,

§

impl<I, F> Send for Update<I, F>
where + F: Send,

§

impl<I, F> Sync for Update<I, F>
where + F: Sync, + I: Sync,

§

impl<I, F> Unpin for Update<I, F>
where + F: Unpin, + I: Unpin,

§

impl<I, F> UnwindSafe for Update<I, F>
where + F: UnwindSafe, + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.WalkTree.html b/rayon/iter/struct.WalkTree.html new file mode 100644 index 0000000000..b2ae696204 --- /dev/null +++ b/rayon/iter/struct.WalkTree.html @@ -0,0 +1,206 @@ +WalkTree in rayon::iter - Rust +

Struct rayon::iter::WalkTree

source ·
pub struct WalkTree<S, B>(/* private fields */);
Expand description

ParallelIterator for arbitrary tree-shaped patterns. +Returned by the walk_tree() function.

+

Trait Implementations§

source§

impl<S: Debug, B: Debug> Debug for WalkTree<S, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S, B, I> ParallelIterator for WalkTree<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S> + Send, + I::IntoIter: DoubleEndedIterator,

§

type Item = S

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<S, B> Freeze for WalkTree<S, B>
where + B: Freeze, + S: Freeze,

§

impl<S, B> RefUnwindSafe for WalkTree<S, B>
where + B: RefUnwindSafe, + S: RefUnwindSafe,

§

impl<S, B> Send for WalkTree<S, B>
where + B: Send, + S: Send,

§

impl<S, B> Sync for WalkTree<S, B>
where + B: Sync, + S: Sync,

§

impl<S, B> Unpin for WalkTree<S, B>
where + B: Unpin, + S: Unpin,

§

impl<S, B> UnwindSafe for WalkTree<S, B>
where + B: UnwindSafe, + S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.WalkTreePostfix.html b/rayon/iter/struct.WalkTreePostfix.html new file mode 100644 index 0000000000..efa82da110 --- /dev/null +++ b/rayon/iter/struct.WalkTreePostfix.html @@ -0,0 +1,205 @@ +WalkTreePostfix in rayon::iter - Rust +

Struct rayon::iter::WalkTreePostfix

source ·
pub struct WalkTreePostfix<S, B> { /* private fields */ }
Expand description

ParallelIterator for arbitrary tree-shaped patterns. +Returned by the walk_tree_postfix() function.

+

Trait Implementations§

source§

impl<S: Debug, B: Debug> Debug for WalkTreePostfix<S, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S, B, I> ParallelIterator for WalkTreePostfix<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S>,

§

type Item = S

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<S, B> Freeze for WalkTreePostfix<S, B>
where + B: Freeze, + S: Freeze,

§

impl<S, B> RefUnwindSafe for WalkTreePostfix<S, B>
where + B: RefUnwindSafe, + S: RefUnwindSafe,

§

impl<S, B> Send for WalkTreePostfix<S, B>
where + B: Send, + S: Send,

§

impl<S, B> Sync for WalkTreePostfix<S, B>
where + B: Sync, + S: Sync,

§

impl<S, B> Unpin for WalkTreePostfix<S, B>
where + B: Unpin, + S: Unpin,

§

impl<S, B> UnwindSafe for WalkTreePostfix<S, B>
where + B: UnwindSafe, + S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.WalkTreePrefix.html b/rayon/iter/struct.WalkTreePrefix.html new file mode 100644 index 0000000000..0b47d0eb8f --- /dev/null +++ b/rayon/iter/struct.WalkTreePrefix.html @@ -0,0 +1,206 @@ +WalkTreePrefix in rayon::iter - Rust +

Struct rayon::iter::WalkTreePrefix

source ·
pub struct WalkTreePrefix<S, B> { /* private fields */ }
Expand description

ParallelIterator for arbitrary tree-shaped patterns. +Returned by the walk_tree_prefix() function.

+

Trait Implementations§

source§

impl<S: Debug, B: Debug> Debug for WalkTreePrefix<S, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S, B, I> ParallelIterator for WalkTreePrefix<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S>, + I::IntoIter: DoubleEndedIterator,

§

type Item = S

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<S, B> Freeze for WalkTreePrefix<S, B>
where + B: Freeze, + S: Freeze,

§

impl<S, B> RefUnwindSafe for WalkTreePrefix<S, B>
where + B: RefUnwindSafe, + S: RefUnwindSafe,

§

impl<S, B> Send for WalkTreePrefix<S, B>
where + B: Send, + S: Send,

§

impl<S, B> Sync for WalkTreePrefix<S, B>
where + B: Sync, + S: Sync,

§

impl<S, B> Unpin for WalkTreePrefix<S, B>
where + B: Unpin, + S: Unpin,

§

impl<S, B> UnwindSafe for WalkTreePrefix<S, B>
where + B: UnwindSafe, + S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.WhileSome.html b/rayon/iter/struct.WhileSome.html new file mode 100644 index 0000000000..4ce8eea3d0 --- /dev/null +++ b/rayon/iter/struct.WhileSome.html @@ -0,0 +1,199 @@ +WhileSome in rayon::iter - Rust +

Struct rayon::iter::WhileSome

source ·
pub struct WhileSome<I: ParallelIterator> { /* private fields */ }
Expand description

WhileSome is an iterator that yields the Some elements of an iterator, +halting as soon as any None is produced.

+

This struct is created by the while_some() method on ParallelIterator

+

Trait Implementations§

source§

impl<I: Clone + ParallelIterator> Clone for WhileSome<I>

source§

fn clone(&self) -> WhileSome<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I: Debug + ParallelIterator> Debug for WhileSome<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I, T> ParallelIterator for WhileSome<I>
where + I: ParallelIterator<Item = Option<T>>, + T: Send,

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<I> Freeze for WhileSome<I>
where + I: Freeze,

§

impl<I> RefUnwindSafe for WhileSome<I>
where + I: RefUnwindSafe,

§

impl<I> Send for WhileSome<I>

§

impl<I> Sync for WhileSome<I>
where + I: Sync,

§

impl<I> Unpin for WhileSome<I>
where + I: Unpin,

§

impl<I> UnwindSafe for WhileSome<I>
where + I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.Zip.html b/rayon/iter/struct.Zip.html new file mode 100644 index 0000000000..5255b6abb3 --- /dev/null +++ b/rayon/iter/struct.Zip.html @@ -0,0 +1,300 @@ +Zip in rayon::iter - Rust +

Struct rayon::iter::Zip

source ·
pub struct Zip<A: IndexedParallelIterator, B: IndexedParallelIterator> { /* private fields */ }
Expand description

Zip is an iterator that zips up a and b into a single iterator +of pairs. This struct is created by the zip() method on +IndexedParallelIterator

+

Trait Implementations§

source§

impl<A: Clone + IndexedParallelIterator, B: Clone + IndexedParallelIterator> Clone for Zip<A, B>

source§

fn clone(&self) -> Zip<A, B>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<A: Debug + IndexedParallelIterator, B: Debug + IndexedParallelIterator> Debug for Zip<A, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<A, B> IndexedParallelIterator for Zip<A, B>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B> ParallelIterator for Zip<A, B>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<A, B> Freeze for Zip<A, B>
where + A: Freeze, + B: Freeze,

§

impl<A, B> RefUnwindSafe for Zip<A, B>
where + A: RefUnwindSafe, + B: RefUnwindSafe,

§

impl<A, B> Send for Zip<A, B>

§

impl<A, B> Sync for Zip<A, B>
where + A: Sync, + B: Sync,

§

impl<A, B> Unpin for Zip<A, B>
where + A: Unpin, + B: Unpin,

§

impl<A, B> UnwindSafe for Zip<A, B>
where + A: UnwindSafe, + B: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/struct.ZipEq.html b/rayon/iter/struct.ZipEq.html new file mode 100644 index 0000000000..89c2265b43 --- /dev/null +++ b/rayon/iter/struct.ZipEq.html @@ -0,0 +1,301 @@ +ZipEq in rayon::iter - Rust +

Struct rayon::iter::ZipEq

source ·
pub struct ZipEq<A: IndexedParallelIterator, B: IndexedParallelIterator> { /* private fields */ }
Expand description

An IndexedParallelIterator that iterates over two parallel iterators of equal +length simultaneously.

+

This struct is created by the zip_eq method on IndexedParallelIterator, +see its documentation for more information.

+

Trait Implementations§

source§

impl<A: Clone + IndexedParallelIterator, B: Clone + IndexedParallelIterator> Clone for ZipEq<A, B>

source§

fn clone(&self) -> ZipEq<A, B>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<A: Debug + IndexedParallelIterator, B: Debug + IndexedParallelIterator> Debug for ZipEq<A, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<A, B> IndexedParallelIterator for ZipEq<A, B>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<A, B> ParallelIterator for ZipEq<A, B>

§

type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<A, B> Freeze for ZipEq<A, B>
where + A: Freeze, + B: Freeze,

§

impl<A, B> RefUnwindSafe for ZipEq<A, B>
where + A: RefUnwindSafe, + B: RefUnwindSafe,

§

impl<A, B> Send for ZipEq<A, B>

§

impl<A, B> Sync for ZipEq<A, B>
where + A: Sync, + B: Sync,

§

impl<A, B> Unpin for ZipEq<A, B>
where + A: Unpin, + B: Unpin,

§

impl<A, B> UnwindSafe for ZipEq<A, B>
where + A: UnwindSafe, + B: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/iter/take/struct.Take.html b/rayon/iter/take/struct.Take.html new file mode 100644 index 0000000000..7bec7a19e4 --- /dev/null +++ b/rayon/iter/take/struct.Take.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Take.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/take_any/struct.TakeAny.html b/rayon/iter/take_any/struct.TakeAny.html new file mode 100644 index 0000000000..344b28540a --- /dev/null +++ b/rayon/iter/take_any/struct.TakeAny.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.TakeAny.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/take_any_while/struct.TakeAnyWhile.html b/rayon/iter/take_any_while/struct.TakeAnyWhile.html new file mode 100644 index 0000000000..bd375d5f0e --- /dev/null +++ b/rayon/iter/take_any_while/struct.TakeAnyWhile.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.TakeAnyWhile.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/trait.FromParallelIterator.html b/rayon/iter/trait.FromParallelIterator.html new file mode 100644 index 0000000000..c02e991e07 --- /dev/null +++ b/rayon/iter/trait.FromParallelIterator.html @@ -0,0 +1,153 @@ +FromParallelIterator in rayon::iter - Rust +
pub trait FromParallelIterator<T>
where + T: Send,
{ + // Required method + fn from_par_iter<I>(par_iter: I) -> Self + where I: IntoParallelIterator<Item = T>; +}
Expand description

FromParallelIterator implements the creation of a collection +from a ParallelIterator. By implementing +FromParallelIterator for a given type, you define how it will be +created from an iterator.

+

FromParallelIterator is used through ParallelIterator’s collect() method.

+

§Examples

+

Implementing FromParallelIterator for your type:

+ +
use rayon::prelude::*;
+use std::mem;
+
+struct BlackHole {
+    mass: usize,
+}
+
+impl<T: Send> FromParallelIterator<T> for BlackHole {
+    fn from_par_iter<I>(par_iter: I) -> Self
+        where I: IntoParallelIterator<Item = T>
+    {
+        let par_iter = par_iter.into_par_iter();
+        BlackHole {
+            mass: par_iter.count() * mem::size_of::<T>(),
+        }
+    }
+}
+
+let bh: BlackHole = (0i32..1000).into_par_iter().collect();
+assert_eq!(bh.mass, 4000);
+

Required Methods§

source

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

Creates an instance of the collection from the parallel iterator par_iter.

+

If your collection is not naturally parallel, the easiest (and +fastest) way to do this is often to collect par_iter into a +LinkedList (via collect_vec_list) or another intermediate +data structure and then sequentially extend your collection. However, +a more ‘native’ technique is to use the par_iter.fold or +par_iter.fold_with methods to create the collection. +Alternatively, if your collection is ‘natively’ parallel, you +can use par_iter.for_each to process each element in turn.

+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromParallelIterator<char> for String

Collects characters from a parallel iterator into a string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = char>,

source§

impl FromParallelIterator<()> for ()

Collapses all unit items from a parallel iterator into one.

+

This is more useful when combined with higher-level abstractions, like +collecting to a Result<(), E> where you only care about errors:

+ +
use std::io::*;
+use rayon::prelude::*;
+
+let data = vec![1, 2, 3, 4, 5];
+let res: Result<()> = data.par_iter()
+    .map(|x| writeln!(stdout(), "{}", x))
+    .collect();
+assert!(res.is_ok());
+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = ()>,

source§

impl FromParallelIterator<Box<str>> for String

Collects boxed strings from a parallel iterator into one large string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = Box<str>>,

source§

impl FromParallelIterator<String> for String

Collects strings from a parallel iterator into one large string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = String>,

source§

impl FromParallelIterator<OsString> for OsString

Collects OS-strings from a parallel iterator into one large OS-string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = OsString>,

source§

impl<'a> FromParallelIterator<&'a char> for String

Collects characters from a parallel iterator into a string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = &'a char>,

source§

impl<'a> FromParallelIterator<&'a str> for String

Collects string slices from a parallel iterator into a string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = &'a str>,

source§

impl<'a> FromParallelIterator<&'a OsStr> for OsString

Collects OS-string slices from a parallel iterator into an OS-string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = &'a OsStr>,

source§

impl<'a> FromParallelIterator<Cow<'a, str>> for String

Collects string slices from a parallel iterator into a string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = Cow<'a, str>>,

source§

impl<'a> FromParallelIterator<Cow<'a, OsStr>> for OsString

Collects OS-string slices from a parallel iterator into an OS-string.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = Cow<'a, OsStr>>,

source§

impl<'a, C, T> FromParallelIterator<T> for Cow<'a, C>
where + C: ToOwned + ?Sized, + C::Owned: FromParallelIterator<T>, + T: Send,

Collects an arbitrary Cow collection.

+

Note, the standard library only has FromIterator for Cow<'a, str> and +Cow<'a, [T]>, because no one thought to add a blanket implementation +before it was stabilized.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<A, B, FromA, FromB> FromParallelIterator<(A, B)> for (FromA, FromB)
where + A: Send, + B: Send, + FromA: Send + FromParallelIterator<A>, + FromB: Send + FromParallelIterator<B>,

source§

fn from_par_iter<I>(pi: I) -> Self
where + I: IntoParallelIterator<Item = (A, B)>,

source§

impl<C, T> FromParallelIterator<Option<T>> for Option<C>
where + C: FromParallelIterator<T>, + T: Send,

Collect an arbitrary Option-wrapped collection.

+

If any item is None, then all previous items collected are discarded, +and it returns only None.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = Option<T>>,

source§

impl<C, T, E> FromParallelIterator<Result<T, E>> for Result<C, E>
where + C: FromParallelIterator<T>, + T: Send, + E: Send,

Collect an arbitrary Result-wrapped collection.

+

If any item is Err, then all previous Ok items collected are +discarded, and it returns that error. If there are multiple errors, the +one returned is not deterministic.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = Result<T, E>>,

source§

impl<K, V> FromParallelIterator<(K, V)> for BTreeMap<K, V>
where + K: Ord + Send, + V: Send,

Collects (key, value) pairs from a parallel iterator into a +btreemap. If multiple pairs correspond to the same key, then the +ones produced earlier in the parallel iterator will be +overwritten, just as with a sequential iterator.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = (K, V)>,

source§

impl<K, V, S> FromParallelIterator<(K, V)> for HashMap<K, V, S>
where + K: Eq + Hash + Send, + V: Send, + S: BuildHasher + Default + Send,

Collects (key, value) pairs from a parallel iterator into a +hashmap. If multiple pairs correspond to the same key, then the +ones produced earlier in the parallel iterator will be +overwritten, just as with a sequential iterator.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = (K, V)>,

source§

impl<L, R, A, B> FromParallelIterator<Either<L, R>> for (A, B)
where + L: Send, + R: Send, + A: Send + FromParallelIterator<L>, + B: Send + FromParallelIterator<R>,

source§

fn from_par_iter<I>(pi: I) -> Self
where + I: IntoParallelIterator<Item = Either<L, R>>,

source§

impl<T> FromParallelIterator<T> for Box<[T]>
where + T: Send,

Collects items from a parallel iterator into a boxed slice.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> FromParallelIterator<T> for BinaryHeap<T>
where + T: Ord + Send,

Collects items from a parallel iterator into a binaryheap. +The heap-ordering is calculated serially after all items are collected.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> FromParallelIterator<T> for LinkedList<T>
where + T: Send,

Collects items from a parallel iterator into a freshly allocated +linked list.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> FromParallelIterator<T> for VecDeque<T>
where + T: Send,

Collects items from a parallel iterator into a vecdeque.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> FromParallelIterator<T> for Rc<[T]>
where + T: Send,

Collects items from a parallel iterator into a reference-counted slice.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> FromParallelIterator<T> for Arc<[T]>
where + T: Send,

Collects items from a parallel iterator into an atomically-reference-counted slice.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> FromParallelIterator<T> for Vec<T>
where + T: Send,

Collects items from a parallel iterator into a vector.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = T>,

source§

impl<V> FromParallelIterator<V> for BTreeSet<V>
where + V: Send + Ord,

Collects values from a parallel iterator into a btreeset.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = V>,

source§

impl<V, S> FromParallelIterator<V> for HashSet<V, S>
where + V: Eq + Hash + Send, + S: BuildHasher + Default + Send,

Collects values from a parallel iterator into a hashset.

+
source§

fn from_par_iter<I>(par_iter: I) -> Self
where + I: IntoParallelIterator<Item = V>,

Implementors§

\ No newline at end of file diff --git a/rayon/iter/trait.IndexedParallelIterator.html b/rayon/iter/trait.IndexedParallelIterator.html new file mode 100644 index 0000000000..adbddfc812 --- /dev/null +++ b/rayon/iter/trait.IndexedParallelIterator.html @@ -0,0 +1,669 @@ +IndexedParallelIterator in rayon::iter - Rust +
pub trait IndexedParallelIterator: ParallelIterator {
+
Show 33 methods // Required methods + fn len(&self) -> usize; + fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result; + fn with_producer<CB: ProducerCallback<Self::Item>>( + self, + callback: CB + ) -> CB::Output; + + // Provided methods + fn by_exponential_blocks(self) -> ExponentialBlocks<Self> { ... } + fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self> { ... } + fn collect_into_vec(self, target: &mut Vec<Self::Item>) { ... } + fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>) + where Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send { ... } + fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter> + where Z: IntoParallelIterator, + Z::Iter: IndexedParallelIterator { ... } + fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter> + where Z: IntoParallelIterator, + Z::Iter: IndexedParallelIterator { ... } + fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter> + where I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item> { ... } + fn interleave_shortest<I>( + self, + other: I + ) -> InterleaveShortest<Self, I::Iter> + where I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item> { ... } + fn chunks(self, chunk_size: usize) -> Chunks<Self> { ... } + fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F + ) -> FoldChunks<Self, ID, F> + where ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send { ... } + fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F + ) -> FoldChunksWith<Self, T, F> + where T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync { ... } + fn cmp<I>(self, other: I) -> Ordering + where I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator, + Self::Item: Ord { ... } + fn partial_cmp<I>(self, other: I) -> Option<Ordering> + where I: IntoParallelIterator, + I::Iter: IndexedParallelIterator, + Self::Item: PartialOrd<I::Item> { ... } + fn eq<I>(self, other: I) -> bool + where I: IntoParallelIterator, + I::Iter: IndexedParallelIterator, + Self::Item: PartialEq<I::Item> { ... } + fn ne<I>(self, other: I) -> bool + where I: IntoParallelIterator, + I::Iter: IndexedParallelIterator, + Self::Item: PartialEq<I::Item> { ... } + fn lt<I>(self, other: I) -> bool + where I: IntoParallelIterator, + I::Iter: IndexedParallelIterator, + Self::Item: PartialOrd<I::Item> { ... } + fn le<I>(self, other: I) -> bool + where I: IntoParallelIterator, + I::Iter: IndexedParallelIterator, + Self::Item: PartialOrd<I::Item> { ... } + fn gt<I>(self, other: I) -> bool + where I: IntoParallelIterator, + I::Iter: IndexedParallelIterator, + Self::Item: PartialOrd<I::Item> { ... } + fn ge<I>(self, other: I) -> bool + where I: IntoParallelIterator, + I::Iter: IndexedParallelIterator, + Self::Item: PartialOrd<I::Item> { ... } + fn enumerate(self) -> Enumerate<Self> { ... } + fn step_by(self, step: usize) -> StepBy<Self> { ... } + fn skip(self, n: usize) -> Skip<Self> { ... } + fn take(self, n: usize) -> Take<Self> { ... } + fn position_any<P>(self, predicate: P) -> Option<usize> + where P: Fn(Self::Item) -> bool + Sync + Send { ... } + fn position_first<P>(self, predicate: P) -> Option<usize> + where P: Fn(Self::Item) -> bool + Sync + Send { ... } + fn position_last<P>(self, predicate: P) -> Option<usize> + where P: Fn(Self::Item) -> bool + Sync + Send { ... } + fn positions<P>(self, predicate: P) -> Positions<Self, P> + where P: Fn(Self::Item) -> bool + Sync + Send { ... } + fn rev(self) -> Rev<Self> { ... } + fn with_min_len(self, min: usize) -> MinLen<Self> { ... } + fn with_max_len(self, max: usize) -> MaxLen<Self> { ... } +
}
Expand description

An iterator that supports “random access” to its data, meaning +that you can split it at arbitrary indices and draw data from +those points.

+

Note: Not implemented for u64, i64, u128, or i128 ranges

+

Required Methods§

source

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs.

+
§Examples
+
use rayon::prelude::*;
+
+let par_iter = (0..100).into_par_iter().zip(vec![0; 10]);
+assert_eq!(par_iter.len(), 10);
+
+let vec: Vec<_> = par_iter.collect();
+assert_eq!(vec.len(), 10);
+
source

fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly.

+

This method causes the iterator self to start producing +items and to feed them to the consumer consumer one by one. +It may split the consumer before doing so to create the +opportunity to produce in parallel. If a split does happen, it +will inform the consumer of the index where the split should +occur (unlike ParallelIterator::drive_unindexed()).

+

See the README for more details on the internals of parallel +iterators.

+
source

fn with_producer<CB: ProducerCallback<Self::Item>>( + self, + callback: CB +) -> CB::Output

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly.

+

This method converts the iterator into a producer P and then +invokes callback.callback() with P. Note that the type of +this producer is not defined as part of the API, since +callback must be defined generically for all producers. This +allows the producer type to contain references; it also means +that parallel iterators can adjust that type without causing a +breaking change.

+

See the README for more details on the internals of parallel +iterators.

+

Provided Methods§

source

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size.

+

Normally, parallel iterators are recursively divided into tasks in parallel. +This adaptor changes the default behavior by splitting the iterator into a sequence +of parallel iterators of increasing sizes. +Sizes grow exponentially in order to avoid creating +too many blocks. This also allows to balance the current block with all previous ones.

+

This can have many applications but the most notable ones are:

+
    +
  • better performance with find_first()
  • +
  • more predictable performance with find_any() +or any interruptible computation
  • +
+
§Examples
+
use rayon::prelude::*;
+assert_eq!((0..10_000).into_par_iter()
+                      .by_exponential_blocks()
+                      .find_first(|&e| e==4_999), Some(4_999))
+

In this example, without blocks, rayon will split the initial range into two but all work +on the right hand side (from 5,000 onwards) is useless since the sequential algorithm +never goes there. This means that if two threads are used there will be no speedup at +all.

+

by_exponential_blocks on the other hand will start with the leftmost range from 0 +to p (threads number), continue with p to 3p, the 3p to 7p…

+

Each subrange is treated in parallel, while all subranges are treated sequentially. +We therefore ensure a logarithmic number of blocks (and overhead) while guaranteeing +we stop at the first block containing the searched data.

+
source

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size.

+

Normally, parallel iterators are recursively divided into tasks in parallel. +This adaptor changes the default behavior by splitting the iterator into a sequence +of parallel iterators of given block_size. +The main application is to obtain better +memory locality (especially if the reduce operation re-use folded data).

+

Panics if block_size is 0.

+
§Example
+
use rayon::prelude::*;
+// during most reductions v1 and v2 fit the cache
+let v = (0u32..10_000_000)
+    .into_par_iter()
+    .by_uniform_blocks(1_000_000)
+    .fold(Vec::new, |mut v, e| { v.push(e); v})
+    .reduce(Vec::new, |mut v1, mut v2| { v1.append(&mut v2); v1});
+assert_eq!(v, (0u32..10_000_000).collect::<Vec<u32>>());
+
source

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer.

+
§Examples
+
use rayon::prelude::*;
+
+// any prior data will be cleared
+let mut vec = vec![-1, -2, -3];
+
+(0..5).into_par_iter()
+    .collect_into_vec(&mut vec);
+
+assert_eq!(vec, [0, 1, 2, 3, 4]);
+
source

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer.

+
§Examples
+
use rayon::prelude::*;
+
+// any prior data will be cleared
+let mut left = vec![42; 10];
+let mut right = vec![-1; 10];
+
+(10..15).into_par_iter()
+    .enumerate()
+    .unzip_into_vecs(&mut left, &mut right);
+
+assert_eq!(left, [0, 1, 2, 3, 4]);
+assert_eq!(right, [10, 11, 12, 13, 14]);
+
source

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (1..4)
+    .into_par_iter()
+    .zip(vec!['a', 'b', 'c'])
+    .collect();
+
+assert_eq!(result, [(1, 'a'), (2, 'b'), (3, 'c')]);
+
source

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length.

+
§Panics
+

Will panic if self and zip_op are not the same length.

+ +
use rayon::prelude::*;
+
+let one = [1u8];
+let two = [2u8, 2];
+let one_iter = one.par_iter();
+let two_iter = two.par_iter();
+
+// this will panic
+let zipped: Vec<(&u8, &u8)> = one_iter.zip_eq(two_iter).collect();
+
+// we should never get here
+assert_eq!(1, zipped.len());
+
source

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other.

+
§Examples
+
use rayon::prelude::*;
+let (x, y) = (vec![1, 2], vec![3, 4, 5, 6]);
+let r: Vec<i32> = x.into_par_iter().interleave(y).collect();
+assert_eq!(r, vec![1, 3, 2, 4, 5, 6]);
+
source

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted.

+
§Examples
+
use rayon::prelude::*;
+let (x, y) = (vec![1, 2, 3, 4], vec![5, 6]);
+let r: Vec<i32> = x.into_par_iter().interleave_shortest(y).collect();
+assert_eq!(r, vec![1, 5, 2, 6, 3]);
+
source

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks.

+

Returns an iterator that returns Vecs of the given number of elements. +If the number of elements in the iterator is not divisible by chunk_size, +the last chunk may be shorter than chunk_size.

+

See also par_chunks() and par_chunks_mut() for similar behavior on +slices, without having to allocate intermediate Vecs for the chunks.

+

Panics if chunk_size is 0.

+
§Examples
+
use rayon::prelude::*;
+let a = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+let r: Vec<Vec<i32>> = a.into_par_iter().chunks(3).collect();
+assert_eq!(r, vec![vec![1,2,3], vec![4,5,6], vec![7,8,9], vec![10]]);
+
source

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk.

+

Returns an iterator that produces a folded result for each chunk of items +produced by this iterator.

+

This works essentially like:

+
iter.chunks(chunk_size)
+    .map(|chunk|
+        chunk.into_iter()
+            .fold(identity, fold_op)
+    )
+
+

except there is no per-chunk allocation overhead.

+

Panics if chunk_size is 0.

+
§Examples
+
use rayon::prelude::*;
+let nums = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+let chunk_sums = nums.into_par_iter().fold_chunks(2, || 0, |a, n| a + n).collect::<Vec<_>>();
+assert_eq!(chunk_sums, vec![3, 7, 11, 15, 19]);
+
source

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk.

+

Returns an iterator that produces a folded result for each chunk of items +produced by this iterator.

+

This works essentially like fold_chunks(chunk_size, || init.clone(), fold_op), +except it doesn’t require the init type to be Sync, nor any other form of +added synchronization.

+

Panics if chunk_size is 0.

+
§Examples
+
use rayon::prelude::*;
+let nums = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+let chunk_sums = nums.into_par_iter().fold_chunks_with(2, 0, |a, n| a + n).collect::<Vec<_>>();
+assert_eq!(chunk_sums, vec![3, 7, 11, 15, 19]);
+
source

fn cmp<I>(self, other: I) -> Ordering
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator, + Self::Item: Ord,

Lexicographically compares the elements of this ParallelIterator with those of +another.

+
§Examples
+
use rayon::prelude::*;
+use std::cmp::Ordering::*;
+
+let x = vec![1, 2, 3];
+assert_eq!(x.par_iter().cmp(&vec![1, 3, 0]), Less);
+assert_eq!(x.par_iter().cmp(&vec![1, 2, 3]), Equal);
+assert_eq!(x.par_iter().cmp(&vec![1, 2]), Greater);
+
source

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another.

+
§Examples
+
use rayon::prelude::*;
+use std::cmp::Ordering::*;
+use std::f64::NAN;
+
+let x = vec![1.0, 2.0, 3.0];
+assert_eq!(x.par_iter().partial_cmp(&vec![1.0, 3.0, 0.0]), Some(Less));
+assert_eq!(x.par_iter().partial_cmp(&vec![1.0, 2.0, 3.0]), Some(Equal));
+assert_eq!(x.par_iter().partial_cmp(&vec![1.0, 2.0]), Some(Greater));
+assert_eq!(x.par_iter().partial_cmp(&vec![1.0, NAN]), None);
+
source

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another

+
source

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another

+
source

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.

+
source

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.

+
source

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.

+
source

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.

+
source

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item.

+
§Examples
+
use rayon::prelude::*;
+
+let chars = vec!['a', 'b', 'c'];
+let result: Vec<_> = chars
+    .into_par_iter()
+    .enumerate()
+    .collect();
+
+assert_eq!(result, [(0, 'a'), (1, 'b'), (2, 'c')]);
+
source

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount

+
§Examples
+
use rayon::prelude::*;
+
+let range = (3..10);
+let result: Vec<i32> = range
+   .into_par_iter()
+   .step_by(3)
+   .collect();
+
+assert_eq!(result, [3, 6, 9])
+
source

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (0..100)
+    .into_par_iter()
+    .skip(95)
+    .collect();
+
+assert_eq!(result, [95, 96, 97, 98, 99]);
+
source

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (0..100)
+    .into_par_iter()
+    .take(5)
+    .collect();
+
+assert_eq!(result, [0, 1, 2, 3, 4]);
+
source

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3, 3];
+
+let i = a.par_iter().position_any(|&x| x == 3).expect("found");
+assert!(i == 2 || i == 3);
+
+assert_eq!(a.par_iter().position_any(|&x| x == 100), None);
+
source

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index.

+

Like ParallelIterator::find_first, once a match is found, +all attempts to the right of the match will be stopped, while +attempts to the left must continue in case an earlier match +is found.

+

Note that not all parallel iterators have a useful order, much like +sequential HashMap iteration, so “first” may be nebulous. If you +just want the first match that discovered anywhere in the iterator, +position_any is a better choice.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3, 3];
+
+assert_eq!(a.par_iter().position_first(|&x| x == 3), Some(2));
+
+assert_eq!(a.par_iter().position_first(|&x| x == 100), None);
+
source

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index.

+

Like ParallelIterator::find_last, once a match is found, +all attempts to the left of the match will be stopped, while +attempts to the right must continue in case a later match +is found.

+

Note that not all parallel iterators have a useful order, much like +sequential HashMap iteration, so “last” may be nebulous. When the +order doesn’t actually matter to you, position_any is a better +choice.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3, 3];
+
+assert_eq!(a.par_iter().position_last(|&x| x == 3), Some(3));
+
+assert_eq!(a.par_iter().position_last(|&x| x == 100), None);
+
source

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices.

+
§Examples
+
use rayon::prelude::*;
+
+let primes = vec![2, 3, 5, 7, 11, 13, 17, 19, 23, 29];
+
+// Find the positions of primes congruent to 1 modulo 6
+let p1mod6: Vec<_> = primes.par_iter().positions(|&p| p % 6 == 1).collect();
+assert_eq!(p1mod6, [3, 5, 7]); // primes 7, 13, and 19
+
+// Find the positions of primes congruent to 5 modulo 6
+let p5mod6: Vec<_> = primes.par_iter().positions(|&p| p % 6 == 5).collect();
+assert_eq!(p5mod6, [2, 4, 6, 8, 9]); // primes 5, 11, 17, 23, and 29
+
source

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (0..5)
+    .into_par_iter()
+    .rev()
+    .collect();
+
+assert_eq!(result, [4, 3, 2, 1, 0]);
+
source

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with.

+

Producers like zip and interleave will use greater of the two +minimums. +Chained iterators and iterators inside flat_map may each use +their own minimum length.

+
§Examples
+
use rayon::prelude::*;
+
+let min = (0..1_000_000)
+    .into_par_iter()
+    .with_min_len(1234)
+    .fold(|| 0, |acc, _| acc + 1) // count how many are in this segment
+    .min().unwrap();
+
+assert!(min >= 1234);
+
source

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further.

+

Producers like zip and interleave will use lesser of the two +maximums. +Chained iterators and iterators inside flat_map may each use +their own maximum length.

+
§Examples
+
use rayon::prelude::*;
+
+let max = (0..1_000_000)
+    .into_par_iter()
+    .with_max_len(1234)
+    .fold(|| 0, |acc, _| acc + 1) // count how many are in this segment
+    .max().unwrap();
+
+assert!(max <= 1234);
+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl IndexedParallelIterator for rayon::range::Iter<char>

source§

impl IndexedParallelIterator for rayon::range_inclusive::Iter<char>

source§

impl<'a, T, I> IndexedParallelIterator for Cloned<I>
where + I: IndexedParallelIterator<Item = &'a T>, + T: 'a + Clone + Send + Sync,

source§

impl<'a, T, I> IndexedParallelIterator for Copied<I>
where + I: IndexedParallelIterator<Item = &'a T>, + T: 'a + Copy + Send + Sync,

source§

impl<'a, T: Ord + Send> IndexedParallelIterator for rayon::collections::binary_heap::Drain<'a, T>

source§

impl<'a, T: Ord + Sync + 'a> IndexedParallelIterator for rayon::collections::binary_heap::Iter<'a, T>

source§

impl<'a, T: Send + 'a> IndexedParallelIterator for rayon::collections::vec_deque::IterMut<'a, T>

source§

impl<'a, T: Send + 'a> IndexedParallelIterator for rayon::option::IterMut<'a, T>

source§

impl<'a, T: Send + 'a> IndexedParallelIterator for rayon::result::IterMut<'a, T>

source§

impl<'a, T: Send> IndexedParallelIterator for rayon::collections::vec_deque::Drain<'a, T>

source§

impl<'a, T: Sync + 'a> IndexedParallelIterator for rayon::collections::vec_deque::Iter<'a, T>

source§

impl<'a, T: Sync + 'a> IndexedParallelIterator for rayon::option::Iter<'a, T>

source§

impl<'a, T: Sync + 'a> IndexedParallelIterator for rayon::result::Iter<'a, T>

source§

impl<'data, T: Send + 'data> IndexedParallelIterator for ChunksExactMut<'data, T>

source§

impl<'data, T: Send + 'data> IndexedParallelIterator for ChunksMut<'data, T>

source§

impl<'data, T: Send + 'data> IndexedParallelIterator for rayon::slice::IterMut<'data, T>

source§

impl<'data, T: Send + 'data> IndexedParallelIterator for RChunksExactMut<'data, T>

source§

impl<'data, T: Send + 'data> IndexedParallelIterator for RChunksMut<'data, T>

source§

impl<'data, T: Send> IndexedParallelIterator for rayon::vec::Drain<'data, T>

source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for rayon::slice::Chunks<'data, T>

source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for ChunksExact<'data, T>

source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for rayon::slice::Iter<'data, T>

source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for RChunks<'data, T>

source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for RChunksExact<'data, T>

source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for Windows<'data, T>

source§

impl<A> IndexedParallelIterator for MultiZip<(A,)>

source§

impl<A, B> IndexedParallelIterator for Chain<A, B>

source§

impl<A, B> IndexedParallelIterator for MultiZip<(A, B)>

source§

impl<A, B> IndexedParallelIterator for Zip<A, B>

source§

impl<A, B> IndexedParallelIterator for ZipEq<A, B>

source§

impl<A, B, C> IndexedParallelIterator for MultiZip<(A, B, C)>

source§

impl<A, B, C, D> IndexedParallelIterator for MultiZip<(A, B, C, D)>

source§

impl<A, B, C, D, E> IndexedParallelIterator for MultiZip<(A, B, C, D, E)>

source§

impl<A, B, C, D, E, F> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F)>

source§

impl<A, B, C, D, E, F, G> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G)>

source§

impl<A, B, C, D, E, F, G, H> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>

source§

impl<A, B, C, D, E, F, G, H, I> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>

source§

impl<A, B, C, D, E, F, G, H, I, J> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>

source§

impl<A, B, C, D, E, F, G, H, I, J, K> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>

source§

impl<I> IndexedParallelIterator for rayon::iter::Chunks<I>

source§

impl<I> IndexedParallelIterator for Enumerate<I>

source§

impl<I> IndexedParallelIterator for Intersperse<I>
where + I: IndexedParallelIterator, + I::Item: Clone + Send,

source§

impl<I> IndexedParallelIterator for MaxLen<I>

source§

impl<I> IndexedParallelIterator for MinLen<I>

source§

impl<I> IndexedParallelIterator for PanicFuse<I>

source§

impl<I> IndexedParallelIterator for Rev<I>

source§

impl<I> IndexedParallelIterator for Skip<I>

source§

impl<I> IndexedParallelIterator for StepBy<I>

source§

impl<I> IndexedParallelIterator for Take<I>

source§

impl<I, F> IndexedParallelIterator for Inspect<I, F>
where + I: IndexedParallelIterator, + F: Fn(&I::Item) + Sync + Send,

source§

impl<I, F> IndexedParallelIterator for Update<I, F>
where + I: IndexedParallelIterator, + F: Fn(&mut I::Item) + Send + Sync,

source§

impl<I, F, R> IndexedParallelIterator for Map<I, F>
where + I: IndexedParallelIterator, + F: Fn(I::Item) -> R + Sync + Send, + R: Send,

source§

impl<I, ID, U, F> IndexedParallelIterator for FoldChunks<I, ID, F>
where + I: IndexedParallelIterator, + ID: Fn() -> U + Send + Sync, + F: Fn(U, I::Item) -> U + Send + Sync, + U: Send,

source§

impl<I, INIT, T, F, R> IndexedParallelIterator for MapInit<I, INIT, F>
where + I: IndexedParallelIterator, + INIT: Fn() -> T + Sync + Send, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

source§

impl<I, J> IndexedParallelIterator for Interleave<I, J>

source§

impl<I, J> IndexedParallelIterator for InterleaveShortest<I, J>

source§

impl<I, T, F, R> IndexedParallelIterator for MapWith<I, T, F>
where + I: IndexedParallelIterator, + T: Send + Clone, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

source§

impl<I, U, F> IndexedParallelIterator for FoldChunksWith<I, U, F>
where + I: IndexedParallelIterator, + U: Send + Clone, + F: Fn(U, I::Item) -> U + Send + Sync,

source§

impl<L, R> IndexedParallelIterator for Either<L, R>

source§

impl<T> IndexedParallelIterator for RepeatN<T>
where + T: Clone + Send,

source§

impl<T: Ord + Send> IndexedParallelIterator for rayon::collections::binary_heap::IntoIter<T>

source§

impl<T: Send> IndexedParallelIterator for rayon::collections::vec_deque::IntoIter<T>

source§

impl<T: Send> IndexedParallelIterator for rayon::option::IntoIter<T>

source§

impl<T: Send> IndexedParallelIterator for rayon::result::IntoIter<T>

source§

impl<T: Send> IndexedParallelIterator for rayon::vec::IntoIter<T>

source§

impl<T: Send> IndexedParallelIterator for Empty<T>

source§

impl<T: Send> IndexedParallelIterator for Once<T>

source§

impl<T: Send, const N: usize> IndexedParallelIterator for rayon::array::IntoIter<T, N>

source§

impl<T: IndexedRangeInteger> IndexedParallelIterator for rayon::range::Iter<T>

source§

impl<T: IndexedRangeInteger> IndexedParallelIterator for rayon::range_inclusive::Iter<T>

\ No newline at end of file diff --git a/rayon/iter/trait.IntoParallelIterator.html b/rayon/iter/trait.IntoParallelIterator.html new file mode 100644 index 0000000000..016cf99b6e --- /dev/null +++ b/rayon/iter/trait.IntoParallelIterator.html @@ -0,0 +1,499 @@ +IntoParallelIterator in rayon::iter - Rust +
pub trait IntoParallelIterator {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item: Send;
+
+    // Required method
+    fn into_par_iter(self) -> Self::Iter;
+}
Expand description

IntoParallelIterator implements the conversion to a ParallelIterator.

+

By implementing IntoParallelIterator for a type, you define how it will +transformed into an iterator. This is a parallel version of the standard +library’s std::iter::IntoIterator trait.

+

Required Associated Types§

source

type Iter: ParallelIterator<Item = Self::Item>

The parallel iterator type that will be created.

+
source

type Item: Send

The type of item that the parallel iterator will produce.

+

Required Methods§

source

fn into_par_iter(self) -> Self::Iter

Converts self into a parallel iterator.

+
§Examples
+
use rayon::prelude::*;
+
+println!("counting in parallel:");
+(0..100).into_par_iter()
+    .for_each(|i| println!("{}", i));
+

This conversion is often implicit for arguments to methods like zip.

+ +
use rayon::prelude::*;
+
+let v: Vec<_> = (0..5).into_par_iter().zip(5..10).collect();
+assert_eq!(v, [(0, 5), (1, 6), (2, 7), (3, 8), (4, 9)]);
+

Implementations on Foreign Types§

source§

impl<'a, A> IntoParallelIterator for &'a (A,)

§

type Item = (<A as IntoParallelRefIterator<'a>>::Item,)

§

type Iter = MultiZip<(<A as IntoParallelRefIterator<'a>>::Iter,)>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, A> IntoParallelIterator for &'a mut (A,)

source§

impl<'a, A, B> IntoParallelIterator for &'a (A, B)

source§

impl<'a, A, B> IntoParallelIterator for &'a mut (A, B)

source§

impl<'a, A, B, C> IntoParallelIterator for &'a (A, B, C)

source§

impl<'a, A, B, C> IntoParallelIterator for &'a mut (A, B, C)

source§

impl<'a, A, B, C, D> IntoParallelIterator for &'a (A, B, C, D)

source§

impl<'a, A, B, C, D> IntoParallelIterator for &'a mut (A, B, C, D)

source§

impl<'a, A, B, C, D, E> IntoParallelIterator for &'a (A, B, C, D, E)

source§

impl<'a, A, B, C, D, E> IntoParallelIterator for &'a mut (A, B, C, D, E)

source§

impl<'a, A, B, C, D, E, F> IntoParallelIterator for &'a (A, B, C, D, E, F)

source§

impl<'a, A, B, C, D, E, F> IntoParallelIterator for &'a mut (A, B, C, D, E, F)

source§

impl<'a, A, B, C, D, E, F, G> IntoParallelIterator for &'a (A, B, C, D, E, F, G)

source§

impl<'a, A, B, C, D, E, F, G> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G)

source§

impl<'a, A, B, C, D, E, F, G, H> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H)

source§

impl<'a, A, B, C, D, E, F, G, H> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H)

source§

impl<'a, A, B, C, D, E, F, G, H, I> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I)

source§

impl<'a, A, B, C, D, E, F, G, H, I> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I)

source§

impl<'a, A, B, C, D, E, F, G, H, I, J> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I, J)

source§

impl<'a, A, B, C, D, E, F, G, H, I, J> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I, J)

source§

impl<'a, A, B, C, D, E, F, G, H, I, J, K> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I, J, K)

source§

impl<'a, A, B, C, D, E, F, G, H, I, J, K> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I, J, K)

source§

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> IntoParallelIterator for &'a (A, B, C, D, E, F, G, H, I, J, K, L)

source§

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> IntoParallelIterator for &'a mut (A, B, C, D, E, F, G, H, I, J, K, L)

source§

impl<'a, K: Ord + Sync, V: Send> IntoParallelIterator for &'a mut BTreeMap<K, V>

§

type Item = <&'a mut BTreeMap<K, V> as IntoIterator>::Item

§

type Iter = IterMut<'a, K, V>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, K: Ord + Sync, V: Sync> IntoParallelIterator for &'a BTreeMap<K, V>

§

type Item = <&'a BTreeMap<K, V> as IntoIterator>::Item

§

type Iter = Iter<'a, K, V>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, K: Hash + Eq + Sync, V: Send, S: BuildHasher> IntoParallelIterator for &'a mut HashMap<K, V, S>

§

type Item = <&'a mut HashMap<K, V, S> as IntoIterator>::Item

§

type Iter = IterMut<'a, K, V>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, K: Hash + Eq + Sync, V: Sync, S: BuildHasher> IntoParallelIterator for &'a HashMap<K, V, S>

§

type Item = <&'a HashMap<K, V, S> as IntoIterator>::Item

§

type Iter = Iter<'a, K, V>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Ord + Sync> IntoParallelIterator for &'a BinaryHeap<T>

§

type Item = <&'a BinaryHeap<T> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Ord + Sync> IntoParallelIterator for &'a BTreeSet<T>

§

type Item = <&'a BTreeSet<T> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Hash + Eq + Sync, S: BuildHasher> IntoParallelIterator for &'a HashSet<T, S>

§

type Item = <&'a HashSet<T, S> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Send> IntoParallelIterator for &'a mut Option<T>

§

type Item = &'a mut T

§

type Iter = IterMut<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Send> IntoParallelIterator for &'a mut LinkedList<T>

§

type Item = <&'a mut LinkedList<T> as IntoIterator>::Item

§

type Iter = IterMut<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Send> IntoParallelIterator for &'a mut VecDeque<T>

§

type Item = &'a mut T

§

type Iter = IterMut<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Send, E> IntoParallelIterator for &'a mut Result<T, E>

§

type Item = &'a mut T

§

type Iter = IterMut<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Sync> IntoParallelIterator for &'a Option<T>

§

type Item = &'a T

§

type Iter = Iter<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Sync> IntoParallelIterator for &'a LinkedList<T>

§

type Item = <&'a LinkedList<T> as IntoIterator>::Item

§

type Iter = Iter<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Sync> IntoParallelIterator for &'a VecDeque<T>

§

type Item = &'a T

§

type Iter = Iter<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'a, T: Sync, E> IntoParallelIterator for &'a Result<T, E>

§

type Item = &'a T

§

type Iter = Iter<'a, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut [T]

§

type Item = &'data mut T

§

type Iter = IterMut<'data, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut Vec<T>

§

type Item = &'data mut T

§

type Iter = IterMut<'data, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'data, T: Send + 'data, const N: usize> IntoParallelIterator for &'data mut [T; N]

§

type Item = &'data mut T

§

type Iter = IterMut<'data, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'data, T: Sync + 'data> IntoParallelIterator for &'data [T]

§

type Item = &'data T

§

type Iter = Iter<'data, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'data, T: Sync + 'data> IntoParallelIterator for &'data Vec<T>

§

type Item = &'data T

§

type Iter = Iter<'data, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<'data, T: Sync + 'data, const N: usize> IntoParallelIterator for &'data [T; N]

§

type Item = &'data T

§

type Iter = Iter<'data, T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<A> IntoParallelIterator for (A,)

source§

impl<A, B> IntoParallelIterator for (A, B)

source§

impl<A, B, C> IntoParallelIterator for (A, B, C)

source§

impl<A, B, C, D> IntoParallelIterator for (A, B, C, D)

source§

impl<A, B, C, D, E> IntoParallelIterator for (A, B, C, D, E)

source§

impl<A, B, C, D, E, F> IntoParallelIterator for (A, B, C, D, E, F)

source§

impl<A, B, C, D, E, F, G> IntoParallelIterator for (A, B, C, D, E, F, G)

source§

impl<A, B, C, D, E, F, G, H> IntoParallelIterator for (A, B, C, D, E, F, G, H)

source§

impl<A, B, C, D, E, F, G, H, I> IntoParallelIterator for (A, B, C, D, E, F, G, H, I)

source§

impl<A, B, C, D, E, F, G, H, I, J> IntoParallelIterator for (A, B, C, D, E, F, G, H, I, J)

source§

impl<A, B, C, D, E, F, G, H, I, J, K> IntoParallelIterator for (A, B, C, D, E, F, G, H, I, J, K)

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> IntoParallelIterator for (A, B, C, D, E, F, G, H, I, J, K, L)

source§

impl<K: Ord + Send, V: Send> IntoParallelIterator for BTreeMap<K, V>

§

type Item = <BTreeMap<K, V> as IntoIterator>::Item

§

type Iter = IntoIter<K, V>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<K: Hash + Eq + Send, V: Send, S: BuildHasher> IntoParallelIterator for HashMap<K, V, S>

§

type Item = <HashMap<K, V, S> as IntoIterator>::Item

§

type Iter = IntoIter<K, V>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T> IntoParallelIterator for Range<T>
where + Iter<T>: ParallelIterator,

Implemented for ranges of all primitive integer types and char.

+
§

type Item = <Iter<T> as ParallelIterator>::Item

§

type Iter = Iter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T> IntoParallelIterator for RangeInclusive<T>
where + Iter<T>: ParallelIterator,

Implemented for ranges of all primitive integer types and char.

+
§

type Item = <Iter<T> as ParallelIterator>::Item

§

type Iter = Iter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Ord + Send> IntoParallelIterator for BinaryHeap<T>

§

type Item = T

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Ord + Send> IntoParallelIterator for BTreeSet<T>

§

type Item = <BTreeSet<T> as IntoIterator>::Item

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Hash + Eq + Send, S: BuildHasher> IntoParallelIterator for HashSet<T, S>

§

type Item = <HashSet<T, S> as IntoIterator>::Item

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Send> IntoParallelIterator for Option<T>

§

type Item = T

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Send> IntoParallelIterator for LinkedList<T>

§

type Item = <LinkedList<T> as IntoIterator>::Item

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Send> IntoParallelIterator for VecDeque<T>

§

type Item = T

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Send> IntoParallelIterator for Vec<T>

§

type Item = T

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Send, E> IntoParallelIterator for Result<T, E>

§

type Item = T

§

type Iter = IntoIter<T>

source§

fn into_par_iter(self) -> Self::Iter

source§

impl<T: Send, const N: usize> IntoParallelIterator for [T; N]

§

type Item = T

§

type Iter = IntoIter<T, N>

source§

fn into_par_iter(self) -> Self::Iter

Implementors§

\ No newline at end of file diff --git a/rayon/iter/trait.IntoParallelRefIterator.html b/rayon/iter/trait.IntoParallelRefIterator.html new file mode 100644 index 0000000000..78803672d1 --- /dev/null +++ b/rayon/iter/trait.IntoParallelRefIterator.html @@ -0,0 +1,31 @@ +IntoParallelRefIterator in rayon::iter - Rust +
pub trait IntoParallelRefIterator<'data> {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item: Send + 'data;
+
+    // Required method
+    fn par_iter(&'data self) -> Self::Iter;
+}
Expand description

IntoParallelRefIterator implements the conversion to a +ParallelIterator, providing shared references to the data.

+

This is a parallel version of the iter() method +defined by various collections.

+

This trait is automatically implemented +for I where &I: IntoParallelIterator. In most cases, users +will want to implement IntoParallelIterator rather than implement +this trait directly.

+

Required Associated Types§

source

type Iter: ParallelIterator<Item = Self::Item>

The type of the parallel iterator that will be returned.

+
source

type Item: Send + 'data

The type of item that the parallel iterator will produce. +This will typically be an &'data T reference type.

+

Required Methods§

source

fn par_iter(&'data self) -> Self::Iter

Converts self into a parallel iterator.

+
§Examples
+
use rayon::prelude::*;
+
+let v: Vec<_> = (0..100).collect();
+assert_eq!(v.par_iter().sum::<i32>(), 100 * 99 / 2);
+
+// `v.par_iter()` is shorthand for `(&v).into_par_iter()`,
+// producing the exact same references.
+assert!(v.par_iter().zip(&v)
+         .all(|(a, b)| std::ptr::eq(a, b)));
+

Implementors§

\ No newline at end of file diff --git a/rayon/iter/trait.IntoParallelRefMutIterator.html b/rayon/iter/trait.IntoParallelRefMutIterator.html new file mode 100644 index 0000000000..99c997635b --- /dev/null +++ b/rayon/iter/trait.IntoParallelRefMutIterator.html @@ -0,0 +1,27 @@ +IntoParallelRefMutIterator in rayon::iter - Rust +
pub trait IntoParallelRefMutIterator<'data> {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item: Send + 'data;
+
+    // Required method
+    fn par_iter_mut(&'data mut self) -> Self::Iter;
+}
Expand description

IntoParallelRefMutIterator implements the conversion to a +ParallelIterator, providing mutable references to the data.

+

This is a parallel version of the iter_mut() method +defined by various collections.

+

This trait is automatically implemented +for I where &mut I: IntoParallelIterator. In most cases, users +will want to implement IntoParallelIterator rather than implement +this trait directly.

+

Required Associated Types§

source

type Iter: ParallelIterator<Item = Self::Item>

The type of iterator that will be created.

+
source

type Item: Send + 'data

The type of item that will be produced; this is typically an +&'data mut T reference.

+

Required Methods§

source

fn par_iter_mut(&'data mut self) -> Self::Iter

Creates the parallel iterator from self.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = vec![0usize; 5];
+v.par_iter_mut().enumerate().for_each(|(i, x)| *x = i);
+assert_eq!(v, [0, 1, 2, 3, 4]);
+

Implementors§

\ No newline at end of file diff --git a/rayon/iter/trait.ParallelBridge.html b/rayon/iter/trait.ParallelBridge.html new file mode 100644 index 0000000000..54c43cffdf --- /dev/null +++ b/rayon/iter/trait.ParallelBridge.html @@ -0,0 +1,40 @@ +ParallelBridge in rayon::iter - Rust +
pub trait ParallelBridge: Sized {
+    // Required method
+    fn par_bridge(self) -> IterBridge<Self>;
+}
Expand description

Conversion trait to convert an Iterator to a ParallelIterator.

+

This creates a “bridge” from a sequential iterator to a parallel one, by distributing its items +across the Rayon thread pool. This has the advantage of being able to parallelize just about +anything, but the resulting ParallelIterator can be less efficient than if you started with +par_iter instead. However, it can still be useful for iterators that are difficult to +parallelize by other means, like channels or file or network I/O.

+

Iterator items are pulled by next() one at a time, synchronized from each thread that is +ready for work, so this may become a bottleneck if the serial iterator can’t keep up with the +parallel demand. The items are not buffered by IterBridge, so it’s fine to use this with +large or even unbounded iterators.

+

The resulting iterator is not guaranteed to keep the order of the original iterator.

+

§Examples

+

To use this trait, take an existing Iterator and call par_bridge on it. After that, you can +use any of the ParallelIterator methods:

+ +
use rayon::iter::ParallelBridge;
+use rayon::prelude::ParallelIterator;
+use std::sync::mpsc::channel;
+
+let rx = {
+    let (tx, rx) = channel();
+
+    tx.send("one!");
+    tx.send("two!");
+    tx.send("three!");
+
+    rx
+};
+
+let mut output: Vec<&'static str> = rx.into_iter().par_bridge().collect();
+output.sort_unstable();
+
+assert_eq!(&*output, &["one!", "three!", "two!"]);
+

Required Methods§

source

fn par_bridge(self) -> IterBridge<Self>

Creates a bridge from this type to a ParallelIterator.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Iterator + Send> ParallelBridge for T
where + T::Item: Send,

\ No newline at end of file diff --git a/rayon/iter/trait.ParallelDrainFull.html b/rayon/iter/trait.ParallelDrainFull.html new file mode 100644 index 0000000000..dcc29292de --- /dev/null +++ b/rayon/iter/trait.ParallelDrainFull.html @@ -0,0 +1,35 @@ +ParallelDrainFull in rayon::iter - Rust +
pub trait ParallelDrainFull {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item: Send;
+
+    // Required method
+    fn par_drain(self) -> Self::Iter;
+}
Expand description

ParallelDrainFull creates a parallel iterator that moves all items +from a collection while retaining the original capacity.

+

Types which are indexable typically implement ParallelDrainRange +instead, where you can drain fully with par_drain(..).

+

Required Associated Types§

source

type Iter: ParallelIterator<Item = Self::Item>

The draining parallel iterator type that will be created.

+
source

type Item: Send

The type of item that the parallel iterator will produce. +This is usually the same as IntoParallelIterator::Item.

+

Required Methods§

source

fn par_drain(self) -> Self::Iter

Returns a draining parallel iterator over an entire collection.

+

When the iterator is dropped, all items are removed, even if the +iterator was not fully consumed. If the iterator is leaked, for example +using std::mem::forget, it is unspecified how many items are removed.

+
§Examples
+
use rayon::prelude::*;
+use std::collections::{BinaryHeap, HashSet};
+
+let squares: HashSet<i32> = (0..10).map(|x| x * x).collect();
+
+let mut heap: BinaryHeap<_> = squares.iter().copied().collect();
+assert_eq!(
+    // heaps are drained in arbitrary order
+    heap.par_drain()
+        .inspect(|x| assert!(squares.contains(x)))
+        .count(),
+    squares.len(),
+);
+assert!(heap.is_empty());
+assert!(heap.capacity() >= squares.len());
+

Implementations on Foreign Types§

source§

impl<'a, K: Hash + Eq + Send, V: Send, S: BuildHasher> ParallelDrainFull for &'a mut HashMap<K, V, S>

§

type Iter = Drain<'a, K, V>

§

type Item = (K, V)

source§

fn par_drain(self) -> Self::Iter

source§

impl<'a, T: Ord + Send> ParallelDrainFull for &'a mut BinaryHeap<T>

§

type Iter = Drain<'a, T>

§

type Item = T

source§

fn par_drain(self) -> Self::Iter

source§

impl<'a, T: Hash + Eq + Send, S: BuildHasher> ParallelDrainFull for &'a mut HashSet<T, S>

§

type Iter = Drain<'a, T>

§

type Item = T

source§

fn par_drain(self) -> Self::Iter

Implementors§

\ No newline at end of file diff --git a/rayon/iter/trait.ParallelDrainRange.html b/rayon/iter/trait.ParallelDrainRange.html new file mode 100644 index 0000000000..adbc33573c --- /dev/null +++ b/rayon/iter/trait.ParallelDrainRange.html @@ -0,0 +1,67 @@ +ParallelDrainRange in rayon::iter - Rust +
pub trait ParallelDrainRange<Idx = usize> {
+    type Iter: ParallelIterator<Item = Self::Item>;
+    type Item: Send;
+
+    // Required method
+    fn par_drain<R: RangeBounds<Idx>>(self, range: R) -> Self::Iter;
+}
Expand description

ParallelDrainRange creates a parallel iterator that moves a range of items +from a collection while retaining the original capacity.

+

Types which are not indexable may implement ParallelDrainFull instead.

+

Required Associated Types§

source

type Iter: ParallelIterator<Item = Self::Item>

The draining parallel iterator type that will be created.

+
source

type Item: Send

The type of item that the parallel iterator will produce. +This is usually the same as IntoParallelIterator::Item.

+

Required Methods§

source

fn par_drain<R: RangeBounds<Idx>>(self, range: R) -> Self::Iter

Returns a draining parallel iterator over a range of the collection.

+

When the iterator is dropped, all items in the range are removed, even +if the iterator was not fully consumed. If the iterator is leaked, for +example using std::mem::forget, it is unspecified how many items are +removed.

+
§Examples
+
use rayon::prelude::*;
+
+let squares: Vec<i32> = (0..10).map(|x| x * x).collect();
+
+println!("RangeFull");
+let mut vec = squares.clone();
+assert!(vec.par_drain(..)
+           .eq(squares.par_iter().copied()));
+assert!(vec.is_empty());
+assert!(vec.capacity() >= squares.len());
+
+println!("RangeFrom");
+let mut vec = squares.clone();
+assert!(vec.par_drain(5..)
+           .eq(squares[5..].par_iter().copied()));
+assert_eq!(&vec[..], &squares[..5]);
+assert!(vec.capacity() >= squares.len());
+
+println!("RangeTo");
+let mut vec = squares.clone();
+assert!(vec.par_drain(..5)
+           .eq(squares[..5].par_iter().copied()));
+assert_eq!(&vec[..], &squares[5..]);
+assert!(vec.capacity() >= squares.len());
+
+println!("RangeToInclusive");
+let mut vec = squares.clone();
+assert!(vec.par_drain(..=5)
+           .eq(squares[..=5].par_iter().copied()));
+assert_eq!(&vec[..], &squares[6..]);
+assert!(vec.capacity() >= squares.len());
+
+println!("Range");
+let mut vec = squares.clone();
+assert!(vec.par_drain(3..7)
+           .eq(squares[3..7].par_iter().copied()));
+assert_eq!(&vec[..3], &squares[..3]);
+assert_eq!(&vec[3..], &squares[7..]);
+assert!(vec.capacity() >= squares.len());
+
+println!("RangeInclusive");
+let mut vec = squares.clone();
+assert!(vec.par_drain(3..=7)
+           .eq(squares[3..=7].par_iter().copied()));
+assert_eq!(&vec[..3], &squares[..3]);
+assert_eq!(&vec[3..], &squares[8..]);
+assert!(vec.capacity() >= squares.len());
+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a> ParallelDrainRange for &'a mut String

§

type Iter = Drain<'a>

§

type Item = char

source§

fn par_drain<R: RangeBounds<usize>>(self, range: R) -> Self::Iter

source§

impl<'a, T: Send> ParallelDrainRange for &'a mut VecDeque<T>

§

type Iter = Drain<'a, T>

§

type Item = T

source§

fn par_drain<R: RangeBounds<usize>>(self, range: R) -> Self::Iter

source§

impl<'data, T: Send> ParallelDrainRange for &'data mut Vec<T>

§

type Iter = Drain<'data, T>

§

type Item = T

source§

fn par_drain<R: RangeBounds<usize>>(self, range: R) -> Self::Iter

Implementors§

\ No newline at end of file diff --git a/rayon/iter/trait.ParallelExtend.html b/rayon/iter/trait.ParallelExtend.html new file mode 100644 index 0000000000..793618679f --- /dev/null +++ b/rayon/iter/trait.ParallelExtend.html @@ -0,0 +1,132 @@ +ParallelExtend in rayon::iter - Rust +
pub trait ParallelExtend<T>
where + T: Send,
{ + // Required method + fn par_extend<I>(&mut self, par_iter: I) + where I: IntoParallelIterator<Item = T>; +}
Expand description

ParallelExtend extends an existing collection with items from a ParallelIterator.

+

§Examples

+

Implementing ParallelExtend for your type:

+ +
use rayon::prelude::*;
+use std::mem;
+
+struct BlackHole {
+    mass: usize,
+}
+
+impl<T: Send> ParallelExtend<T> for BlackHole {
+    fn par_extend<I>(&mut self, par_iter: I)
+        where I: IntoParallelIterator<Item = T>
+    {
+        let par_iter = par_iter.into_par_iter();
+        self.mass += par_iter.count() * mem::size_of::<T>();
+    }
+}
+
+let mut bh = BlackHole { mass: 0 };
+bh.par_extend(0i32..1000);
+assert_eq!(bh.mass, 4000);
+bh.par_extend(0i64..10);
+assert_eq!(bh.mass, 4080);
+

Required Methods§

source

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

Extends an instance of the collection with the elements drawn +from the parallel iterator par_iter.

+
§Examples
+
use rayon::prelude::*;
+
+let mut vec = vec![];
+vec.par_extend(0..5);
+vec.par_extend((0..5).into_par_iter().map(|i| i * i));
+assert_eq!(vec, [0, 1, 2, 3, 4, 0, 1, 4, 9, 16]);
+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ParallelExtend<char> for String

Extends a string with characters from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = char>,

source§

impl ParallelExtend<()> for ()

Collapses all unit items from a parallel iterator into one.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = ()>,

source§

impl ParallelExtend<Box<str>> for String

Extends a string with boxed strings from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = Box<str>>,

source§

impl ParallelExtend<String> for String

Extends a string with strings from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = String>,

source§

impl ParallelExtend<OsString> for OsString

Extends an OS-string with strings from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = OsString>,

source§

impl<'a> ParallelExtend<&'a char> for String

Extends a string with copied characters from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a char>,

source§

impl<'a> ParallelExtend<&'a str> for String

Extends a string with string slices from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a str>,

source§

impl<'a> ParallelExtend<&'a OsStr> for OsString

Extends an OS-string with string slices from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a OsStr>,

source§

impl<'a> ParallelExtend<Cow<'a, str>> for String

Extends a string with string slices from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = Cow<'a, str>>,

source§

impl<'a> ParallelExtend<Cow<'a, OsStr>> for OsString

Extends an OS-string with string slices from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = Cow<'a, OsStr>>,

source§

impl<'a, K, V> ParallelExtend<(&'a K, &'a V)> for BTreeMap<K, V>
where + K: Copy + Ord + Send + Sync + 'a, + V: Copy + Send + Sync + 'a,

Extends a B-tree map with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = (&'a K, &'a V)>,

source§

impl<'a, K, V, S> ParallelExtend<(&'a K, &'a V)> for HashMap<K, V, S>
where + K: Copy + Eq + Hash + Send + Sync + 'a, + V: Copy + Send + Sync + 'a, + S: BuildHasher + Send,

Extends a hash map with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = (&'a K, &'a V)>,

source§

impl<'a, T> ParallelExtend<&'a T> for BinaryHeap<T>
where + T: 'a + Copy + Ord + Send + Sync,

Extends a binary heap with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a T>,

source§

impl<'a, T> ParallelExtend<&'a T> for BTreeSet<T>
where + T: 'a + Copy + Ord + Send + Sync,

Extends a B-tree set with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a T>,

source§

impl<'a, T> ParallelExtend<&'a T> for LinkedList<T>
where + T: 'a + Copy + Send + Sync,

Extends a linked list with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a T>,

source§

impl<'a, T> ParallelExtend<&'a T> for VecDeque<T>
where + T: 'a + Copy + Send + Sync,

Extends a deque with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a T>,

source§

impl<'a, T> ParallelExtend<&'a T> for Vec<T>
where + T: 'a + Copy + Send + Sync,

Extends a vector with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a T>,

source§

impl<'a, T, S> ParallelExtend<&'a T> for HashSet<T, S>
where + T: 'a + Copy + Eq + Hash + Send + Sync, + S: BuildHasher + Send,

Extends a hash set with copied items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = &'a T>,

source§

impl<A, B, FromA, FromB> ParallelExtend<(A, B)> for (FromA, FromB)
where + A: Send, + B: Send, + FromA: Send + ParallelExtend<A>, + FromB: Send + ParallelExtend<B>,

source§

fn par_extend<I>(&mut self, pi: I)
where + I: IntoParallelIterator<Item = (A, B)>,

source§

impl<K, V> ParallelExtend<(K, V)> for BTreeMap<K, V>
where + K: Ord + Send, + V: Send,

Extends a B-tree map with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = (K, V)>,

source§

impl<K, V, S> ParallelExtend<(K, V)> for HashMap<K, V, S>
where + K: Eq + Hash + Send, + V: Send, + S: BuildHasher + Send,

Extends a hash map with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = (K, V)>,

source§

impl<L, R, A, B> ParallelExtend<Either<L, R>> for (A, B)
where + L: Send, + R: Send, + A: Send + ParallelExtend<L>, + B: Send + ParallelExtend<R>,

source§

fn par_extend<I>(&mut self, pi: I)
where + I: IntoParallelIterator<Item = Either<L, R>>,

source§

impl<T> ParallelExtend<T> for BinaryHeap<T>
where + T: Ord + Send,

Extends a binary heap with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> ParallelExtend<T> for BTreeSet<T>
where + T: Ord + Send,

Extends a B-tree set with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> ParallelExtend<T> for LinkedList<T>
where + T: Send,

Extends a linked list with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> ParallelExtend<T> for VecDeque<T>
where + T: Send,

Extends a deque with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

source§

impl<T> ParallelExtend<T> for Vec<T>
where + T: Send,

Extends a vector with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

source§

impl<T, S> ParallelExtend<T> for HashSet<T, S>
where + T: Eq + Hash + Send, + S: BuildHasher + Send,

Extends a hash set with items from a parallel iterator.

+
source§

fn par_extend<I>(&mut self, par_iter: I)
where + I: IntoParallelIterator<Item = T>,

Implementors§

source§

impl<L, R, T> ParallelExtend<T> for Either<L, R>
where + L: ParallelExtend<T>, + R: ParallelExtend<T>, + T: Send,

Either<L, R> can be extended if both L and R are parallel extendable.

+
\ No newline at end of file diff --git a/rayon/iter/trait.ParallelIterator.html b/rayon/iter/trait.ParallelIterator.html new file mode 100644 index 0000000000..85ddb3657a --- /dev/null +++ b/rayon/iter/trait.ParallelIterator.html @@ -0,0 +1,1642 @@ +ParallelIterator in rayon::iter - Rust +
pub trait ParallelIterator: Sized + Send {
+    type Item: Send;
+
+
Show 59 methods // Required method + fn drive_unindexed<C>(self, consumer: C) -> C::Result + where C: UnindexedConsumer<Self::Item>; + + // Provided methods + fn for_each<OP>(self, op: OP) + where OP: Fn(Self::Item) + Sync + Send { ... } + fn for_each_with<OP, T>(self, init: T, op: OP) + where OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone { ... } + fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP) + where OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send { ... } + fn try_for_each<OP, R>(self, op: OP) -> R + where OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send { ... } + fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R + where OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send { ... } + fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R + where OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send { ... } + fn count(self) -> usize { ... } + fn map<F, R>(self, map_op: F) -> Map<Self, F> + where F: Fn(Self::Item) -> R + Sync + Send, + R: Send { ... } + fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F> + where F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send { ... } + fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F + ) -> MapInit<Self, INIT, F> + where F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send { ... } + fn cloned<'a, T>(self) -> Cloned<Self> + where T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T> { ... } + fn copied<'a, T>(self) -> Copied<Self> + where T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T> { ... } + fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP> + where OP: Fn(&Self::Item) + Sync + Send { ... } + fn update<F>(self, update_op: F) -> Update<Self, F> + where F: Fn(&mut Self::Item) + Sync + Send { ... } + fn filter<P>(self, filter_op: P) -> Filter<Self, P> + where P: Fn(&Self::Item) -> bool + Sync + Send { ... } + fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P> + where P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send { ... } + fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F> + where F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator { ... } + fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F> + where F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send { ... } + fn flatten(self) -> Flatten<Self> + where Self::Item: IntoParallelIterator { ... } + fn flatten_iter(self) -> FlattenIter<Self> + where Self::Item: IntoIterator, + <Self::Item as IntoIterator>::Item: Send { ... } + fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item + where OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send { ... } + fn reduce_with<OP>(self, op: OP) -> Option<Self::Item> + where OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send { ... } + fn try_reduce<T, OP, ID>(self, identity: ID, op: OP) -> Self::Item + where OP: Fn(T, T) -> Self::Item + Sync + Send, + ID: Fn() -> T + Sync + Send, + Self::Item: Try<Output = T> { ... } + fn try_reduce_with<T, OP>(self, op: OP) -> Option<Self::Item> + where OP: Fn(T, T) -> Self::Item + Sync + Send, + Self::Item: Try<Output = T> { ... } + fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F> + where F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send { ... } + fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F> + where F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone { ... } + fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F + ) -> TryFold<Self, R, ID, F> + where F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send { ... } + fn try_fold_with<F, T, R>( + self, + init: T, + fold_op: F + ) -> TryFoldWith<Self, R, F> + where F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send { ... } + fn sum<S>(self) -> S + where S: Send + Sum<Self::Item> + Sum<S> { ... } + fn product<P>(self) -> P + where P: Send + Product<Self::Item> + Product<P> { ... } + fn min(self) -> Option<Self::Item> + where Self::Item: Ord { ... } + fn min_by<F>(self, f: F) -> Option<Self::Item> + where F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering { ... } + fn min_by_key<K, F>(self, f: F) -> Option<Self::Item> + where K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K { ... } + fn max(self) -> Option<Self::Item> + where Self::Item: Ord { ... } + fn max_by<F>(self, f: F) -> Option<Self::Item> + where F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering { ... } + fn max_by_key<K, F>(self, f: F) -> Option<Self::Item> + where K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K { ... } + fn chain<C>(self, chain: C) -> Chain<Self, C::Iter> + where C: IntoParallelIterator<Item = Self::Item> { ... } + fn find_any<P>(self, predicate: P) -> Option<Self::Item> + where P: Fn(&Self::Item) -> bool + Sync + Send { ... } + fn find_first<P>(self, predicate: P) -> Option<Self::Item> + where P: Fn(&Self::Item) -> bool + Sync + Send { ... } + fn find_last<P>(self, predicate: P) -> Option<Self::Item> + where P: Fn(&Self::Item) -> bool + Sync + Send { ... } + fn find_map_any<P, R>(self, predicate: P) -> Option<R> + where P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send { ... } + fn find_map_first<P, R>(self, predicate: P) -> Option<R> + where P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send { ... } + fn find_map_last<P, R>(self, predicate: P) -> Option<R> + where P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send { ... } + fn any<P>(self, predicate: P) -> bool + where P: Fn(Self::Item) -> bool + Sync + Send { ... } + fn all<P>(self, predicate: P) -> bool + where P: Fn(Self::Item) -> bool + Sync + Send { ... } + fn while_some<T>(self) -> WhileSome<Self> + where Self: ParallelIterator<Item = Option<T>>, + T: Send { ... } + fn panic_fuse(self) -> PanicFuse<Self> { ... } + fn collect<C>(self) -> C + where C: FromParallelIterator<Self::Item> { ... } + fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) + where Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send { ... } + fn partition<A, B, P>(self, predicate: P) -> (A, B) + where A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send { ... } + fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B) + where A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send { ... } + fn intersperse(self, element: Self::Item) -> Intersperse<Self> + where Self::Item: Clone { ... } + fn take_any(self, n: usize) -> TakeAny<Self> { ... } + fn skip_any(self, n: usize) -> SkipAny<Self> { ... } + fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P> + where P: Fn(&Self::Item) -> bool + Sync + Send { ... } + fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P> + where P: Fn(&Self::Item) -> bool + Sync + Send { ... } + fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>> { ... } + fn opt_len(&self) -> Option<usize> { ... } +
}
Expand description

Parallel version of the standard iterator trait.

+

The combinators on this trait are available on all parallel +iterators. Additional methods can be found on the +IndexedParallelIterator trait: those methods are only +available for parallel iterators where the number of items is +known in advance (so, e.g., after invoking filter, those methods +become unavailable).

+

For examples of using parallel iterators, see the docs on the +iter module.

+

Required Associated Types§

source

type Item: Send

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.

+

Required Methods§

source

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly.

+

This method causes the iterator self to start producing +items and to feed them to the consumer consumer one by one. +It may split the consumer before doing so to create the +opportunity to produce in parallel.

+

See the README for more details on the internals of parallel +iterators.

+

Provided Methods§

source

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel.

+
§Examples
+
use rayon::prelude::*;
+
+(0..100).into_par_iter().for_each(|x| println!("{:?}", x));
+
source

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel.

+

The init value will be cloned only as needed to be paired with +the group of items in each rayon job. It does not require the type +to be Sync.

+
§Examples
+
use std::sync::mpsc::channel;
+use rayon::prelude::*;
+
+let (sender, receiver) = channel();
+
+(0..5).into_par_iter().for_each_with(sender, |s, x| s.send(x).unwrap());
+
+let mut res: Vec<_> = receiver.iter().collect();
+
+res.sort();
+
+assert_eq!(&res[..], &[0, 1, 2, 3, 4])
+
source

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel.

+

The init function will be called only as needed for a value to be +paired with the group of items in each rayon job. There is no +constraint on that returned type at all!

+
§Examples
+
use rand::Rng;
+use rayon::prelude::*;
+
+let mut v = vec![0u8; 1_000_000];
+
+v.par_chunks_mut(1000)
+    .for_each_init(
+        || rand::thread_rng(),
+        |rng, chunk| rng.fill(chunk),
+    );
+
+// There's a remote chance that this will fail...
+for i in 0u8..=255 {
+    assert!(v.contains(&i));
+}
+
source

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel.

+

If the OP returns Result::Err or Option::None, we will attempt to +stop processing the rest of the items in the iterator as soon as +possible, and we will return that terminating value. Otherwise, we will +return an empty Result::Ok(()) or Option::Some(()). If there are +multiple errors in parallel, it is not specified which will be returned.

+
§Examples
+
use rayon::prelude::*;
+use std::io::{self, Write};
+
+// This will stop iteration early if there's any write error, like
+// having piped output get closed on the other end.
+(0..100).into_par_iter()
+    .try_for_each(|x| writeln!(io::stdout(), "{:?}", x))
+    .expect("expected no write errors");
+
source

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel.

+

This combines the init semantics of for_each_with() and the +failure semantics of try_for_each().

+
§Examples
+
use std::sync::mpsc::channel;
+use rayon::prelude::*;
+
+let (sender, receiver) = channel();
+
+(0..5).into_par_iter()
+    .try_for_each_with(sender, |s, x| s.send(x))
+    .expect("expected no send errors");
+
+let mut res: Vec<_> = receiver.iter().collect();
+
+res.sort();
+
+assert_eq!(&res[..], &[0, 1, 2, 3, 4])
+
source

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel.

+

This combines the init semantics of for_each_init() and the +failure semantics of try_for_each().

+
§Examples
+
use rand::Rng;
+use rayon::prelude::*;
+
+let mut v = vec![0u8; 1_000_000];
+
+v.par_chunks_mut(1000)
+    .try_for_each_init(
+        || rand::thread_rng(),
+        |rng, chunk| rng.try_fill(chunk),
+    )
+    .expect("expected no rand errors");
+
+// There's a remote chance that this will fail...
+for i in 0u8..=255 {
+    assert!(v.contains(&i));
+}
+
source

fn count(self) -> usize

Counts the number of items in this parallel iterator.

+
§Examples
+
use rayon::prelude::*;
+
+let count = (0..100).into_par_iter().count();
+
+assert_eq!(count, 100);
+
source

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results.

+
§Examples
+
use rayon::prelude::*;
+
+let mut par_iter = (0..5).into_par_iter().map(|x| x * 2);
+
+let doubles: Vec<_> = par_iter.collect();
+
+assert_eq!(&doubles[..], &[0, 2, 4, 6, 8]);
+
source

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results.

+

The init value will be cloned only as needed to be paired with +the group of items in each rayon job. It does not require the type +to be Sync.

+
§Examples
+
use std::sync::mpsc::channel;
+use rayon::prelude::*;
+
+let (sender, receiver) = channel();
+
+let a: Vec<_> = (0..5)
+                .into_par_iter()            // iterating over i32
+                .map_with(sender, |s, x| {
+                    s.send(x).unwrap();     // sending i32 values through the channel
+                    x                       // returning i32
+                })
+                .collect();                 // collecting the returned values into a vector
+
+let mut b: Vec<_> = receiver.iter()         // iterating over the values in the channel
+                            .collect();     // and collecting them
+b.sort();
+
+assert_eq!(a, b);
+
source

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results.

+

The init function will be called only as needed for a value to be +paired with the group of items in each rayon job. There is no +constraint on that returned type at all!

+
§Examples
+
use rand::Rng;
+use rayon::prelude::*;
+
+let a: Vec<_> = (1i32..1_000_000)
+    .into_par_iter()
+    .map_init(
+        || rand::thread_rng(),  // get the thread-local RNG
+        |rng, x| if rng.gen() { // randomly negate items
+            -x
+        } else {
+            x
+        },
+    ).collect();
+
+// There's a remote chance that this will fail...
+assert!(a.iter().any(|&x| x < 0));
+assert!(a.iter().any(|&x| x > 0));
+
source

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied().

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3];
+
+let v_cloned: Vec<_> = a.par_iter().cloned().collect();
+
+// cloned is the same as .map(|&x| x), for integers
+let v_map: Vec<_> = a.par_iter().map(|&x| x).collect();
+
+assert_eq!(v_cloned, vec![1, 2, 3]);
+assert_eq!(v_map, vec![1, 2, 3]);
+
source

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned().

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3];
+
+let v_copied: Vec<_> = a.par_iter().copied().collect();
+
+// copied is the same as .map(|&x| x), for integers
+let v_map: Vec<_> = a.par_iter().map(|&x| x).collect();
+
+assert_eq!(v_copied, vec![1, 2, 3]);
+assert_eq!(v_map, vec![1, 2, 3]);
+
source

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 4, 2, 3];
+
+// this iterator sequence is complex.
+let sum = a.par_iter()
+            .cloned()
+            .filter(|&x| x % 2 == 0)
+            .reduce(|| 0, |sum, i| sum + i);
+
+println!("{}", sum);
+
+// let's add some inspect() calls to investigate what's happening
+let sum = a.par_iter()
+            .cloned()
+            .inspect(|x| println!("about to filter: {}", x))
+            .filter(|&x| x % 2 == 0)
+            .inspect(|x| println!("made it through filter: {}", x))
+            .reduce(|| 0, |sum, i| sum + i);
+
+println!("{}", sum);
+
source

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it.

+
§Examples
+
use rayon::prelude::*;
+
+let par_iter = (0..5).into_par_iter().update(|x| {*x *= 2;});
+
+let doubles: Vec<_> = par_iter.collect();
+
+assert_eq!(&doubles[..], &[0, 2, 4, 6, 8]);
+
source

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results.

+
§Examples
+
use rayon::prelude::*;
+
+let mut par_iter = (0..10).into_par_iter().filter(|x| x % 2 == 0);
+
+let even_numbers: Vec<_> = par_iter.collect();
+
+assert_eq!(&even_numbers[..], &[0, 2, 4, 6, 8]);
+
source

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results.

+
§Examples
+
use rayon::prelude::*;
+
+let mut par_iter = (0..10).into_par_iter()
+                        .filter_map(|x| {
+                            if x % 2 == 0 { Some(x * 3) }
+                            else { None }
+                        });
+
+let even_numbers: Vec<_> = par_iter.collect();
+
+assert_eq!(&even_numbers[..], &[0, 6, 12, 18, 24]);
+
source

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one.

+

See also flat_map_iter.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [[1, 2], [3, 4], [5, 6], [7, 8]];
+
+let par_iter = a.par_iter().cloned().flat_map(|a| a.to_vec());
+
+let vec: Vec<_> = par_iter.collect();
+
+assert_eq!(&vec[..], &[1, 2, 3, 4, 5, 6, 7, 8]);
+
source

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one.

+
§flat_map_iter versus flat_map
+

These two methods are similar but behave slightly differently. With flat_map, +each of the nested iterators must be a parallel iterator, and they will be further +split up with nested parallelism. With flat_map_iter, each nested iterator is a +sequential Iterator, and we only parallelize between them, while the items +produced by each nested iterator are processed sequentially.

+

When choosing between these methods, consider whether nested parallelism suits the +potential iterators at hand. If there’s little computation involved, or its length +is much less than the outer parallel iterator, then it may perform better to avoid +the overhead of parallelism, just flattening sequentially with flat_map_iter. +If there is a lot of computation, potentially outweighing the outer parallel +iterator, then the nested parallelism of flat_map may be worthwhile.

+
§Examples
+
use rayon::prelude::*;
+use std::cell::RefCell;
+
+let a = [[1, 2], [3, 4], [5, 6], [7, 8]];
+
+let par_iter = a.par_iter().flat_map_iter(|a| {
+    // The serial iterator doesn't have to be thread-safe, just its items.
+    let cell_iter = RefCell::new(a.iter().cloned());
+    std::iter::from_fn(move || cell_iter.borrow_mut().next())
+});
+
+let vec: Vec<_> = par_iter.collect();
+
+assert_eq!(&vec[..], &[1, 2, 3, 4, 5, 6, 7, 8]);
+
source

fn flatten(self) -> Flatten<Self>
where + Self::Item: IntoParallelIterator,

An adaptor that flattens parallel-iterable Items into one large iterator.

+

See also flatten_iter.

+
§Examples
+
use rayon::prelude::*;
+
+let x: Vec<Vec<_>> = vec![vec![1, 2], vec![3, 4]];
+let y: Vec<_> = x.into_par_iter().flatten().collect();
+
+assert_eq!(y, vec![1, 2, 3, 4]);
+
source

fn flatten_iter(self) -> FlattenIter<Self>
where + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::Item: Send,

An adaptor that flattens serial-iterable Items into one large iterator.

+

See also flatten and the analogous comparison of +flat_map_iter versus flat_map.

+
§Examples
+
use rayon::prelude::*;
+
+let x: Vec<Vec<_>> = vec![vec![1, 2], vec![3, 4]];
+let iters: Vec<_> = x.into_iter().map(Vec::into_iter).collect();
+let y: Vec<_> = iters.into_par_iter().flatten_iter().collect();
+
+assert_eq!(y, vec![1, 2, 3, 4]);
+
source

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case).

+
§Examples
+
// Iterate over a sequence of pairs `(x0, y0), ..., (xN, yN)`
+// and use reduce to compute one pair `(x0 + ... + xN, y0 + ... + yN)`
+// where the first/second elements are summed separately.
+use rayon::prelude::*;
+let sums = [(0, 1), (5, 6), (16, 2), (8, 9)]
+           .par_iter()        // iterating over &(i32, i32)
+           .cloned()          // iterating over (i32, i32)
+           .reduce(|| (0, 0), // the "identity" is 0 in both columns
+                   |a, b| (a.0 + b.0, a.1 + b.1));
+assert_eq!(sums, (0 + 5 + 16 + 8, 1 + 6 + 2 + 9));
+

Note: unlike a sequential fold operation, the order in +which op will be applied to reduce the result is not fully +specified. So op should be associative or else the results +will be non-deterministic. And of course identity() should +produce a true identity.

+
source

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned.

+

This version of reduce is simple but somewhat less +efficient. If possible, it is better to call reduce(), which +requires an identity element.

+
§Examples
+
use rayon::prelude::*;
+let sums = [(0, 1), (5, 6), (16, 2), (8, 9)]
+           .par_iter()        // iterating over &(i32, i32)
+           .cloned()          // iterating over (i32, i32)
+           .reduce_with(|a, b| (a.0 + b.0, a.1 + b.1))
+           .unwrap();
+assert_eq!(sums, (0 + 5 + 16 + 8, 1 + 6 + 2 + 9));
+

Note: unlike a sequential fold operation, the order in +which op will be applied to reduce the result is not fully +specified. So op should be associative or else the results +will be non-deterministic.

+
source

fn try_reduce<T, OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(T, T) -> Self::Item + Sync + Send, + ID: Fn() -> T + Sync + Send, + Self::Item: Try<Output = T>,

Reduces the items in the iterator into one item using a fallible op. +The identity argument is used the same way as in reduce().

+

If a Result::Err or Option::None item is found, or if op reduces +to one, we will attempt to stop processing the rest of the items in the +iterator as soon as possible, and we will return that terminating value. +Otherwise, we will return the final reduced Result::Ok(T) or +Option::Some(T). If there are multiple errors in parallel, it is not +specified which will be returned.

+
§Examples
+
use rayon::prelude::*;
+
+// Compute the sum of squares, being careful about overflow.
+fn sum_squares<I: IntoParallelIterator<Item = i32>>(iter: I) -> Option<i32> {
+    iter.into_par_iter()
+        .map(|i| i.checked_mul(i))            // square each item,
+        .try_reduce(|| 0, i32::checked_add)   // and add them up!
+}
+assert_eq!(sum_squares(0..5), Some(0 + 1 + 4 + 9 + 16));
+
+// The sum might overflow
+assert_eq!(sum_squares(0..10_000), None);
+
+// Or the squares might overflow before it even reaches `try_reduce`
+assert_eq!(sum_squares(1_000_000..1_000_001), None);
+
source

fn try_reduce_with<T, OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(T, T) -> Self::Item + Sync + Send, + Self::Item: Try<Output = T>,

Reduces the items in the iterator into one item using a fallible op.

+

Like reduce_with(), if the iterator is empty, None is returned; +otherwise, Some is returned. Beyond that, it behaves like +try_reduce() for handling Err/None.

+

For instance, with Option items, the return value may be:

+
    +
  • None, the iterator was empty
  • +
  • Some(None), we stopped after encountering None.
  • +
  • Some(Some(x)), the entire iterator reduced to x.
  • +
+

With Result items, the nesting is more obvious:

+
    +
  • None, the iterator was empty
  • +
  • Some(Err(e)), we stopped after encountering an error e.
  • +
  • Some(Ok(x)), the entire iterator reduced to x.
  • +
+
§Examples
+
use rayon::prelude::*;
+
+let files = ["/dev/null", "/does/not/exist"];
+
+// Find the biggest file
+files.into_par_iter()
+    .map(|path| std::fs::metadata(path).map(|m| (path, m.len())))
+    .try_reduce_with(|a, b| {
+        Ok(if a.1 >= b.1 { a } else { b })
+    })
+    .expect("Some value, since the iterator is not empty")
+    .expect_err("not found");
+
source

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur.

+

So if we did the same parallel fold (fold(0, |a,b| a+b)) on +our example list, we might wind up with a sequence of two numbers, +like so:

+
22 3 77 89 46
+      |     |
+    102   135
+
+

Or perhaps these three numbers:

+
22 3 77 89 46
+      |  |  |
+    102 89 46
+
+

In general, Rayon will attempt to find good breaking points +that keep all of your cores busy.

+
§Fold versus reduce
+

The fold() and reduce() methods each take an identity element +and a combining function, but they operate rather differently.

+

reduce() requires that the identity function has the same +type as the things you are iterating over, and it fully +reduces the list of items into a single item. So, for example, +imagine we are iterating over a list of bytes bytes: [128_u8, 64_u8, 64_u8]. If we used bytes.reduce(|| 0_u8, |a: u8, b: u8| a + b), we would get an overflow. This is because 0, +a, and b here are all bytes, just like the numbers in the +list (I wrote the types explicitly above, but those are the +only types you can use). To avoid the overflow, we would need +to do something like bytes.map(|b| b as u32).reduce(|| 0, |a, b| a + b), in which case our result would be 256.

+

In contrast, with fold(), the identity function does not +have to have the same type as the things you are iterating +over, and you potentially get back many results. So, if we +continue with the bytes example from the previous paragraph, +we could do bytes.fold(|| 0_u32, |a, b| a + (b as u32)) to +convert our bytes into u32. And of course we might not get +back a single sum.

+

There is a more subtle distinction as well, though it’s +actually implied by the above points. When you use reduce(), +your reduction function is sometimes called with values that +were never part of your original parallel iterator (for +example, both the left and right might be a partial sum). With +fold(), in contrast, the left value in the fold function is +always the accumulator, and the right value is always from +your original sequence.

+
§Fold vs Map/Reduce
+

Fold makes sense if you have some operation where it is +cheaper to create groups of elements at a time. For example, +imagine collecting characters into a string. If you were going +to use map/reduce, you might try this:

+ +
use rayon::prelude::*;
+
+let s =
+    ['a', 'b', 'c', 'd', 'e']
+    .par_iter()
+    .map(|c: &char| format!("{}", c))
+    .reduce(|| String::new(),
+            |mut a: String, b: String| { a.push_str(&b); a });
+
+assert_eq!(s, "abcde");
+

Because reduce produces the same type of element as its input, +you have to first map each character into a string, and then +you can reduce them. This means we create one string per +element in our iterator – not so great. Using fold, we can +do this instead:

+ +
use rayon::prelude::*;
+
+let s =
+    ['a', 'b', 'c', 'd', 'e']
+    .par_iter()
+    .fold(|| String::new(),
+            |mut s: String, c: &char| { s.push(*c); s })
+    .reduce(|| String::new(),
+            |mut a: String, b: String| { a.push_str(&b); a });
+
+assert_eq!(s, "abcde");
+

Now fold will process groups of our characters at a time, +and we only make one string per group. We should wind up with +some small-ish number of strings roughly proportional to the +number of CPUs you have (it will ultimately depend on how busy +your processors are). Note that we still need to do a reduce +afterwards to combine those groups of strings into a single +string.

+

You could use a similar trick to save partial results (e.g., a +cache) or something similar.

+
§Combining fold with other operations
+

You can combine fold with reduce if you want to produce a +single value. This is then roughly equivalent to a map/reduce +combination in effect:

+ +
use rayon::prelude::*;
+
+let bytes = 0..22_u8;
+let sum = bytes.into_par_iter()
+               .fold(|| 0_u32, |a: u32, b: u8| a + (b as u32))
+               .sum::<u32>();
+
+assert_eq!(sum, (0..22).sum()); // compare to sequential
+
source

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use.

+

This works essentially like fold(|| init.clone(), fold_op), except +it doesn’t require the init type to be Sync, nor any other form +of added synchronization.

+
§Examples
+
use rayon::prelude::*;
+
+let bytes = 0..22_u8;
+let sum = bytes.into_par_iter()
+               .fold_with(0_u32, |a: u32, b: u8| a + (b as u32))
+               .sum::<u32>();
+
+assert_eq!(sum, (0..22).sum()); // compare to sequential
+
source

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold.

+

This is a variation of fold() for operations which can fail with +Option::None or Result::Err. The first such failure stops +processing the local set of items, without affecting other folds in the +iterator’s subdivisions.

+

Often, try_fold() will be followed by try_reduce() +for a final reduction and global short-circuiting effect.

+
§Examples
+
use rayon::prelude::*;
+
+let bytes = 0..22_u8;
+let sum = bytes.into_par_iter()
+               .try_fold(|| 0_u32, |a: u32, b: u8| a.checked_add(b as u32))
+               .try_reduce(|| 0, u32::checked_add);
+
+assert_eq!(sum, Some((0..22).sum())); // compare to sequential
+
source

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value.

+

This combines the init semantics of fold_with() and the failure +semantics of try_fold().

+ +
use rayon::prelude::*;
+
+let bytes = 0..22_u8;
+let sum = bytes.into_par_iter()
+               .try_fold_with(0_u32, |a: u32, b: u8| a.checked_add(b as u32))
+               .try_reduce(|| 0, u32::checked_add);
+
+assert_eq!(sum, Some((0..22).sum())); // compare to sequential
+
source

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator.

+

Note that the order in items will be reduced is not specified, +so if the + operator is not truly associative (as is the +case for floating point numbers), then the results are not +fully deterministic.

+

Basically equivalent to self.reduce(|| 0, |a, b| a + b), +except that the type of 0 and the + operation may vary +depending on the type of value being produced.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 5, 7];
+
+let sum: i32 = a.par_iter().sum();
+
+assert_eq!(sum, 13);
+
source

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator.

+

Note that the order in items will be reduced is not specified, +so if the * operator is not truly associative (as is the +case for floating point numbers), then the results are not +fully deterministic.

+

Basically equivalent to self.reduce(|| 1, |a, b| a * b), +except that the type of 1 and the * operation may vary +depending on the type of value being produced.

+
§Examples
+
use rayon::prelude::*;
+
+fn factorial(n: u32) -> u32 {
+   (1..n+1).into_par_iter().product()
+}
+
+assert_eq!(factorial(0), 1);
+assert_eq!(factorial(1), 1);
+assert_eq!(factorial(5), 120);
+
source

fn min(self) -> Option<Self::Item>
where + Self::Item: Ord,

Computes the minimum of all the items in the iterator. If the +iterator is empty, None is returned; otherwise, Some(min) +is returned.

+

Note that the order in which the items will be reduced is not +specified, so if the Ord impl is not truly associative, then +the results are not deterministic.

+

Basically equivalent to self.reduce_with(|a, b| Ord::min(a, b)).

+
§Examples
+
use rayon::prelude::*;
+
+let a = [45, 74, 32];
+
+assert_eq!(a.par_iter().min(), Some(&32));
+
+let b: [i32; 0] = [];
+
+assert_eq!(b.par_iter().min(), None);
+
source

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned.

+

Note that the order in which the items will be reduced is not +specified, so if the comparison function is not associative, then +the results are not deterministic.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [-3_i32, 77, 53, 240, -1];
+
+assert_eq!(a.par_iter().min_by(|x, y| x.cmp(y)), Some(&-3));
+
source

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned.

+

Note that the order in which the items will be reduced is not +specified, so if the Ord impl is not truly associative, then +the results are not deterministic.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [-3_i32, 34, 2, 5, -10, -3, -23];
+
+assert_eq!(a.par_iter().min_by_key(|x| x.abs()), Some(&2));
+
source

fn max(self) -> Option<Self::Item>
where + Self::Item: Ord,

Computes the maximum of all the items in the iterator. If the +iterator is empty, None is returned; otherwise, Some(max) +is returned.

+

Note that the order in which the items will be reduced is not +specified, so if the Ord impl is not truly associative, then +the results are not deterministic.

+

Basically equivalent to self.reduce_with(|a, b| Ord::max(a, b)).

+
§Examples
+
use rayon::prelude::*;
+
+let a = [45, 74, 32];
+
+assert_eq!(a.par_iter().max(), Some(&74));
+
+let b: [i32; 0] = [];
+
+assert_eq!(b.par_iter().max(), None);
+
source

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned.

+

Note that the order in which the items will be reduced is not +specified, so if the comparison function is not associative, then +the results are not deterministic.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [-3_i32, 77, 53, 240, -1];
+
+assert_eq!(a.par_iter().max_by(|x, y| x.abs().cmp(&y.abs())), Some(&240));
+
source

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned.

+

Note that the order in which the items will be reduced is not +specified, so if the Ord impl is not truly associative, then +the results are not deterministic.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [-3_i32, 34, 2, 5, -10, -3, -23];
+
+assert_eq!(a.par_iter().max_by_key(|x| x.abs()), Some(&34));
+
source

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [0, 1, 2];
+let b = [9, 8, 7];
+
+let par_iter = a.par_iter().chain(b.par_iter());
+
+let chained: Vec<_> = par_iter.cloned().collect();
+
+assert_eq!(&chained[..], &[0, 1, 2, 9, 8, 7]);
+
source

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel.

+

Once a match is found, we will attempt to stop processing +the rest of the items in the iterator as soon as possible +(just as find stops iterating once a match is found).

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3, 3];
+
+assert_eq!(a.par_iter().find_any(|&&x| x == 3), Some(&3));
+
+assert_eq!(a.par_iter().find_any(|&&x| x == 100), None);
+
source

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it.

+

Once a match is found, all attempts to the right of the match +will be stopped, while attempts to the left must continue in case +an earlier match is found.

+

For added performance, you might consider using find_first in conjunction with +by_exponential_blocks().

+

Note that not all parallel iterators have a useful order, much like +sequential HashMap iteration, so “first” may be nebulous. If you +just want the first match that discovered anywhere in the iterator, +find_any is a better choice.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3, 3];
+
+assert_eq!(a.par_iter().find_first(|&&x| x == 3), Some(&3));
+
+assert_eq!(a.par_iter().find_first(|&&x| x == 100), None);
+
source

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it.

+

Once a match is found, all attempts to the left of the match +will be stopped, while attempts to the right must continue in case +a later match is found.

+

Note that not all parallel iterators have a useful order, much like +sequential HashMap iteration, so “last” may be nebulous. When the +order doesn’t actually matter to you, find_any is a better choice.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [1, 2, 3, 3];
+
+assert_eq!(a.par_iter().find_last(|&&x| x == 3), Some(&3));
+
+assert_eq!(a.par_iter().find_last(|&&x| x == 100), None);
+
source

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation.

+

Once a non-None value is produced from the map operation, we will +attempt to stop processing the rest of the items in the iterator +as soon as possible.

+

Note that this method only returns some item in the parallel +iterator that is not None from the map predicate. The item returned +may not be the first non-None value produced in the parallel +sequence, since the entire sequence is mapped over in parallel.

+
§Examples
+
use rayon::prelude::*;
+
+let c = ["lol", "NaN", "5", "5"];
+
+let found_number = c.par_iter().find_map_any(|s| s.parse().ok());
+
+assert_eq!(found_number, Some(5));
+
source

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation.

+

Once a non-None value is produced from the map operation, all attempts +to the right of the match will be stopped, while attempts to the left +must continue in case an earlier match is found.

+

Note that not all parallel iterators have a useful order, much like +sequential HashMap iteration, so “first” may be nebulous. If you +just want the first non-None value discovered anywhere in the iterator, +find_map_any is a better choice.

+
§Examples
+
use rayon::prelude::*;
+
+let c = ["lol", "NaN", "2", "5"];
+
+let first_number = c.par_iter().find_map_first(|s| s.parse().ok());
+
+assert_eq!(first_number, Some(2));
+
source

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation.

+

Once a non-None value is produced from the map operation, all attempts +to the left of the match will be stopped, while attempts to the right +must continue in case a later match is found.

+

Note that not all parallel iterators have a useful order, much like +sequential HashMap iteration, so “first” may be nebulous. If you +just want the first non-None value discovered anywhere in the iterator, +find_map_any is a better choice.

+
§Examples
+
use rayon::prelude::*;
+
+let c = ["lol", "NaN", "2", "5"];
+
+let last_number = c.par_iter().find_map_last(|s| s.parse().ok());
+
+assert_eq!(last_number, Some(5));
+
source

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [0, 12, 3, 4, 0, 23, 0];
+
+let is_valid = a.par_iter().any(|&x| x > 10);
+
+assert!(is_valid);
+
source

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [0, 12, 3, 4, 0, 23, 0];
+
+let is_valid = a.par_iter().all(|&x| x > 10);
+
+assert!(!is_valid);
+
source

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found.

+
§Examples
+
use rayon::prelude::*;
+use std::sync::atomic::{AtomicUsize, Ordering};
+
+let counter = AtomicUsize::new(0);
+let value = (0_i32..2048)
+    .into_par_iter()
+    .map(|x| {
+             counter.fetch_add(1, Ordering::SeqCst);
+             if x < 1024 { Some(x) } else { None }
+         })
+    .while_some()
+    .max();
+
+assert!(value < Some(1024));
+assert!(counter.load(Ordering::SeqCst) < 2048); // should not have visited every single one
+
source

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible.

+

Panics within parallel iterators are always propagated to the caller, +but they don’t always halt the rest of the iterator right away, due to +the internal semantics of join. This adaptor makes a greater effort +to stop processing other items sooner, with the cost of additional +synchronization overhead, which may also inhibit some optimizations.

+
§Examples
+

If this code didn’t use panic_fuse(), it would continue processing +many more items in other threads (with long sleep delays) before the +panic is finally propagated.

+ +
use rayon::prelude::*;
+use std::{thread, time};
+
+(0..1_000_000)
+    .into_par_iter()
+    .panic_fuse()
+    .for_each(|i| {
+        // simulate some work
+        thread::sleep(time::Duration::from_secs(1));
+        assert!(i > 0); // oops!
+    });
+
source

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator.

+

You may prefer collect_into_vec() implemented on +IndexedParallelIterator, if your underlying iterator also implements +it. collect_into_vec() allocates efficiently with precise knowledge +of how many elements the iterator contains, and even allows you to reuse +an existing vector’s backing store rather than allocating a fresh vector.

+

See also collect_vec_list() for collecting +into a LinkedList<Vec<T>>.

+
§Examples
+
use rayon::prelude::*;
+
+let sync_vec: Vec<_> = (0..100).into_iter().collect();
+
+let async_vec: Vec<_> = (0..100).into_par_iter().collect();
+
+assert_eq!(sync_vec, async_vec);
+

You can collect a pair of collections like unzip +for paired items:

+ +
use rayon::prelude::*;
+
+let a = [(0, 1), (1, 2), (2, 3), (3, 4)];
+let (first, second): (Vec<_>, Vec<_>) = a.into_par_iter().collect();
+
+assert_eq!(first, [0, 1, 2, 3]);
+assert_eq!(second, [1, 2, 3, 4]);
+

Or like partition_map for Either items:

+ +
use rayon::prelude::*;
+use rayon::iter::Either;
+
+let (left, right): (Vec<_>, Vec<_>) = (0..8).into_par_iter().map(|x| {
+    if x % 2 == 0 {
+        Either::Left(x * 4)
+    } else {
+        Either::Right(x * 3)
+    }
+}).collect();
+
+assert_eq!(left, [0, 8, 16, 24]);
+assert_eq!(right, [3, 9, 15, 21]);
+

You can even collect an arbitrarily-nested combination of pairs and Either:

+ +
use rayon::prelude::*;
+use rayon::iter::Either;
+
+let (first, (left, right)): (Vec<_>, (Vec<_>, Vec<_>))
+    = (0..8).into_par_iter().map(|x| {
+        if x % 2 == 0 {
+            (x, Either::Left(x * 4))
+        } else {
+            (-x, Either::Right(x * 3))
+        }
+    }).collect();
+
+assert_eq!(first, [0, -1, 2, -3, 4, -5, 6, -7]);
+assert_eq!(left, [0, 8, 16, 24]);
+assert_eq!(right, [3, 9, 15, 21]);
+

All of that can also be combined with short-circuiting collection of +Result or Option types:

+ +
use rayon::prelude::*;
+use rayon::iter::Either;
+
+let result: Result<(Vec<_>, (Vec<_>, Vec<_>)), _>
+    = (0..8).into_par_iter().map(|x| {
+        if x > 5 {
+            Err(x)
+        } else if x % 2 == 0 {
+            Ok((x, Either::Left(x * 4)))
+        } else {
+            Ok((-x, Either::Right(x * 3)))
+        }
+    }).collect();
+
+let error = result.unwrap_err();
+assert!(error == 6 || error == 7);
+
source

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers.

+

You may prefer to use unzip_into_vecs(), which allocates more +efficiently with precise knowledge of how many elements the +iterator contains, and even allows you to reuse existing +vectors’ backing stores rather than allocating fresh vectors.

+
§Examples
+
use rayon::prelude::*;
+
+let a = [(0, 1), (1, 2), (2, 3), (3, 4)];
+
+let (left, right): (Vec<_>, Vec<_>) = a.par_iter().cloned().unzip();
+
+assert_eq!(left, [0, 1, 2, 3]);
+assert_eq!(right, [1, 2, 3, 4]);
+

Nested pairs can be unzipped too.

+ +
use rayon::prelude::*;
+
+let (values, (squares, cubes)): (Vec<_>, (Vec<_>, Vec<_>)) = (0..4).into_par_iter()
+    .map(|i| (i, (i * i, i * i * i)))
+    .unzip();
+
+assert_eq!(values, [0, 1, 2, 3]);
+assert_eq!(squares, [0, 1, 4, 9]);
+assert_eq!(cubes, [0, 1, 8, 27]);
+
source

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second.

+

Note: unlike the standard Iterator::partition, this allows distinct +collection types for the left and right items. This is more flexible, +but may require new type annotations when converting sequential code +that used type inference assuming the two were the same.

+
§Examples
+
use rayon::prelude::*;
+
+let (left, right): (Vec<_>, Vec<_>) = (0..8).into_par_iter().partition(|x| x % 2 == 0);
+
+assert_eq!(left, [0, 2, 4, 6]);
+assert_eq!(right, [1, 3, 5, 7]);
+
source

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second.

+
§Examples
+
use rayon::prelude::*;
+use rayon::iter::Either;
+
+let (left, right): (Vec<_>, Vec<_>) = (0..8).into_par_iter()
+    .partition_map(|x| {
+        if x % 2 == 0 {
+            Either::Left(x * 4)
+        } else {
+            Either::Right(x * 3)
+        }
+    });
+
+assert_eq!(left, [0, 8, 16, 24]);
+assert_eq!(right, [3, 9, 15, 21]);
+

Nested Either enums can be split as well.

+ +
use rayon::prelude::*;
+use rayon::iter::Either::*;
+
+let ((fizzbuzz, fizz), (buzz, other)): ((Vec<_>, Vec<_>), (Vec<_>, Vec<_>)) = (1..20)
+    .into_par_iter()
+    .partition_map(|x| match (x % 3, x % 5) {
+        (0, 0) => Left(Left(x)),
+        (0, _) => Left(Right(x)),
+        (_, 0) => Right(Left(x)),
+        (_, _) => Right(Right(x)),
+    });
+
+assert_eq!(fizzbuzz, [15]);
+assert_eq!(fizz, [3, 6, 9, 12, 18]);
+assert_eq!(buzz, [5, 10]);
+assert_eq!(other, [1, 2, 4, 7, 8, 11, 13, 14, 16, 17, 19]);
+
source

fn intersperse(self, element: Self::Item) -> Intersperse<Self>
where + Self::Item: Clone,

Intersperses clones of an element between items of this iterator.

+
§Examples
+
use rayon::prelude::*;
+
+let x = vec![1, 2, 3];
+let r: Vec<_> = x.into_par_iter().intersperse(-1).collect();
+
+assert_eq!(r, vec![1, -1, 2, -1, 3]);
+
source

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator.

+

This is similar to IndexedParallelIterator::take without being +constrained to the “first” n of the original iterator order. The +taken items will still maintain their relative order where that is +visible in collect, reduce, and similar outputs.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (0..100)
+    .into_par_iter()
+    .filter(|&x| x % 2 == 0)
+    .take_any(5)
+    .collect();
+
+assert_eq!(result.len(), 5);
+assert!(result.windows(2).all(|w| w[0] < w[1]));
+
source

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator.

+

This is similar to IndexedParallelIterator::skip without being +constrained to the “first” n of the original iterator order. The +remaining items will still maintain their relative order where that is +visible in collect, reduce, and similar outputs.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (0..100)
+    .into_par_iter()
+    .filter(|&x| x % 2 == 0)
+    .skip_any(5)
+    .collect();
+
+assert_eq!(result.len(), 45);
+assert!(result.windows(2).all(|w| w[0] < w[1]));
+
source

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false.

+

The predicate may be anything – e.g. it could be checking a fact about the item, a +global condition unrelated to the item itself, or some combination thereof.

+

If parallel calls to the predicate race and give different results, then the +true results will still take those particular items, while respecting the false +result from elsewhere to skip any further items.

+

This is similar to Iterator::take_while without being constrained to the original +iterator order. The taken items will still maintain their relative order where that is +visible in collect, reduce, and similar outputs.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (0..100)
+    .into_par_iter()
+    .take_any_while(|x| *x < 50)
+    .collect();
+
+assert!(result.len() <= 50);
+assert!(result.windows(2).all(|w| w[0] < w[1]));
+ +
use rayon::prelude::*;
+use std::sync::atomic::AtomicUsize;
+use std::sync::atomic::Ordering::Relaxed;
+
+// Collect any group of items that sum <= 1000
+let quota = AtomicUsize::new(1000);
+let result: Vec<_> = (0_usize..100)
+    .into_par_iter()
+    .take_any_while(|&x| {
+        quota.fetch_update(Relaxed, Relaxed, |q| q.checked_sub(x))
+            .is_ok()
+    })
+    .collect();
+
+let sum = result.iter().sum::<usize>();
+assert!(matches!(sum, 902..=1000));
+
source

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false.

+

The predicate may be anything – e.g. it could be checking a fact about the item, a +global condition unrelated to the item itself, or some combination thereof.

+

If parallel calls to the predicate race and give different results, then the +true results will still skip those particular items, while respecting the false +result from elsewhere to skip any further items.

+

This is similar to Iterator::skip_while without being constrained to the original +iterator order. The remaining items will still maintain their relative order where that is +visible in collect, reduce, and similar outputs.

+
§Examples
+
use rayon::prelude::*;
+
+let result: Vec<_> = (0..100)
+    .into_par_iter()
+    .skip_any_while(|x| *x < 50)
+    .collect();
+
+assert!(result.len() >= 50);
+assert!(result.windows(2).all(|w| w[0] < w[1]));
+
source

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors.

+

This is useful when you need to condense a parallel iterator into a collection, +but have no specific requirements for what that collection should be. If you +plan to store the collection longer-term, Vec<T> is, as always, likely the +best default choice, despite the overhead that comes from concatenating each +vector. Or, if this is an IndexedParallelIterator, you should also prefer to +just collect to a Vec<T>.

+

Internally, most FromParallelIterator/ParallelExtend implementations +use this strategy; each job collecting their chunk of the iterator to a Vec<T> +and those chunks getting merged into a LinkedList, before then extending the +collection with each vector. This is a very efficient way to collect an +unindexed parallel iterator, without much intermediate data movement.

+
§Examples
+
use rayon::prelude::*;
+
+let result: LinkedList<Vec<_>> = (0..=100)
+    .into_par_iter()
+    .filter(|x| x % 2 == 0)
+    .flat_map(|x| 0..x)
+    .collect_vec_list();
+
+// `par_iter.collect_vec_list().into_iter().flatten()` turns
+// a parallel iterator into a serial one
+let total_len = result.into_iter().flatten().count();
+assert_eq!(total_len, 2550);
+
source

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly.

+

Returns the number of items produced by this iterator, if known +statically. This can be used by consumers to trigger special fast +paths. Therefore, if Some(_) is returned, this iterator must only +use the (indexed) Consumer methods when driving a consumer, such +as split_at(). Calling UnindexedConsumer::split_off_left() or +other UnindexedConsumer methods – or returning an inaccurate +value – may result in panics.

+

This method is currently used to optimize collect for want +of true Rust specialization; it may be removed when +specialization is stable.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ParallelIterator for rayon::range::Iter<char>

§

type Item = char

source§

impl ParallelIterator for rayon::range_inclusive::Iter<char>

§

type Item = char

source§

impl<'a> ParallelIterator for rayon::string::Drain<'a>

§

type Item = char

source§

impl<'a, K: Ord + Sync + 'a, V: Send + 'a> ParallelIterator for rayon::collections::btree_map::IterMut<'a, K, V>

source§

impl<'a, K: Ord + Sync + 'a, V: Sync + 'a> ParallelIterator for rayon::collections::btree_map::Iter<'a, K, V>

§

type Item = (&'a K, &'a V)

source§

impl<'a, K: Hash + Eq + Sync + 'a, V: Send + 'a> ParallelIterator for rayon::collections::hash_map::IterMut<'a, K, V>

source§

impl<'a, K: Hash + Eq + Sync + 'a, V: Sync + 'a> ParallelIterator for rayon::collections::hash_map::Iter<'a, K, V>

§

type Item = (&'a K, &'a V)

source§

impl<'a, T, I> ParallelIterator for Cloned<I>
where + I: ParallelIterator<Item = &'a T>, + T: 'a + Clone + Send + Sync,

§

type Item = T

source§

impl<'a, T, I> ParallelIterator for Copied<I>
where + I: ParallelIterator<Item = &'a T>, + T: 'a + Copy + Send + Sync,

§

type Item = T

source§

impl<'a, T: Ord + Send> ParallelIterator for rayon::collections::binary_heap::Drain<'a, T>

§

type Item = T

source§

impl<'a, T: Ord + Sync + 'a> ParallelIterator for rayon::collections::binary_heap::Iter<'a, T>

§

type Item = &'a T

source§

impl<'a, T: Ord + Sync + 'a> ParallelIterator for rayon::collections::btree_set::Iter<'a, T>

§

type Item = &'a T

source§

impl<'a, T: Hash + Eq + Sync + 'a> ParallelIterator for rayon::collections::hash_set::Iter<'a, T>

§

type Item = &'a T

source§

impl<'a, T: Send + 'a> ParallelIterator for rayon::collections::linked_list::IterMut<'a, T>

source§

impl<'a, T: Send + 'a> ParallelIterator for rayon::collections::vec_deque::IterMut<'a, T>

source§

impl<'a, T: Send + 'a> ParallelIterator for rayon::option::IterMut<'a, T>

source§

impl<'a, T: Send + 'a> ParallelIterator for rayon::result::IterMut<'a, T>

source§

impl<'a, T: Send> ParallelIterator for rayon::collections::vec_deque::Drain<'a, T>

§

type Item = T

source§

impl<'a, T: Sync + 'a> ParallelIterator for rayon::collections::linked_list::Iter<'a, T>

§

type Item = &'a T

source§

impl<'a, T: Sync + 'a> ParallelIterator for rayon::collections::vec_deque::Iter<'a, T>

§

type Item = &'a T

source§

impl<'a, T: Sync + 'a> ParallelIterator for rayon::option::Iter<'a, T>

§

type Item = &'a T

source§

impl<'a, T: Sync + 'a> ParallelIterator for rayon::result::Iter<'a, T>

§

type Item = &'a T

source§

impl<'ch> ParallelIterator for Bytes<'ch>

§

type Item = u8

source§

impl<'ch> ParallelIterator for CharIndices<'ch>

§

type Item = (usize, char)

source§

impl<'ch> ParallelIterator for Chars<'ch>

§

type Item = char

source§

impl<'ch> ParallelIterator for EncodeUtf16<'ch>

§

type Item = u16

source§

impl<'ch> ParallelIterator for Lines<'ch>

§

type Item = &'ch str

source§

impl<'ch> ParallelIterator for SplitAsciiWhitespace<'ch>

§

type Item = &'ch str

source§

impl<'ch> ParallelIterator for SplitWhitespace<'ch>

§

type Item = &'ch str

source§

impl<'ch, P: Pattern> ParallelIterator for MatchIndices<'ch, P>

§

type Item = (usize, &'ch str)

source§

impl<'ch, P: Pattern> ParallelIterator for Matches<'ch, P>

§

type Item = &'ch str

source§

impl<'ch, P: Pattern> ParallelIterator for rayon::str::Split<'ch, P>

§

type Item = &'ch str

source§

impl<'ch, P: Pattern> ParallelIterator for rayon::str::SplitInclusive<'ch, P>

§

type Item = &'ch str

source§

impl<'ch, P: Pattern> ParallelIterator for SplitTerminator<'ch, P>

§

type Item = &'ch str

source§

impl<'data, T, P> ParallelIterator for ChunkBy<'data, T, P>
where + T: Sync, + P: Fn(&T, &T) -> bool + Send + Sync,

§

type Item = &'data [T]

source§

impl<'data, T, P> ParallelIterator for ChunkByMut<'data, T, P>
where + T: Send, + P: Fn(&T, &T) -> bool + Send + Sync,

§

type Item = &'data mut [T]

source§

impl<'data, T, P> ParallelIterator for rayon::slice::Split<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Sync,

§

type Item = &'data [T]

source§

impl<'data, T, P> ParallelIterator for rayon::slice::SplitInclusive<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Sync,

§

type Item = &'data [T]

source§

impl<'data, T, P> ParallelIterator for SplitInclusiveMut<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Send,

§

type Item = &'data mut [T]

source§

impl<'data, T, P> ParallelIterator for SplitMut<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Send,

§

type Item = &'data mut [T]

source§

impl<'data, T: Send + 'data> ParallelIterator for ChunksExactMut<'data, T>

§

type Item = &'data mut [T]

source§

impl<'data, T: Send + 'data> ParallelIterator for ChunksMut<'data, T>

§

type Item = &'data mut [T]

source§

impl<'data, T: Send + 'data> ParallelIterator for rayon::slice::IterMut<'data, T>

source§

impl<'data, T: Send + 'data> ParallelIterator for RChunksExactMut<'data, T>

§

type Item = &'data mut [T]

source§

impl<'data, T: Send + 'data> ParallelIterator for RChunksMut<'data, T>

§

type Item = &'data mut [T]

source§

impl<'data, T: Send> ParallelIterator for rayon::vec::Drain<'data, T>

§

type Item = T

source§

impl<'data, T: Sync + 'data> ParallelIterator for rayon::slice::Chunks<'data, T>

§

type Item = &'data [T]

source§

impl<'data, T: Sync + 'data> ParallelIterator for ChunksExact<'data, T>

§

type Item = &'data [T]

source§

impl<'data, T: Sync + 'data> ParallelIterator for rayon::slice::Iter<'data, T>

source§

impl<'data, T: Sync + 'data> ParallelIterator for RChunks<'data, T>

§

type Item = &'data [T]

source§

impl<'data, T: Sync + 'data> ParallelIterator for RChunksExact<'data, T>

§

type Item = &'data [T]

source§

impl<'data, T: Sync + 'data> ParallelIterator for Windows<'data, T>

§

type Item = &'data [T]

source§

impl<A> ParallelIterator for MultiZip<(A,)>

§

type Item = (<A as ParallelIterator>::Item,)

source§

impl<A, B> ParallelIterator for Chain<A, B>
where + A: ParallelIterator, + B: ParallelIterator<Item = A::Item>,

source§

impl<A, B> ParallelIterator for MultiZip<(A, B)>

source§

impl<A, B> ParallelIterator for Zip<A, B>

source§

impl<A, B> ParallelIterator for ZipEq<A, B>

source§

impl<A, B, C> ParallelIterator for MultiZip<(A, B, C)>

source§

impl<A, B, C, D> ParallelIterator for MultiZip<(A, B, C, D)>

source§

impl<A, B, C, D, E> ParallelIterator for MultiZip<(A, B, C, D, E)>

source§

impl<A, B, C, D, E, F> ParallelIterator for MultiZip<(A, B, C, D, E, F)>

source§

impl<A, B, C, D, E, F, G> ParallelIterator for MultiZip<(A, B, C, D, E, F, G)>

source§

impl<A, B, C, D, E, F, G, H> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>

source§

impl<A, B, C, D, E, F, G, H, I> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>

source§

impl<A, B, C, D, E, F, G, H, I, J> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>

source§

impl<A, B, C, D, E, F, G, H, I, J, K> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>

source§

impl<D, S> ParallelIterator for rayon::iter::Split<D, S>
where + D: Send, + S: Fn(D) -> (D, Option<D>) + Sync + Send,

§

type Item = D

source§

impl<I> ParallelIterator for rayon::iter::Chunks<I>

source§

impl<I> ParallelIterator for Enumerate<I>

§

type Item = (usize, <I as ParallelIterator>::Item)

source§

impl<I> ParallelIterator for ExponentialBlocks<I>

source§

impl<I> ParallelIterator for Flatten<I>

source§

impl<I> ParallelIterator for FlattenIter<I>
where + I: ParallelIterator, + I::Item: IntoIterator, + <I::Item as IntoIterator>::Item: Send,

source§

impl<I> ParallelIterator for Intersperse<I>
where + I: ParallelIterator, + I::Item: Clone + Send,

source§

impl<I> ParallelIterator for MaxLen<I>

source§

impl<I> ParallelIterator for MinLen<I>

source§

impl<I> ParallelIterator for PanicFuse<I>
where + I: ParallelIterator,

source§

impl<I> ParallelIterator for Rev<I>

source§

impl<I> ParallelIterator for Skip<I>

source§

impl<I> ParallelIterator for SkipAny<I>
where + I: ParallelIterator,

source§

impl<I> ParallelIterator for StepBy<I>

source§

impl<I> ParallelIterator for Take<I>

source§

impl<I> ParallelIterator for TakeAny<I>
where + I: ParallelIterator,

source§

impl<I> ParallelIterator for UniformBlocks<I>

source§

impl<I, F> ParallelIterator for Inspect<I, F>
where + I: ParallelIterator, + F: Fn(&I::Item) + Sync + Send,

source§

impl<I, F> ParallelIterator for Update<I, F>
where + I: ParallelIterator, + F: Fn(&mut I::Item) + Send + Sync,

source§

impl<I, F, PI> ParallelIterator for FlatMap<I, F>
where + I: ParallelIterator, + F: Fn(I::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

source§

impl<I, F, R> ParallelIterator for Map<I, F>
where + I: ParallelIterator, + F: Fn(I::Item) -> R + Sync + Send, + R: Send,

§

type Item = <F as FnOnce(<I as ParallelIterator>::Item)>::Output

source§

impl<I, F, SI> ParallelIterator for FlatMapIter<I, F>
where + I: ParallelIterator, + F: Fn(I::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

§

type Item = <SI as IntoIterator>::Item

source§

impl<I, ID, U, F> ParallelIterator for FoldChunks<I, ID, F>
where + I: IndexedParallelIterator, + ID: Fn() -> U + Send + Sync, + F: Fn(U, I::Item) -> U + Send + Sync, + U: Send,

§

type Item = U

source§

impl<I, INIT, T, F, R> ParallelIterator for MapInit<I, INIT, F>
where + I: ParallelIterator, + INIT: Fn() -> T + Sync + Send, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

§

type Item = R

source§

impl<I, J> ParallelIterator for Interleave<I, J>

source§

impl<I, J> ParallelIterator for InterleaveShortest<I, J>

source§

impl<I, P> ParallelIterator for Filter<I, P>
where + I: ParallelIterator, + P: Fn(&I::Item) -> bool + Sync + Send,

source§

impl<I, P> ParallelIterator for Positions<I, P>
where + I: IndexedParallelIterator, + P: Fn(I::Item) -> bool + Sync + Send,

§

type Item = usize

source§

impl<I, P> ParallelIterator for SkipAnyWhile<I, P>
where + I: ParallelIterator, + P: Fn(&I::Item) -> bool + Sync + Send,

source§

impl<I, P> ParallelIterator for TakeAnyWhile<I, P>
where + I: ParallelIterator, + P: Fn(&I::Item) -> bool + Sync + Send,

source§

impl<I, P, R> ParallelIterator for FilterMap<I, P>
where + I: ParallelIterator, + P: Fn(I::Item) -> Option<R> + Sync + Send, + R: Send,

§

type Item = R

source§

impl<I, T> ParallelIterator for WhileSome<I>
where + I: ParallelIterator<Item = Option<T>>, + T: Send,

§

type Item = T

source§

impl<I, T, F, R> ParallelIterator for MapWith<I, T, F>
where + I: ParallelIterator, + T: Send + Clone, + F: Fn(&mut T, I::Item) -> R + Sync + Send, + R: Send,

§

type Item = R

source§

impl<I, U, F> ParallelIterator for FoldChunksWith<I, U, F>
where + I: IndexedParallelIterator, + U: Send + Clone, + F: Fn(U, I::Item) -> U + Send + Sync,

§

type Item = U

source§

impl<Iter: Iterator + Send> ParallelIterator for IterBridge<Iter>
where + Iter::Item: Send,

§

type Item = <Iter as Iterator>::Item

source§

impl<K: Ord + Send, V: Send> ParallelIterator for rayon::collections::btree_map::IntoIter<K, V>

§

type Item = (K, V)

source§

impl<K: Hash + Eq + Send, V: Send> ParallelIterator for rayon::collections::hash_map::Drain<'_, K, V>

§

type Item = (K, V)

source§

impl<K: Hash + Eq + Send, V: Send> ParallelIterator for rayon::collections::hash_map::IntoIter<K, V>

§

type Item = (K, V)

source§

impl<L, R> ParallelIterator for Either<L, R>
where + L: ParallelIterator, + R: ParallelIterator<Item = L::Item>,

Either<L, R> is a parallel iterator if both L and R are parallel iterators.

+
source§

impl<S, B, I> ParallelIterator for WalkTree<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S> + Send, + I::IntoIter: DoubleEndedIterator,

§

type Item = S

source§

impl<S, B, I> ParallelIterator for WalkTreePostfix<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S>,

§

type Item = S

source§

impl<S, B, I> ParallelIterator for WalkTreePrefix<S, B>
where + S: Send, + B: Fn(&S) -> I + Send + Sync, + I: IntoIterator<Item = S>, + I::IntoIter: DoubleEndedIterator,

§

type Item = S

source§

impl<T> ParallelIterator for Repeat<T>
where + T: Clone + Send,

§

type Item = T

source§

impl<T> ParallelIterator for RepeatN<T>
where + T: Clone + Send,

§

type Item = T

source§

impl<T: Ord + Send> ParallelIterator for rayon::collections::binary_heap::IntoIter<T>

§

type Item = T

source§

impl<T: Ord + Send> ParallelIterator for rayon::collections::btree_set::IntoIter<T>

§

type Item = T

source§

impl<T: Hash + Eq + Send> ParallelIterator for rayon::collections::hash_set::Drain<'_, T>

§

type Item = T

source§

impl<T: Hash + Eq + Send> ParallelIterator for rayon::collections::hash_set::IntoIter<T>

§

type Item = T

source§

impl<T: Send> ParallelIterator for rayon::collections::linked_list::IntoIter<T>

§

type Item = T

source§

impl<T: Send> ParallelIterator for rayon::collections::vec_deque::IntoIter<T>

§

type Item = T

source§

impl<T: Send> ParallelIterator for rayon::option::IntoIter<T>

§

type Item = T

source§

impl<T: Send> ParallelIterator for rayon::result::IntoIter<T>

§

type Item = T

source§

impl<T: Send> ParallelIterator for rayon::vec::IntoIter<T>

§

type Item = T

source§

impl<T: Send> ParallelIterator for Empty<T>

§

type Item = T

source§

impl<T: Send> ParallelIterator for Once<T>

§

type Item = T

source§

impl<T: Send, const N: usize> ParallelIterator for rayon::array::IntoIter<T, N>

§

type Item = T

source§

impl<T: RangeInteger> ParallelIterator for rayon::range::Iter<T>

§

type Item = T

source§

impl<T: RangeInteger> ParallelIterator for rayon::range_inclusive::Iter<T>

§

type Item = T

source§

impl<U, I, F> ParallelIterator for FoldWith<I, U, F>
where + I: ParallelIterator, + F: Fn(U, I::Item) -> U + Sync + Send, + U: Send + Clone,

§

type Item = U

source§

impl<U, I, F> ParallelIterator for TryFoldWith<I, U, F>
where + I: ParallelIterator, + F: Fn(U::Output, I::Item) -> U + Sync + Send, + U: Try + Send, + U::Output: Clone + Send,

§

type Item = U

source§

impl<U, I, ID, F> ParallelIterator for Fold<I, ID, F>
where + I: ParallelIterator, + F: Fn(U, I::Item) -> U + Sync + Send, + ID: Fn() -> U + Sync + Send, + U: Send,

§

type Item = U

source§

impl<U, I, ID, F> ParallelIterator for TryFold<I, U, ID, F>
where + I: ParallelIterator, + F: Fn(U::Output, I::Item) -> U + Sync + Send, + ID: Fn() -> U::Output + Sync + Send, + U: Try + Send,

§

type Item = U

\ No newline at end of file diff --git a/rayon/iter/try_fold/struct.TryFold.html b/rayon/iter/try_fold/struct.TryFold.html new file mode 100644 index 0000000000..d332c35695 --- /dev/null +++ b/rayon/iter/try_fold/struct.TryFold.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.TryFold.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/try_fold/struct.TryFoldWith.html b/rayon/iter/try_fold/struct.TryFoldWith.html new file mode 100644 index 0000000000..ecc8b47a42 --- /dev/null +++ b/rayon/iter/try_fold/struct.TryFoldWith.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.TryFoldWith.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/update/struct.Update.html b/rayon/iter/update/struct.Update.html new file mode 100644 index 0000000000..6d2a752eb6 --- /dev/null +++ b/rayon/iter/update/struct.Update.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Update.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/walk_tree/fn.walk_tree.html b/rayon/iter/walk_tree/fn.walk_tree.html new file mode 100644 index 0000000000..4d503abc42 --- /dev/null +++ b/rayon/iter/walk_tree/fn.walk_tree.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.walk_tree.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/walk_tree/fn.walk_tree_postfix.html b/rayon/iter/walk_tree/fn.walk_tree_postfix.html new file mode 100644 index 0000000000..7186c5b5d9 --- /dev/null +++ b/rayon/iter/walk_tree/fn.walk_tree_postfix.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.walk_tree_postfix.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/walk_tree/fn.walk_tree_prefix.html b/rayon/iter/walk_tree/fn.walk_tree_prefix.html new file mode 100644 index 0000000000..6e53390a8a --- /dev/null +++ b/rayon/iter/walk_tree/fn.walk_tree_prefix.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/fn.walk_tree_prefix.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/walk_tree/struct.WalkTree.html b/rayon/iter/walk_tree/struct.WalkTree.html new file mode 100644 index 0000000000..94fd666869 --- /dev/null +++ b/rayon/iter/walk_tree/struct.WalkTree.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.WalkTree.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/walk_tree/struct.WalkTreePostfix.html b/rayon/iter/walk_tree/struct.WalkTreePostfix.html new file mode 100644 index 0000000000..cbfbe239f0 --- /dev/null +++ b/rayon/iter/walk_tree/struct.WalkTreePostfix.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.WalkTreePostfix.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/walk_tree/struct.WalkTreePrefix.html b/rayon/iter/walk_tree/struct.WalkTreePrefix.html new file mode 100644 index 0000000000..a52a081afd --- /dev/null +++ b/rayon/iter/walk_tree/struct.WalkTreePrefix.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.WalkTreePrefix.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/while_some/struct.WhileSome.html b/rayon/iter/while_some/struct.WhileSome.html new file mode 100644 index 0000000000..d60fc6cc18 --- /dev/null +++ b/rayon/iter/while_some/struct.WhileSome.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.WhileSome.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/zip/struct.Zip.html b/rayon/iter/zip/struct.Zip.html new file mode 100644 index 0000000000..fb10690dbf --- /dev/null +++ b/rayon/iter/zip/struct.Zip.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.Zip.html...

+ + + \ No newline at end of file diff --git a/rayon/iter/zip_eq/struct.ZipEq.html b/rayon/iter/zip_eq/struct.ZipEq.html new file mode 100644 index 0000000000..3a0b9c78cd --- /dev/null +++ b/rayon/iter/zip_eq/struct.ZipEq.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/iter/struct.ZipEq.html...

+ + + \ No newline at end of file diff --git a/rayon/option/index.html b/rayon/option/index.html new file mode 100644 index 0000000000..0d32fc6698 --- /dev/null +++ b/rayon/option/index.html @@ -0,0 +1,5 @@ +rayon::option - Rust +

Module rayon::option

source ·
Expand description

Parallel iterator types for options

+

You will rarely need to interact with this module directly unless you need +to name one of the iterator types.

+

Structs§

\ No newline at end of file diff --git a/rayon/option/sidebar-items.js b/rayon/option/sidebar-items.js new file mode 100644 index 0000000000..c748af5a29 --- /dev/null +++ b/rayon/option/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["IntoIter","Iter","IterMut"]}; \ No newline at end of file diff --git a/rayon/option/struct.IntoIter.html b/rayon/option/struct.IntoIter.html new file mode 100644 index 0000000000..f9f01701b0 --- /dev/null +++ b/rayon/option/struct.IntoIter.html @@ -0,0 +1,291 @@ +IntoIter in rayon::option - Rust +

Struct rayon::option::IntoIter

source ·
pub struct IntoIter<T: Send> { /* private fields */ }
Expand description

A parallel iterator over the value in Some variant of an Option.

+

The iterator yields one value if the Option is a Some, otherwise none.

+

This struct is created by the into_par_iter function.

+

Trait Implementations§

source§

impl<T: Clone + Send> Clone for IntoIter<T>

source§

fn clone(&self) -> IntoIter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> IndexedParallelIterator for IntoIter<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/option/struct.Iter.html b/rayon/option/struct.Iter.html new file mode 100644 index 0000000000..1d6f71de13 --- /dev/null +++ b/rayon/option/struct.Iter.html @@ -0,0 +1,288 @@ +Iter in rayon::option - Rust +

Struct rayon::option::Iter

source ·
pub struct Iter<'a, T: Sync> { /* private fields */ }
Expand description

A parallel iterator over a reference to the Some variant of an Option.

+

The iterator yields one value if the Option is a Some, otherwise none.

+

This struct is created by the par_iter function.

+

Trait Implementations§

source§

impl<'a, T: Sync> Clone for Iter<'a, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, T: Debug + Sync> Debug for Iter<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Sync + 'a> IndexedParallelIterator for Iter<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Sync + 'a> ParallelIterator for Iter<'a, T>

§

type Item = &'a T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Iter<'a, T>

§

impl<'a, T> RefUnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Iter<'a, T>

§

impl<'a, T> Sync for Iter<'a, T>

§

impl<'a, T> Unpin for Iter<'a, T>

§

impl<'a, T> UnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/option/struct.IterMut.html b/rayon/option/struct.IterMut.html new file mode 100644 index 0000000000..2e37814592 --- /dev/null +++ b/rayon/option/struct.IterMut.html @@ -0,0 +1,287 @@ +IterMut in rayon::option - Rust +

Struct rayon::option::IterMut

source ·
pub struct IterMut<'a, T: Send> { /* private fields */ }
Expand description

A parallel iterator over a mutable reference to the Some variant of an Option.

+

The iterator yields one value if the Option is a Some, otherwise none.

+

This struct is created by the par_iter_mut function.

+

Trait Implementations§

source§

impl<'a, T: Debug + Send> Debug for IterMut<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Send + 'a> IndexedParallelIterator for IterMut<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Send + 'a> ParallelIterator for IterMut<'a, T>

§

type Item = &'a mut T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for IterMut<'a, T>

§

impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for IterMut<'a, T>

§

impl<'a, T> Sync for IterMut<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for IterMut<'a, T>

§

impl<'a, T> !UnwindSafe for IterMut<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/prelude/index.html b/rayon/prelude/index.html new file mode 100644 index 0000000000..367021c553 --- /dev/null +++ b/rayon/prelude/index.html @@ -0,0 +1,5 @@ +rayon::prelude - Rust +

Module rayon::prelude

source ·
Expand description

The rayon prelude imports the various ParallelIterator traits. +The intention is that one can include use rayon::prelude::* and +have easy access to the various traits and methods you will need.

+

Re-exports§

\ No newline at end of file diff --git a/rayon/prelude/sidebar-items.js b/rayon/prelude/sidebar-items.js new file mode 100644 index 0000000000..5244ce01cc --- /dev/null +++ b/rayon/prelude/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/rayon/range/index.html b/rayon/range/index.html new file mode 100644 index 0000000000..de10497060 --- /dev/null +++ b/rayon/range/index.html @@ -0,0 +1,14 @@ +rayon::range - Rust +

Module rayon::range

source ·
Expand description

Parallel iterator types for ranges, +the type for values created by a..b expressions

+

You will rarely need to interact with this module directly unless you have +need to name one of the iterator types.

+ +
use rayon::prelude::*;
+
+let r = (0..100u64).into_par_iter()
+                   .sum();
+
+// compare result with sequential calculation
+assert_eq!((0..100).sum::<u64>(), r);
+

Structs§

  • Parallel iterator over a range, implemented for all integer types and char.
\ No newline at end of file diff --git a/rayon/range/sidebar-items.js b/rayon/range/sidebar-items.js new file mode 100644 index 0000000000..49127419e1 --- /dev/null +++ b/rayon/range/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Iter"]}; \ No newline at end of file diff --git a/rayon/range/struct.Iter.html b/rayon/range/struct.Iter.html new file mode 100644 index 0000000000..c7da5fba73 --- /dev/null +++ b/rayon/range/struct.Iter.html @@ -0,0 +1,580 @@ +Iter in rayon::range - Rust +

Struct rayon::range::Iter

source ·
pub struct Iter<T> { /* private fields */ }
Expand description

Parallel iterator over a range, implemented for all integer types and char.

+

Note: The zip operation requires IndexedParallelIterator +which is not implemented for u64, i64, u128, or i128.

+ +
use rayon::prelude::*;
+
+let p = (0..25usize).into_par_iter()
+                  .zip(0..25usize)
+                  .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+                  .map(|(x, y)| x * y)
+                  .sum::<usize>();
+
+let s = (0..25usize).zip(0..25)
+                  .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+                  .map(|(x, y)| x * y)
+                  .sum();
+
+assert_eq!(p, s);
+

Trait Implementations§

source§

impl<T: Clone> Clone for Iter<T>

source§

fn clone(&self) -> Iter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Iter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: IndexedRangeInteger> IndexedParallelIterator for Iter<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<T>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<T>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl IndexedParallelIterator for Iter<char>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn cmp<I>(self, other: I) -> Ordering
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator, + Self::Item: Ord,

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: RangeInteger> ParallelIterator for Iter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<T>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl ParallelIterator for Iter<char>

§

type Item = char

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min(self) -> Option<Self::Item>
where + Self::Item: Ord,

Computes the minimum of all the items in the iterator. If the +iterator is empty, None is returned; otherwise, Some(min) +is returned. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max(self) -> Option<Self::Item>
where + Self::Item: Ord,

Computes the maximum of all the items in the iterator. If the +iterator is empty, None is returned; otherwise, Some(max) +is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn intersperse(self, element: Self::Item) -> Intersperse<Self>
where + Self::Item: Clone,

Intersperses clones of an element between items of this iterator. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Iter<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for Iter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Iter<T>
where + T: Send,

§

impl<T> Sync for Iter<T>
where + T: Sync,

§

impl<T> Unpin for Iter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Iter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/range_inclusive/index.html b/rayon/range_inclusive/index.html new file mode 100644 index 0000000000..50aea4771f --- /dev/null +++ b/rayon/range_inclusive/index.html @@ -0,0 +1,14 @@ +rayon::range_inclusive - Rust +

Module rayon::range_inclusive

source ·
Expand description

Parallel iterator types for inclusive ranges, +the type for values created by a..=b expressions

+

You will rarely need to interact with this module directly unless you have +need to name one of the iterator types.

+ +
use rayon::prelude::*;
+
+let r = (0..=100u64).into_par_iter()
+                    .sum();
+
+// compare result with sequential calculation
+assert_eq!((0..=100).sum::<u64>(), r);
+

Structs§

  • Parallel iterator over an inclusive range, implemented for all integer types and char.
\ No newline at end of file diff --git a/rayon/range_inclusive/sidebar-items.js b/rayon/range_inclusive/sidebar-items.js new file mode 100644 index 0000000000..49127419e1 --- /dev/null +++ b/rayon/range_inclusive/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Iter"]}; \ No newline at end of file diff --git a/rayon/range_inclusive/struct.Iter.html b/rayon/range_inclusive/struct.Iter.html new file mode 100644 index 0000000000..d17f676cc4 --- /dev/null +++ b/rayon/range_inclusive/struct.Iter.html @@ -0,0 +1,580 @@ +Iter in rayon::range_inclusive - Rust +

Struct rayon::range_inclusive::Iter

source ·
pub struct Iter<T> { /* private fields */ }
Expand description

Parallel iterator over an inclusive range, implemented for all integer types and char.

+

Note: The zip operation requires IndexedParallelIterator +which is only implemented for u8, i8, u16, i16, and char.

+ +
use rayon::prelude::*;
+
+let p = (0..=25u16).into_par_iter()
+                  .zip(0..=25u16)
+                  .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+                  .map(|(x, y)| x * y)
+                  .sum::<u16>();
+
+let s = (0..=25u16).zip(0..=25u16)
+                  .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+                  .map(|(x, y)| x * y)
+                  .sum();
+
+assert_eq!(p, s);
+

Trait Implementations§

source§

impl<T: Clone> Clone for Iter<T>

source§

fn clone(&self) -> Iter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Iter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: IndexedRangeInteger> IndexedParallelIterator for Iter<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<T>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<T>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl IndexedParallelIterator for Iter<char>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn cmp<I>(self, other: I) -> Ordering
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator, + Self::Item: Ord,

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: RangeInteger> ParallelIterator for Iter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<T>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

impl ParallelIterator for Iter<char>

§

type Item = char

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min(self) -> Option<Self::Item>
where + Self::Item: Ord,

Computes the minimum of all the items in the iterator. If the +iterator is empty, None is returned; otherwise, Some(min) +is returned. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max(self) -> Option<Self::Item>
where + Self::Item: Ord,

Computes the maximum of all the items in the iterator. If the +iterator is empty, None is returned; otherwise, Some(max) +is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn intersperse(self, element: Self::Item) -> Intersperse<Self>
where + Self::Item: Clone,

Intersperses clones of an element between items of this iterator. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Iter<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for Iter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Iter<T>
where + T: Send,

§

impl<T> Sync for Iter<T>
where + T: Sync,

§

impl<T> Unpin for Iter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Iter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/result/index.html b/rayon/result/index.html new file mode 100644 index 0000000000..338eda963c --- /dev/null +++ b/rayon/result/index.html @@ -0,0 +1,5 @@ +rayon::result - Rust +

Module rayon::result

source ·
Expand description

Parallel iterator types for results

+

You will rarely need to interact with this module directly unless you need +to name one of the iterator types.

+

Structs§

  • Parallel iterator over a result
  • Parallel iterator over an immutable reference to a result
  • Parallel iterator over a mutable reference to a result
\ No newline at end of file diff --git a/rayon/result/sidebar-items.js b/rayon/result/sidebar-items.js new file mode 100644 index 0000000000..c748af5a29 --- /dev/null +++ b/rayon/result/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["IntoIter","Iter","IterMut"]}; \ No newline at end of file diff --git a/rayon/result/struct.IntoIter.html b/rayon/result/struct.IntoIter.html new file mode 100644 index 0000000000..4ae62461ca --- /dev/null +++ b/rayon/result/struct.IntoIter.html @@ -0,0 +1,289 @@ +IntoIter in rayon::result - Rust +

Struct rayon::result::IntoIter

source ·
pub struct IntoIter<T: Send> { /* private fields */ }
Expand description

Parallel iterator over a result

+

Trait Implementations§

source§

impl<T: Clone + Send> Clone for IntoIter<T>

source§

fn clone(&self) -> IntoIter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> IndexedParallelIterator for IntoIter<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>
where + T: Freeze,

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/result/struct.Iter.html b/rayon/result/struct.Iter.html new file mode 100644 index 0000000000..955b4ba9f9 --- /dev/null +++ b/rayon/result/struct.Iter.html @@ -0,0 +1,286 @@ +Iter in rayon::result - Rust +

Struct rayon::result::Iter

source ·
pub struct Iter<'a, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over an immutable reference to a result

+

Trait Implementations§

source§

impl<'a, T: Sync> Clone for Iter<'a, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, T: Debug + Sync> Debug for Iter<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Sync + 'a> IndexedParallelIterator for Iter<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Sync + 'a> ParallelIterator for Iter<'a, T>

§

type Item = &'a T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Iter<'a, T>

§

impl<'a, T> RefUnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for Iter<'a, T>

§

impl<'a, T> Sync for Iter<'a, T>

§

impl<'a, T> Unpin for Iter<'a, T>

§

impl<'a, T> UnwindSafe for Iter<'a, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/result/struct.IterMut.html b/rayon/result/struct.IterMut.html new file mode 100644 index 0000000000..3de5a3b3ac --- /dev/null +++ b/rayon/result/struct.IterMut.html @@ -0,0 +1,285 @@ +IterMut in rayon::result - Rust +

Struct rayon::result::IterMut

source ·
pub struct IterMut<'a, T: Send> { /* private fields */ }
Expand description

Parallel iterator over a mutable reference to a result

+

Trait Implementations§

source§

impl<'a, T: Debug + Send> Debug for IterMut<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Send + 'a> IndexedParallelIterator for IterMut<'a, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'a, T: Send + 'a> ParallelIterator for IterMut<'a, T>

§

type Item = &'a mut T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for IterMut<'a, T>

§

impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where + T: RefUnwindSafe,

§

impl<'a, T> Send for IterMut<'a, T>

§

impl<'a, T> Sync for IterMut<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for IterMut<'a, T>

§

impl<'a, T> !UnwindSafe for IterMut<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/sidebar-items.js b/rayon/sidebar-items.js new file mode 100644 index 0000000000..ca35b81a7e --- /dev/null +++ b/rayon/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Yield"],"fn":["broadcast","current_num_threads","current_thread_index","in_place_scope","in_place_scope_fifo","join","join_context","max_num_threads","scope","scope_fifo","spawn","spawn_broadcast","spawn_fifo","yield_local","yield_now"],"mod":["array","collections","iter","option","prelude","range","range_inclusive","result","slice","str","string","vec"],"struct":["BroadcastContext","FnContext","Scope","ScopeFifo","ThreadBuilder","ThreadPool","ThreadPoolBuildError","ThreadPoolBuilder"]}; \ No newline at end of file diff --git a/rayon/slice/chunk_by/struct.ChunkBy.html b/rayon/slice/chunk_by/struct.ChunkBy.html new file mode 100644 index 0000000000..f6444d4240 --- /dev/null +++ b/rayon/slice/chunk_by/struct.ChunkBy.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.ChunkBy.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/chunk_by/struct.ChunkByMut.html b/rayon/slice/chunk_by/struct.ChunkByMut.html new file mode 100644 index 0000000000..84e8f68ae9 --- /dev/null +++ b/rayon/slice/chunk_by/struct.ChunkByMut.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.ChunkByMut.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/chunks/struct.Chunks.html b/rayon/slice/chunks/struct.Chunks.html new file mode 100644 index 0000000000..d47dee5282 --- /dev/null +++ b/rayon/slice/chunks/struct.Chunks.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.Chunks.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/chunks/struct.ChunksExact.html b/rayon/slice/chunks/struct.ChunksExact.html new file mode 100644 index 0000000000..b13d0cf5f2 --- /dev/null +++ b/rayon/slice/chunks/struct.ChunksExact.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.ChunksExact.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/chunks/struct.ChunksExactMut.html b/rayon/slice/chunks/struct.ChunksExactMut.html new file mode 100644 index 0000000000..cbdfba4a7d --- /dev/null +++ b/rayon/slice/chunks/struct.ChunksExactMut.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.ChunksExactMut.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/chunks/struct.ChunksMut.html b/rayon/slice/chunks/struct.ChunksMut.html new file mode 100644 index 0000000000..0cdca614e7 --- /dev/null +++ b/rayon/slice/chunks/struct.ChunksMut.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.ChunksMut.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/index.html b/rayon/slice/index.html new file mode 100644 index 0000000000..99a0e8b02a --- /dev/null +++ b/rayon/slice/index.html @@ -0,0 +1,8 @@ +rayon::slice - Rust +

Module rayon::slice

source ·
Expand description

Parallel iterator types for slices

+

You will rarely need to interact with this module directly unless you need +to name one of the iterator types.

+

Structs§

  • Parallel iterator over slice in (non-overlapping) chunks separated by a predicate.
  • Parallel iterator over slice in (non-overlapping) mutable chunks +separated by a predicate.
  • Parallel iterator over immutable non-overlapping chunks of a slice
  • Parallel iterator over immutable non-overlapping chunks of a slice
  • Parallel iterator over mutable non-overlapping chunks of a slice
  • Parallel iterator over mutable non-overlapping chunks of a slice
  • Parallel iterator over immutable items in a slice
  • Parallel iterator over mutable items in a slice
  • Parallel iterator over immutable non-overlapping chunks of a slice, starting at the end.
  • Parallel iterator over immutable non-overlapping chunks of a slice, starting at the end.
  • Parallel iterator over mutable non-overlapping chunks of a slice, starting at the end.
  • Parallel iterator over mutable non-overlapping chunks of a slice, starting at the end.
  • Parallel iterator over slices separated by a predicate
  • Parallel iterator over slices separated by a predicate, +including the matched part as a terminator.
  • Parallel iterator over mutable slices separated by a predicate, +including the matched part as a terminator.
  • Parallel iterator over mutable slices separated by a predicate
  • Parallel iterator over immutable overlapping windows of a slice

Traits§

\ No newline at end of file diff --git a/rayon/slice/rchunks/struct.RChunks.html b/rayon/slice/rchunks/struct.RChunks.html new file mode 100644 index 0000000000..10390d17d8 --- /dev/null +++ b/rayon/slice/rchunks/struct.RChunks.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.RChunks.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/rchunks/struct.RChunksExact.html b/rayon/slice/rchunks/struct.RChunksExact.html new file mode 100644 index 0000000000..1ee69403dd --- /dev/null +++ b/rayon/slice/rchunks/struct.RChunksExact.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.RChunksExact.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/rchunks/struct.RChunksExactMut.html b/rayon/slice/rchunks/struct.RChunksExactMut.html new file mode 100644 index 0000000000..8bb7ea9727 --- /dev/null +++ b/rayon/slice/rchunks/struct.RChunksExactMut.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.RChunksExactMut.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/rchunks/struct.RChunksMut.html b/rayon/slice/rchunks/struct.RChunksMut.html new file mode 100644 index 0000000000..bda6f24450 --- /dev/null +++ b/rayon/slice/rchunks/struct.RChunksMut.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../rayon/slice/struct.RChunksMut.html...

+ + + \ No newline at end of file diff --git a/rayon/slice/sidebar-items.js b/rayon/slice/sidebar-items.js new file mode 100644 index 0000000000..4daee705a7 --- /dev/null +++ b/rayon/slice/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ChunkBy","ChunkByMut","Chunks","ChunksExact","ChunksExactMut","ChunksMut","Iter","IterMut","RChunks","RChunksExact","RChunksExactMut","RChunksMut","Split","SplitInclusive","SplitInclusiveMut","SplitMut","Windows"],"trait":["ParallelSlice","ParallelSliceMut"]}; \ No newline at end of file diff --git a/rayon/slice/struct.ChunkBy.html b/rayon/slice/struct.ChunkBy.html new file mode 100644 index 0000000000..30c30ed73f --- /dev/null +++ b/rayon/slice/struct.ChunkBy.html @@ -0,0 +1,203 @@ +ChunkBy in rayon::slice - Rust +

Struct rayon::slice::ChunkBy

source ·
pub struct ChunkBy<'data, T, P> { /* private fields */ }
Expand description

Parallel iterator over slice in (non-overlapping) chunks separated by a predicate.

+

This struct is created by the par_chunk_by method on &[T].

+

Trait Implementations§

source§

impl<'data, T, P: Clone> Clone for ChunkBy<'data, T, P>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug, P> Debug for ChunkBy<'data, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T, P> ParallelIterator for ChunkBy<'data, T, P>
where + T: Sync, + P: Fn(&T, &T) -> bool + Send + Sync,

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'data, T, P> Freeze for ChunkBy<'data, T, P>
where + P: Freeze,

§

impl<'data, T, P> RefUnwindSafe for ChunkBy<'data, T, P>
where + P: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<'data, T, P> Send for ChunkBy<'data, T, P>
where + P: Send, + T: Sync,

§

impl<'data, T, P> Sync for ChunkBy<'data, T, P>
where + P: Sync, + T: Sync,

§

impl<'data, T, P> Unpin for ChunkBy<'data, T, P>
where + P: Unpin,

§

impl<'data, T, P> UnwindSafe for ChunkBy<'data, T, P>
where + P: UnwindSafe, + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.ChunkByMut.html b/rayon/slice/struct.ChunkByMut.html new file mode 100644 index 0000000000..9328c97ec7 --- /dev/null +++ b/rayon/slice/struct.ChunkByMut.html @@ -0,0 +1,201 @@ +ChunkByMut in rayon::slice - Rust +

Struct rayon::slice::ChunkByMut

source ·
pub struct ChunkByMut<'data, T, P> { /* private fields */ }
Expand description

Parallel iterator over slice in (non-overlapping) mutable chunks +separated by a predicate.

+

This struct is created by the par_chunk_by_mut method on &mut [T].

+

Trait Implementations§

source§

impl<'data, T: Debug, P> Debug for ChunkByMut<'data, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T, P> ParallelIterator for ChunkByMut<'data, T, P>
where + T: Send, + P: Fn(&T, &T) -> bool + Send + Sync,

§

type Item = &'data mut [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'data, T, P> Freeze for ChunkByMut<'data, T, P>
where + P: Freeze,

§

impl<'data, T, P> RefUnwindSafe for ChunkByMut<'data, T, P>
where + P: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<'data, T, P> Send for ChunkByMut<'data, T, P>
where + P: Send, + T: Send,

§

impl<'data, T, P> Sync for ChunkByMut<'data, T, P>
where + P: Sync, + T: Sync,

§

impl<'data, T, P> Unpin for ChunkByMut<'data, T, P>
where + P: Unpin,

§

impl<'data, T, P> !UnwindSafe for ChunkByMut<'data, T, P>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.Chunks.html b/rayon/slice/struct.Chunks.html new file mode 100644 index 0000000000..a5474f7883 --- /dev/null +++ b/rayon/slice/struct.Chunks.html @@ -0,0 +1,286 @@ +Chunks in rayon::slice - Rust +

Struct rayon::slice::Chunks

source ·
pub struct Chunks<'data, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over immutable non-overlapping chunks of a slice

+

Trait Implementations§

source§

impl<'data, T: Sync> Clone for Chunks<'data, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug + Sync> Debug for Chunks<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for Chunks<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Sync + 'data> ParallelIterator for Chunks<'data, T>

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for Chunks<'data, T>

§

impl<'data, T> RefUnwindSafe for Chunks<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for Chunks<'data, T>

§

impl<'data, T> Sync for Chunks<'data, T>

§

impl<'data, T> Unpin for Chunks<'data, T>

§

impl<'data, T> UnwindSafe for Chunks<'data, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.ChunksExact.html b/rayon/slice/struct.ChunksExact.html new file mode 100644 index 0000000000..5aaf292ccb --- /dev/null +++ b/rayon/slice/struct.ChunksExact.html @@ -0,0 +1,289 @@ +ChunksExact in rayon::slice - Rust +

Struct rayon::slice::ChunksExact

source ·
pub struct ChunksExact<'data, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over immutable non-overlapping chunks of a slice

+

Implementations§

source§

impl<'data, T: Sync> ChunksExact<'data, T>

source

pub fn remainder(&self) -> &'data [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements.

+

Trait Implementations§

source§

impl<'data, T: Sync> Clone for ChunksExact<'data, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug + Sync> Debug for ChunksExact<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for ChunksExact<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Sync + 'data> ParallelIterator for ChunksExact<'data, T>

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for ChunksExact<'data, T>

§

impl<'data, T> RefUnwindSafe for ChunksExact<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for ChunksExact<'data, T>

§

impl<'data, T> Sync for ChunksExact<'data, T>

§

impl<'data, T> Unpin for ChunksExact<'data, T>

§

impl<'data, T> UnwindSafe for ChunksExact<'data, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.ChunksExactMut.html b/rayon/slice/struct.ChunksExactMut.html new file mode 100644 index 0000000000..4ddb6581de --- /dev/null +++ b/rayon/slice/struct.ChunksExactMut.html @@ -0,0 +1,301 @@ +ChunksExactMut in rayon::slice - Rust +

Struct rayon::slice::ChunksExactMut

source ·
pub struct ChunksExactMut<'data, T: Send> { /* private fields */ }
Expand description

Parallel iterator over mutable non-overlapping chunks of a slice

+

Implementations§

source§

impl<'data, T: Send> ChunksExactMut<'data, T>

source

pub fn into_remainder(self) -> &'data mut [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements.

+

Note that this has to consume self to return the original lifetime of +the data, which prevents this from actually being used as a parallel +iterator since that also consumes. This method is provided for parity +with std::iter::ChunksExactMut, but consider calling remainder() or +take_remainder() as alternatives.

+
source

pub fn remainder(&mut self) -> &mut [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements.

+

Consider take_remainder() if you need access to the data with its +original lifetime, rather than borrowing through &mut self here.

+
source

pub fn take_remainder(&mut self) -> &'data mut [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements. Subsequent calls will return an empty slice.

+

Trait Implementations§

source§

impl<'data, T: Debug + Send> Debug for ChunksExactMut<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Send + 'data> IndexedParallelIterator for ChunksExactMut<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Send + 'data> ParallelIterator for ChunksExactMut<'data, T>

§

type Item = &'data mut [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for ChunksExactMut<'data, T>

§

impl<'data, T> RefUnwindSafe for ChunksExactMut<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for ChunksExactMut<'data, T>

§

impl<'data, T> Sync for ChunksExactMut<'data, T>
where + T: Sync,

§

impl<'data, T> Unpin for ChunksExactMut<'data, T>

§

impl<'data, T> !UnwindSafe for ChunksExactMut<'data, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.ChunksMut.html b/rayon/slice/struct.ChunksMut.html new file mode 100644 index 0000000000..f0ee83ff14 --- /dev/null +++ b/rayon/slice/struct.ChunksMut.html @@ -0,0 +1,285 @@ +ChunksMut in rayon::slice - Rust +

Struct rayon::slice::ChunksMut

source ·
pub struct ChunksMut<'data, T: Send> { /* private fields */ }
Expand description

Parallel iterator over mutable non-overlapping chunks of a slice

+

Trait Implementations§

source§

impl<'data, T: Debug + Send> Debug for ChunksMut<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Send + 'data> IndexedParallelIterator for ChunksMut<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Send + 'data> ParallelIterator for ChunksMut<'data, T>

§

type Item = &'data mut [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for ChunksMut<'data, T>

§

impl<'data, T> RefUnwindSafe for ChunksMut<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for ChunksMut<'data, T>

§

impl<'data, T> Sync for ChunksMut<'data, T>
where + T: Sync,

§

impl<'data, T> Unpin for ChunksMut<'data, T>

§

impl<'data, T> !UnwindSafe for ChunksMut<'data, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.Iter.html b/rayon/slice/struct.Iter.html new file mode 100644 index 0000000000..2c8d224b37 --- /dev/null +++ b/rayon/slice/struct.Iter.html @@ -0,0 +1,286 @@ +Iter in rayon::slice - Rust +

Struct rayon::slice::Iter

source ·
pub struct Iter<'data, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over immutable items in a slice

+

Trait Implementations§

source§

impl<'data, T: Sync> Clone for Iter<'data, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug + Sync> Debug for Iter<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for Iter<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Sync + 'data> ParallelIterator for Iter<'data, T>

§

type Item = &'data T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for Iter<'data, T>

§

impl<'data, T> RefUnwindSafe for Iter<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for Iter<'data, T>

§

impl<'data, T> Sync for Iter<'data, T>

§

impl<'data, T> Unpin for Iter<'data, T>

§

impl<'data, T> UnwindSafe for Iter<'data, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.IterMut.html b/rayon/slice/struct.IterMut.html new file mode 100644 index 0000000000..7a9e87d33c --- /dev/null +++ b/rayon/slice/struct.IterMut.html @@ -0,0 +1,285 @@ +IterMut in rayon::slice - Rust +

Struct rayon::slice::IterMut

source ·
pub struct IterMut<'data, T: Send> { /* private fields */ }
Expand description

Parallel iterator over mutable items in a slice

+

Trait Implementations§

source§

impl<'data, T: Debug + Send> Debug for IterMut<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Send + 'data> IndexedParallelIterator for IterMut<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Send + 'data> ParallelIterator for IterMut<'data, T>

§

type Item = &'data mut T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for IterMut<'data, T>

§

impl<'data, T> RefUnwindSafe for IterMut<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for IterMut<'data, T>

§

impl<'data, T> Sync for IterMut<'data, T>
where + T: Sync,

§

impl<'data, T> Unpin for IterMut<'data, T>

§

impl<'data, T> !UnwindSafe for IterMut<'data, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.RChunks.html b/rayon/slice/struct.RChunks.html new file mode 100644 index 0000000000..fce1c1d193 --- /dev/null +++ b/rayon/slice/struct.RChunks.html @@ -0,0 +1,286 @@ +RChunks in rayon::slice - Rust +

Struct rayon::slice::RChunks

source ·
pub struct RChunks<'data, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over immutable non-overlapping chunks of a slice, starting at the end.

+

Trait Implementations§

source§

impl<'data, T: Sync> Clone for RChunks<'data, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug + Sync> Debug for RChunks<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for RChunks<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Sync + 'data> ParallelIterator for RChunks<'data, T>

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for RChunks<'data, T>

§

impl<'data, T> RefUnwindSafe for RChunks<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for RChunks<'data, T>

§

impl<'data, T> Sync for RChunks<'data, T>

§

impl<'data, T> Unpin for RChunks<'data, T>

§

impl<'data, T> UnwindSafe for RChunks<'data, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.RChunksExact.html b/rayon/slice/struct.RChunksExact.html new file mode 100644 index 0000000000..7ca146271d --- /dev/null +++ b/rayon/slice/struct.RChunksExact.html @@ -0,0 +1,289 @@ +RChunksExact in rayon::slice - Rust +

Struct rayon::slice::RChunksExact

source ·
pub struct RChunksExact<'data, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over immutable non-overlapping chunks of a slice, starting at the end.

+

Implementations§

source§

impl<'data, T: Sync> RChunksExact<'data, T>

source

pub fn remainder(&self) -> &'data [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements.

+

Trait Implementations§

source§

impl<'data, T: Sync> Clone for RChunksExact<'data, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug + Sync> Debug for RChunksExact<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for RChunksExact<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Sync + 'data> ParallelIterator for RChunksExact<'data, T>

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for RChunksExact<'data, T>

§

impl<'data, T> RefUnwindSafe for RChunksExact<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for RChunksExact<'data, T>

§

impl<'data, T> Sync for RChunksExact<'data, T>

§

impl<'data, T> Unpin for RChunksExact<'data, T>

§

impl<'data, T> UnwindSafe for RChunksExact<'data, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.RChunksExactMut.html b/rayon/slice/struct.RChunksExactMut.html new file mode 100644 index 0000000000..51fb2114cc --- /dev/null +++ b/rayon/slice/struct.RChunksExactMut.html @@ -0,0 +1,301 @@ +RChunksExactMut in rayon::slice - Rust +
pub struct RChunksExactMut<'data, T: Send> { /* private fields */ }
Expand description

Parallel iterator over mutable non-overlapping chunks of a slice, starting at the end.

+

Implementations§

source§

impl<'data, T: Send> RChunksExactMut<'data, T>

source

pub fn into_remainder(self) -> &'data mut [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements.

+

Note that this has to consume self to return the original lifetime of +the data, which prevents this from actually being used as a parallel +iterator since that also consumes. This method is provided for parity +with std::iter::RChunksExactMut, but consider calling remainder() or +take_remainder() as alternatives.

+
source

pub fn remainder(&mut self) -> &mut [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements.

+

Consider take_remainder() if you need access to the data with its +original lifetime, rather than borrowing through &mut self here.

+
source

pub fn take_remainder(&mut self) -> &'data mut [T]

Return the remainder of the original slice that is not going to be +returned by the iterator. The returned slice has at most chunk_size-1 +elements. Subsequent calls will return an empty slice.

+

Trait Implementations§

source§

impl<'data, T: Debug + Send> Debug for RChunksExactMut<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Send + 'data> IndexedParallelIterator for RChunksExactMut<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Send + 'data> ParallelIterator for RChunksExactMut<'data, T>

§

type Item = &'data mut [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for RChunksExactMut<'data, T>

§

impl<'data, T> RefUnwindSafe for RChunksExactMut<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for RChunksExactMut<'data, T>

§

impl<'data, T> Sync for RChunksExactMut<'data, T>
where + T: Sync,

§

impl<'data, T> Unpin for RChunksExactMut<'data, T>

§

impl<'data, T> !UnwindSafe for RChunksExactMut<'data, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.RChunksMut.html b/rayon/slice/struct.RChunksMut.html new file mode 100644 index 0000000000..bb87a27355 --- /dev/null +++ b/rayon/slice/struct.RChunksMut.html @@ -0,0 +1,285 @@ +RChunksMut in rayon::slice - Rust +

Struct rayon::slice::RChunksMut

source ·
pub struct RChunksMut<'data, T: Send> { /* private fields */ }
Expand description

Parallel iterator over mutable non-overlapping chunks of a slice, starting at the end.

+

Trait Implementations§

source§

impl<'data, T: Debug + Send> Debug for RChunksMut<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Send + 'data> IndexedParallelIterator for RChunksMut<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Send + 'data> ParallelIterator for RChunksMut<'data, T>

§

type Item = &'data mut [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for RChunksMut<'data, T>

§

impl<'data, T> RefUnwindSafe for RChunksMut<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for RChunksMut<'data, T>

§

impl<'data, T> Sync for RChunksMut<'data, T>
where + T: Sync,

§

impl<'data, T> Unpin for RChunksMut<'data, T>

§

impl<'data, T> !UnwindSafe for RChunksMut<'data, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.Split.html b/rayon/slice/struct.Split.html new file mode 100644 index 0000000000..b55d5062ea --- /dev/null +++ b/rayon/slice/struct.Split.html @@ -0,0 +1,202 @@ +Split in rayon::slice - Rust +

Struct rayon::slice::Split

source ·
pub struct Split<'data, T, P> { /* private fields */ }
Expand description

Parallel iterator over slices separated by a predicate

+

Trait Implementations§

source§

impl<'data, T, P: Clone> Clone for Split<'data, T, P>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug, P> Debug for Split<'data, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T, P> ParallelIterator for Split<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Sync,

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'data, T, P> Freeze for Split<'data, T, P>
where + P: Freeze,

§

impl<'data, T, P> RefUnwindSafe for Split<'data, T, P>
where + P: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<'data, T, P> Send for Split<'data, T, P>
where + P: Send, + T: Sync,

§

impl<'data, T, P> Sync for Split<'data, T, P>
where + P: Sync, + T: Sync,

§

impl<'data, T, P> Unpin for Split<'data, T, P>
where + P: Unpin,

§

impl<'data, T, P> UnwindSafe for Split<'data, T, P>
where + P: UnwindSafe, + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.SplitInclusive.html b/rayon/slice/struct.SplitInclusive.html new file mode 100644 index 0000000000..7bcd6b4595 --- /dev/null +++ b/rayon/slice/struct.SplitInclusive.html @@ -0,0 +1,203 @@ +SplitInclusive in rayon::slice - Rust +

Struct rayon::slice::SplitInclusive

source ·
pub struct SplitInclusive<'data, T, P> { /* private fields */ }
Expand description

Parallel iterator over slices separated by a predicate, +including the matched part as a terminator.

+

Trait Implementations§

source§

impl<'data, T, P: Clone> Clone for SplitInclusive<'data, T, P>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug, P> Debug for SplitInclusive<'data, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T, P> ParallelIterator for SplitInclusive<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Sync,

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'data, T, P> Freeze for SplitInclusive<'data, T, P>
where + P: Freeze,

§

impl<'data, T, P> RefUnwindSafe for SplitInclusive<'data, T, P>
where + P: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<'data, T, P> Send for SplitInclusive<'data, T, P>
where + P: Send, + T: Sync,

§

impl<'data, T, P> Sync for SplitInclusive<'data, T, P>
where + P: Sync, + T: Sync,

§

impl<'data, T, P> Unpin for SplitInclusive<'data, T, P>
where + P: Unpin,

§

impl<'data, T, P> UnwindSafe for SplitInclusive<'data, T, P>
where + P: UnwindSafe, + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.SplitInclusiveMut.html b/rayon/slice/struct.SplitInclusiveMut.html new file mode 100644 index 0000000000..07dd096646 --- /dev/null +++ b/rayon/slice/struct.SplitInclusiveMut.html @@ -0,0 +1,200 @@ +SplitInclusiveMut in rayon::slice - Rust +
pub struct SplitInclusiveMut<'data, T, P> { /* private fields */ }
Expand description

Parallel iterator over mutable slices separated by a predicate, +including the matched part as a terminator.

+

Trait Implementations§

source§

impl<'data, T: Debug, P> Debug for SplitInclusiveMut<'data, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T, P> ParallelIterator for SplitInclusiveMut<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Send,

§

type Item = &'data mut [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'data, T, P> Freeze for SplitInclusiveMut<'data, T, P>
where + P: Freeze,

§

impl<'data, T, P> RefUnwindSafe for SplitInclusiveMut<'data, T, P>
where + P: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<'data, T, P> Send for SplitInclusiveMut<'data, T, P>
where + P: Send, + T: Send,

§

impl<'data, T, P> Sync for SplitInclusiveMut<'data, T, P>
where + P: Sync, + T: Sync,

§

impl<'data, T, P> Unpin for SplitInclusiveMut<'data, T, P>
where + P: Unpin,

§

impl<'data, T, P> !UnwindSafe for SplitInclusiveMut<'data, T, P>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.SplitMut.html b/rayon/slice/struct.SplitMut.html new file mode 100644 index 0000000000..ca48389349 --- /dev/null +++ b/rayon/slice/struct.SplitMut.html @@ -0,0 +1,199 @@ +SplitMut in rayon::slice - Rust +

Struct rayon::slice::SplitMut

source ·
pub struct SplitMut<'data, T, P> { /* private fields */ }
Expand description

Parallel iterator over mutable slices separated by a predicate

+

Trait Implementations§

source§

impl<'data, T: Debug, P> Debug for SplitMut<'data, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T, P> ParallelIterator for SplitMut<'data, T, P>
where + P: Fn(&T) -> bool + Sync + Send, + T: Send,

§

type Item = &'data mut [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'data, T, P> Freeze for SplitMut<'data, T, P>
where + P: Freeze,

§

impl<'data, T, P> RefUnwindSafe for SplitMut<'data, T, P>
where + P: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<'data, T, P> Send for SplitMut<'data, T, P>
where + P: Send, + T: Send,

§

impl<'data, T, P> Sync for SplitMut<'data, T, P>
where + P: Sync, + T: Sync,

§

impl<'data, T, P> Unpin for SplitMut<'data, T, P>
where + P: Unpin,

§

impl<'data, T, P> !UnwindSafe for SplitMut<'data, T, P>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/struct.Windows.html b/rayon/slice/struct.Windows.html new file mode 100644 index 0000000000..7732f38f30 --- /dev/null +++ b/rayon/slice/struct.Windows.html @@ -0,0 +1,286 @@ +Windows in rayon::slice - Rust +

Struct rayon::slice::Windows

source ·
pub struct Windows<'data, T: Sync> { /* private fields */ }
Expand description

Parallel iterator over immutable overlapping windows of a slice

+

Trait Implementations§

source§

impl<'data, T: Sync> Clone for Windows<'data, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, T: Debug + Sync> Debug for Windows<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Sync + 'data> IndexedParallelIterator for Windows<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Sync + 'data> ParallelIterator for Windows<'data, T>

§

type Item = &'data [T]

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for Windows<'data, T>

§

impl<'data, T> RefUnwindSafe for Windows<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for Windows<'data, T>

§

impl<'data, T> Sync for Windows<'data, T>

§

impl<'data, T> Unpin for Windows<'data, T>

§

impl<'data, T> UnwindSafe for Windows<'data, T>
where + T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/slice/trait.ParallelSlice.html b/rayon/slice/trait.ParallelSlice.html new file mode 100644 index 0000000000..0a4366c5cd --- /dev/null +++ b/rayon/slice/trait.ParallelSlice.html @@ -0,0 +1,95 @@ +ParallelSlice in rayon::slice - Rust +
pub trait ParallelSlice<T: Sync> {
+    // Required method
+    fn as_parallel_slice(&self) -> &[T];
+
+    // Provided methods
+    fn par_split<P>(&self, separator: P) -> Split<'_, T, P>
+       where P: Fn(&T) -> bool + Sync + Send { ... }
+    fn par_split_inclusive<P>(&self, separator: P) -> SplitInclusive<'_, T, P>
+       where P: Fn(&T) -> bool + Sync + Send { ... }
+    fn par_windows(&self, window_size: usize) -> Windows<'_, T> { ... }
+    fn par_chunks(&self, chunk_size: usize) -> Chunks<'_, T> { ... }
+    fn par_chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T> { ... }
+    fn par_rchunks(&self, chunk_size: usize) -> RChunks<'_, T> { ... }
+    fn par_rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T> { ... }
+    fn par_chunk_by<F>(&self, pred: F) -> ChunkBy<'_, T, F>
+       where F: Fn(&T, &T) -> bool + Send + Sync { ... }
+}
Expand description

Parallel extensions for slices.

+

Required Methods§

source

fn as_parallel_slice(&self) -> &[T]

Returns a plain slice, which is used to implement the rest of the +parallel methods.

+

Provided Methods§

source

fn par_split<P>(&self, separator: P) -> Split<'_, T, P>
where + P: Fn(&T) -> bool + Sync + Send,

Returns a parallel iterator over subslices separated by elements that +match the separator.

+
§Examples
+
use rayon::prelude::*;
+let products: Vec<_> = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9]
+    .par_split(|i| *i == 0)
+    .map(|numbers| numbers.iter().product::<i32>())
+    .collect();
+assert_eq!(products, [6, 64, 162]);
+
source

fn par_split_inclusive<P>(&self, separator: P) -> SplitInclusive<'_, T, P>
where + P: Fn(&T) -> bool + Sync + Send,

Returns a parallel iterator over subslices separated by elements that +match the separator, including the matched part as a terminator.

+
§Examples
+
use rayon::prelude::*;
+let lengths: Vec<_> = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9]
+    .par_split_inclusive(|i| *i == 0)
+    .map(|numbers| numbers.len())
+    .collect();
+assert_eq!(lengths, [4, 4, 3]);
+
source

fn par_windows(&self, window_size: usize) -> Windows<'_, T>

Returns a parallel iterator over all contiguous windows of length +window_size. The windows overlap.

+
§Examples
+
use rayon::prelude::*;
+let windows: Vec<_> = [1, 2, 3].par_windows(2).collect();
+assert_eq!(vec![[1, 2], [2, 3]], windows);
+
source

fn par_chunks(&self, chunk_size: usize) -> Chunks<'_, T>

Returns a parallel iterator over at most chunk_size elements of +self at a time. The chunks do not overlap.

+

If the number of elements in the iterator is not divisible by +chunk_size, the last chunk may be shorter than chunk_size. All +other chunks will have that exact length.

+
§Examples
+
use rayon::prelude::*;
+let chunks: Vec<_> = [1, 2, 3, 4, 5].par_chunks(2).collect();
+assert_eq!(chunks, vec![&[1, 2][..], &[3, 4], &[5]]);
+
source

fn par_chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>

Returns a parallel iterator over chunk_size elements of +self at a time. The chunks do not overlap.

+

If chunk_size does not divide the length of the slice, then the +last up to chunk_size-1 elements will be omitted and can be +retrieved from the remainder function of the iterator.

+
§Examples
+
use rayon::prelude::*;
+let chunks: Vec<_> = [1, 2, 3, 4, 5].par_chunks_exact(2).collect();
+assert_eq!(chunks, vec![&[1, 2][..], &[3, 4]]);
+
source

fn par_rchunks(&self, chunk_size: usize) -> RChunks<'_, T>

Returns a parallel iterator over at most chunk_size elements of self at a time, +starting at the end. The chunks do not overlap.

+

If the number of elements in the iterator is not divisible by +chunk_size, the last chunk may be shorter than chunk_size. All +other chunks will have that exact length.

+
§Examples
+
use rayon::prelude::*;
+let chunks: Vec<_> = [1, 2, 3, 4, 5].par_rchunks(2).collect();
+assert_eq!(chunks, vec![&[4, 5][..], &[2, 3], &[1]]);
+
source

fn par_rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>

Returns a parallel iterator over chunk_size elements of self at a time, +starting at the end. The chunks do not overlap.

+

If chunk_size does not divide the length of the slice, then the +last up to chunk_size-1 elements will be omitted and can be +retrieved from the remainder function of the iterator.

+
§Examples
+
use rayon::prelude::*;
+let chunks: Vec<_> = [1, 2, 3, 4, 5].par_rchunks_exact(2).collect();
+assert_eq!(chunks, vec![&[4, 5][..], &[2, 3]]);
+
source

fn par_chunk_by<F>(&self, pred: F) -> ChunkBy<'_, T, F>
where + F: Fn(&T, &T) -> bool + Send + Sync,

Returns a parallel iterator over the slice producing non-overlapping runs +of elements using the predicate to separate them.

+

The predicate is called on two elements following themselves, +it means the predicate is called on slice[0] and slice[1] +then on slice[1] and slice[2] and so on.

+
§Examples
+
use rayon::prelude::*;
+let chunks: Vec<_> = [1, 2, 2, 3, 3, 3].par_chunk_by(|&x, &y| x == y).collect();
+assert_eq!(chunks[0], &[1]);
+assert_eq!(chunks[1], &[2, 2]);
+assert_eq!(chunks[2], &[3, 3, 3]);
+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Sync> ParallelSlice<T> for [T]

Implementors§

\ No newline at end of file diff --git a/rayon/slice/trait.ParallelSliceMut.html b/rayon/slice/trait.ParallelSliceMut.html new file mode 100644 index 0000000000..f3469271d3 --- /dev/null +++ b/rayon/slice/trait.ParallelSliceMut.html @@ -0,0 +1,337 @@ +ParallelSliceMut in rayon::slice - Rust +
pub trait ParallelSliceMut<T: Send> {
+
Show 15 methods // Required method + fn as_parallel_slice_mut(&mut self) -> &mut [T]; + + // Provided methods + fn par_split_mut<P>(&mut self, separator: P) -> SplitMut<'_, T, P> + where P: Fn(&T) -> bool + Sync + Send { ... } + fn par_split_inclusive_mut<P>( + &mut self, + separator: P + ) -> SplitInclusiveMut<'_, T, P> + where P: Fn(&T) -> bool + Sync + Send { ... } + fn par_chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<'_, T> { ... } + fn par_chunks_exact_mut( + &mut self, + chunk_size: usize + ) -> ChunksExactMut<'_, T> { ... } + fn par_rchunks_mut(&mut self, chunk_size: usize) -> RChunksMut<'_, T> { ... } + fn par_rchunks_exact_mut( + &mut self, + chunk_size: usize + ) -> RChunksExactMut<'_, T> { ... } + fn par_sort(&mut self) + where T: Ord { ... } + fn par_sort_by<F>(&mut self, compare: F) + where F: Fn(&T, &T) -> Ordering + Sync { ... } + fn par_sort_by_key<K, F>(&mut self, f: F) + where K: Ord, + F: Fn(&T) -> K + Sync { ... } + fn par_sort_by_cached_key<K, F>(&mut self, f: F) + where F: Fn(&T) -> K + Sync, + K: Ord + Send { ... } + fn par_sort_unstable(&mut self) + where T: Ord { ... } + fn par_sort_unstable_by<F>(&mut self, compare: F) + where F: Fn(&T, &T) -> Ordering + Sync { ... } + fn par_sort_unstable_by_key<K, F>(&mut self, f: F) + where K: Ord, + F: Fn(&T) -> K + Sync { ... } + fn par_chunk_by_mut<F>(&mut self, pred: F) -> ChunkByMut<'_, T, F> + where F: Fn(&T, &T) -> bool + Send + Sync { ... } +
}
Expand description

Parallel extensions for mutable slices.

+

Required Methods§

source

fn as_parallel_slice_mut(&mut self) -> &mut [T]

Returns a plain mutable slice, which is used to implement the rest of +the parallel methods.

+

Provided Methods§

source

fn par_split_mut<P>(&mut self, separator: P) -> SplitMut<'_, T, P>
where + P: Fn(&T) -> bool + Sync + Send,

Returns a parallel iterator over mutable subslices separated by +elements that match the separator.

+
§Examples
+
use rayon::prelude::*;
+let mut array = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9];
+array.par_split_mut(|i| *i == 0)
+     .for_each(|slice| slice.reverse());
+assert_eq!(array, [3, 2, 1, 0, 8, 4, 2, 0, 9, 6, 3]);
+
source

fn par_split_inclusive_mut<P>( + &mut self, + separator: P +) -> SplitInclusiveMut<'_, T, P>
where + P: Fn(&T) -> bool + Sync + Send,

Returns a parallel iterator over mutable subslices separated by elements +that match the separator, including the matched part as a terminator.

+
§Examples
+
use rayon::prelude::*;
+let mut array = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9];
+array.par_split_inclusive_mut(|i| *i == 0)
+     .for_each(|slice| slice.reverse());
+assert_eq!(array, [0, 3, 2, 1, 0, 8, 4, 2, 9, 6, 3]);
+
source

fn par_chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<'_, T>

Returns a parallel iterator over at most chunk_size elements of +self at a time. The chunks are mutable and do not overlap.

+

If the number of elements in the iterator is not divisible by +chunk_size, the last chunk may be shorter than chunk_size. All +other chunks will have that exact length.

+
§Examples
+
use rayon::prelude::*;
+let mut array = [1, 2, 3, 4, 5];
+array.par_chunks_mut(2)
+     .for_each(|slice| slice.reverse());
+assert_eq!(array, [2, 1, 4, 3, 5]);
+
source

fn par_chunks_exact_mut(&mut self, chunk_size: usize) -> ChunksExactMut<'_, T>

Returns a parallel iterator over chunk_size elements of +self at a time. The chunks are mutable and do not overlap.

+

If chunk_size does not divide the length of the slice, then the +last up to chunk_size-1 elements will be omitted and can be +retrieved from the remainder function of the iterator.

+
§Examples
+
use rayon::prelude::*;
+let mut array = [1, 2, 3, 4, 5];
+array.par_chunks_exact_mut(3)
+     .for_each(|slice| slice.reverse());
+assert_eq!(array, [3, 2, 1, 4, 5]);
+
source

fn par_rchunks_mut(&mut self, chunk_size: usize) -> RChunksMut<'_, T>

Returns a parallel iterator over at most chunk_size elements of self at a time, +starting at the end. The chunks are mutable and do not overlap.

+

If the number of elements in the iterator is not divisible by +chunk_size, the last chunk may be shorter than chunk_size. All +other chunks will have that exact length.

+
§Examples
+
use rayon::prelude::*;
+let mut array = [1, 2, 3, 4, 5];
+array.par_rchunks_mut(2)
+     .for_each(|slice| slice.reverse());
+assert_eq!(array, [1, 3, 2, 5, 4]);
+
source

fn par_rchunks_exact_mut(&mut self, chunk_size: usize) -> RChunksExactMut<'_, T>

Returns a parallel iterator over chunk_size elements of self at a time, +starting at the end. The chunks are mutable and do not overlap.

+

If chunk_size does not divide the length of the slice, then the +last up to chunk_size-1 elements will be omitted and can be +retrieved from the remainder function of the iterator.

+
§Examples
+
use rayon::prelude::*;
+let mut array = [1, 2, 3, 4, 5];
+array.par_rchunks_exact_mut(3)
+     .for_each(|slice| slice.reverse());
+assert_eq!(array, [1, 2, 5, 4, 3]);
+
source

fn par_sort(&mut self)
where + T: Ord,

Sorts the slice in parallel.

+

This sort is stable (i.e., does not reorder equal elements) and O(n * log(n)) worst-case.

+

When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See par_sort_unstable.

+
§Current implementation
+

The current algorithm is an adaptive merge sort inspired by +timsort. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.

+

Also, it allocates temporary storage the same size as self, but for very short slices a +non-allocating insertion sort is used instead.

+

In order to sort the slice in parallel, the slice is first divided into smaller chunks and +all chunks are sorted in parallel. Then, adjacent chunks that together form non-descending +or descending runs are concatenated. Finally, the remaining chunks are merged together using +parallel subdivision of chunks and parallel merge operation.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = [-5, 4, 1, -3, 2];
+
+v.par_sort();
+assert_eq!(v, [-5, -3, 1, 2, 4]);
+
source

fn par_sort_by<F>(&mut self, compare: F)
where + F: Fn(&T, &T) -> Ordering + Sync,

Sorts the slice in parallel with a comparator function.

+

This sort is stable (i.e., does not reorder equal elements) and O(n * log(n)) worst-case.

+

The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all a, b and c):

+
    +
  • total and antisymmetric: exactly one of a < b, a == b or a > b is true, and
  • +
  • transitive, a < b and b < c implies a < c. The same must hold for both == and >.
  • +
+

For example, while f64 doesn’t implement Ord because NaN != NaN, we can use +partial_cmp as our sort function when we know the slice doesn’t contain a NaN.

+ +
use rayon::prelude::*;
+
+let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
+floats.par_sort_by(|a, b| a.partial_cmp(b).unwrap());
+assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);
+

When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See par_sort_unstable_by.

+
§Current implementation
+

The current algorithm is an adaptive merge sort inspired by +timsort. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.

+

Also, it allocates temporary storage the same size as self, but for very short slices a +non-allocating insertion sort is used instead.

+

In order to sort the slice in parallel, the slice is first divided into smaller chunks and +all chunks are sorted in parallel. Then, adjacent chunks that together form non-descending +or descending runs are concatenated. Finally, the remaining chunks are merged together using +parallel subdivision of chunks and parallel merge operation.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = [5, 4, 1, 3, 2];
+v.par_sort_by(|a, b| a.cmp(b));
+assert_eq!(v, [1, 2, 3, 4, 5]);
+
+// reverse sorting
+v.par_sort_by(|a, b| b.cmp(a));
+assert_eq!(v, [5, 4, 3, 2, 1]);
+
source

fn par_sort_by_key<K, F>(&mut self, f: F)
where + K: Ord, + F: Fn(&T) -> K + Sync,

Sorts the slice in parallel with a key extraction function.

+

This sort is stable (i.e., does not reorder equal elements) and O(m * n * log(n)) +worst-case, where the key function is O(m).

+

For expensive key functions (e.g. functions that are not simple property accesses or +basic operations), par_sort_by_cached_key is likely to +be significantly faster, as it does not recompute element keys.

+

When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See par_sort_unstable_by_key.

+
§Current implementation
+

The current algorithm is an adaptive merge sort inspired by +timsort. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.

+

Also, it allocates temporary storage the same size as self, but for very short slices a +non-allocating insertion sort is used instead.

+

In order to sort the slice in parallel, the slice is first divided into smaller chunks and +all chunks are sorted in parallel. Then, adjacent chunks that together form non-descending +or descending runs are concatenated. Finally, the remaining chunks are merged together using +parallel subdivision of chunks and parallel merge operation.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = [-5i32, 4, 1, -3, 2];
+
+v.par_sort_by_key(|k| k.abs());
+assert_eq!(v, [1, 2, -3, 4, -5]);
+
source

fn par_sort_by_cached_key<K, F>(&mut self, f: F)
where + F: Fn(&T) -> K + Sync, + K: Ord + Send,

Sorts the slice in parallel with a key extraction function.

+

During sorting, the key function is called at most once per element, by using +temporary storage to remember the results of key evaluation. +The key function is called in parallel, so the order of calls is completely unspecified.

+

This sort is stable (i.e., does not reorder equal elements) and O(m * n + n * log(n)) +worst-case, where the key function is O(m).

+

For simple key functions (e.g., functions that are property accesses or +basic operations), par_sort_by_key is likely to be +faster.

+
§Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

In the worst case, the algorithm allocates temporary storage in a Vec<(K, usize)> the +length of the slice.

+

All quicksorts work in two stages: partitioning into two halves followed by recursive +calls. The partitioning phase is sequential, but the two recursive calls are performed in +parallel. Finally, after sorting the cached keys, the item positions are updated sequentially.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = [-5i32, 4, 32, -3, 2];
+
+v.par_sort_by_cached_key(|k| k.to_string());
+assert!(v == [-3, -5, 2, 32, 4]);
+
source

fn par_sort_unstable(&mut self)
where + T: Ord,

Sorts the slice in parallel, but might not preserve the order of equal elements.

+

This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and O(n * log(n)) worst-case.

+
§Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.

+

All quicksorts work in two stages: partitioning into two halves followed by recursive +calls. The partitioning phase is sequential, but the two recursive calls are performed in +parallel.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = [-5, 4, 1, -3, 2];
+
+v.par_sort_unstable();
+assert_eq!(v, [-5, -3, 1, 2, 4]);
+
source

fn par_sort_unstable_by<F>(&mut self, compare: F)
where + F: Fn(&T, &T) -> Ordering + Sync,

Sorts the slice in parallel with a comparator function, but might not preserve the order of +equal elements.

+

This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and O(n * log(n)) worst-case.

+

The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all a, b and c):

+
    +
  • total and antisymmetric: exactly one of a < b, a == b or a > b is true, and
  • +
  • transitive, a < b and b < c implies a < c. The same must hold for both == and >.
  • +
+

For example, while f64 doesn’t implement Ord because NaN != NaN, we can use +partial_cmp as our sort function when we know the slice doesn’t contain a NaN.

+ +
use rayon::prelude::*;
+
+let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
+floats.par_sort_unstable_by(|a, b| a.partial_cmp(b).unwrap());
+assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);
+
§Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.

+

All quicksorts work in two stages: partitioning into two halves followed by recursive +calls. The partitioning phase is sequential, but the two recursive calls are performed in +parallel.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = [5, 4, 1, 3, 2];
+v.par_sort_unstable_by(|a, b| a.cmp(b));
+assert_eq!(v, [1, 2, 3, 4, 5]);
+
+// reverse sorting
+v.par_sort_unstable_by(|a, b| b.cmp(a));
+assert_eq!(v, [5, 4, 3, 2, 1]);
+
source

fn par_sort_unstable_by_key<K, F>(&mut self, f: F)
where + K: Ord, + F: Fn(&T) -> K + Sync,

Sorts the slice in parallel with a key extraction function, but might not preserve the order +of equal elements.

+

This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and O(m * n * log(n)) worst-case, +where the key function is O(m).

+
§Current implementation
+

The current algorithm is based on pattern-defeating quicksort by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.

+

Due to its key calling strategy, par_sort_unstable_by_key is likely to be slower than +par_sort_by_cached_key in cases where the key function +is expensive.

+

All quicksorts work in two stages: partitioning into two halves followed by recursive +calls. The partitioning phase is sequential, but the two recursive calls are performed in +parallel.

+
§Examples
+
use rayon::prelude::*;
+
+let mut v = [-5i32, 4, 1, -3, 2];
+
+v.par_sort_unstable_by_key(|k| k.abs());
+assert_eq!(v, [1, 2, -3, 4, -5]);
+
source

fn par_chunk_by_mut<F>(&mut self, pred: F) -> ChunkByMut<'_, T, F>
where + F: Fn(&T, &T) -> bool + Send + Sync,

Returns a parallel iterator over the slice producing non-overlapping mutable +runs of elements using the predicate to separate them.

+

The predicate is called on two elements following themselves, +it means the predicate is called on slice[0] and slice[1] +then on slice[1] and slice[2] and so on.

+
§Examples
+
use rayon::prelude::*;
+let mut xs = [1, 2, 2, 3, 3, 3];
+let chunks: Vec<_> = xs.par_chunk_by_mut(|&x, &y| x == y).collect();
+assert_eq!(chunks[0], &mut [1]);
+assert_eq!(chunks[1], &mut [2, 2]);
+assert_eq!(chunks[2], &mut [3, 3, 3]);
+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Send> ParallelSliceMut<T> for [T]

source§

fn as_parallel_slice_mut(&mut self) -> &mut [T]

Implementors§

\ No newline at end of file diff --git a/rayon/str/index.html b/rayon/str/index.html new file mode 100644 index 0000000000..78e1ba06f4 --- /dev/null +++ b/rayon/str/index.html @@ -0,0 +1,10 @@ +rayon::str - Rust +

Module rayon::str

source ·
Expand description

Parallel iterator types for strings

+

You will rarely need to interact with this module directly unless you need +to name one of the iterator types.

+

Note: ParallelString::par_split() and par_split_terminator() +reference a Pattern trait which is not visible outside this crate. +This trait is intentionally kept private, for use only by Rayon itself. +It is implemented for char, &[char], [char; N], &[char; N], +and any function or closure F: Fn(char) -> bool + Sync + Send.

+

Structs§

  • Parallel iterator over the bytes of a string
  • Parallel iterator over the characters of a string, with their positions
  • Parallel iterator over the characters of a string
  • Parallel iterator over a string encoded as UTF-16
  • Parallel iterator over lines in a string
  • Parallel iterator over substrings that match a pattern, with their positions
  • Parallel iterator over substrings that match a pattern
  • Parallel iterator over substrings separated by a pattern
  • Parallel iterator over substrings separated by ASCII whitespace
  • Parallel iterator over substrings separated by a pattern
  • Parallel iterator over substrings separated by a terminator pattern
  • Parallel iterator over substrings separated by whitespace

Traits§

\ No newline at end of file diff --git a/rayon/str/sidebar-items.js b/rayon/str/sidebar-items.js new file mode 100644 index 0000000000..32543d5ab8 --- /dev/null +++ b/rayon/str/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Bytes","CharIndices","Chars","EncodeUtf16","Lines","MatchIndices","Matches","Split","SplitAsciiWhitespace","SplitInclusive","SplitTerminator","SplitWhitespace"],"trait":["ParallelString"]}; \ No newline at end of file diff --git a/rayon/str/struct.Bytes.html b/rayon/str/struct.Bytes.html new file mode 100644 index 0000000000..f3027cffec --- /dev/null +++ b/rayon/str/struct.Bytes.html @@ -0,0 +1,190 @@ +Bytes in rayon::str - Rust +

Struct rayon::str::Bytes

source ·
pub struct Bytes<'ch> { /* private fields */ }
Expand description

Parallel iterator over the bytes of a string

+

Trait Implementations§

source§

impl<'ch> Clone for Bytes<'ch>

source§

fn clone(&self) -> Bytes<'ch>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch> Debug for Bytes<'ch>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch> ParallelIterator for Bytes<'ch>

§

type Item = u8

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch> Freeze for Bytes<'ch>

§

impl<'ch> RefUnwindSafe for Bytes<'ch>

§

impl<'ch> Send for Bytes<'ch>

§

impl<'ch> Sync for Bytes<'ch>

§

impl<'ch> Unpin for Bytes<'ch>

§

impl<'ch> UnwindSafe for Bytes<'ch>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.CharIndices.html b/rayon/str/struct.CharIndices.html new file mode 100644 index 0000000000..8e60be4774 --- /dev/null +++ b/rayon/str/struct.CharIndices.html @@ -0,0 +1,190 @@ +CharIndices in rayon::str - Rust +

Struct rayon::str::CharIndices

source ·
pub struct CharIndices<'ch> { /* private fields */ }
Expand description

Parallel iterator over the characters of a string, with their positions

+

Trait Implementations§

source§

impl<'ch> Clone for CharIndices<'ch>

source§

fn clone(&self) -> CharIndices<'ch>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch> Debug for CharIndices<'ch>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch> ParallelIterator for CharIndices<'ch>

§

type Item = (usize, char)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch> Freeze for CharIndices<'ch>

§

impl<'ch> RefUnwindSafe for CharIndices<'ch>

§

impl<'ch> Send for CharIndices<'ch>

§

impl<'ch> Sync for CharIndices<'ch>

§

impl<'ch> Unpin for CharIndices<'ch>

§

impl<'ch> UnwindSafe for CharIndices<'ch>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.Chars.html b/rayon/str/struct.Chars.html new file mode 100644 index 0000000000..4966713f2d --- /dev/null +++ b/rayon/str/struct.Chars.html @@ -0,0 +1,190 @@ +Chars in rayon::str - Rust +

Struct rayon::str::Chars

source ·
pub struct Chars<'ch> { /* private fields */ }
Expand description

Parallel iterator over the characters of a string

+

Trait Implementations§

source§

impl<'ch> Clone for Chars<'ch>

source§

fn clone(&self) -> Chars<'ch>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch> Debug for Chars<'ch>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch> ParallelIterator for Chars<'ch>

§

type Item = char

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch> Freeze for Chars<'ch>

§

impl<'ch> RefUnwindSafe for Chars<'ch>

§

impl<'ch> Send for Chars<'ch>

§

impl<'ch> Sync for Chars<'ch>

§

impl<'ch> Unpin for Chars<'ch>

§

impl<'ch> UnwindSafe for Chars<'ch>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.EncodeUtf16.html b/rayon/str/struct.EncodeUtf16.html new file mode 100644 index 0000000000..8adb7d22fc --- /dev/null +++ b/rayon/str/struct.EncodeUtf16.html @@ -0,0 +1,190 @@ +EncodeUtf16 in rayon::str - Rust +

Struct rayon::str::EncodeUtf16

source ·
pub struct EncodeUtf16<'ch> { /* private fields */ }
Expand description

Parallel iterator over a string encoded as UTF-16

+

Trait Implementations§

source§

impl<'ch> Clone for EncodeUtf16<'ch>

source§

fn clone(&self) -> EncodeUtf16<'ch>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch> Debug for EncodeUtf16<'ch>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch> ParallelIterator for EncodeUtf16<'ch>

§

type Item = u16

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch> Freeze for EncodeUtf16<'ch>

§

impl<'ch> RefUnwindSafe for EncodeUtf16<'ch>

§

impl<'ch> Send for EncodeUtf16<'ch>

§

impl<'ch> Sync for EncodeUtf16<'ch>

§

impl<'ch> Unpin for EncodeUtf16<'ch>

§

impl<'ch> UnwindSafe for EncodeUtf16<'ch>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.Lines.html b/rayon/str/struct.Lines.html new file mode 100644 index 0000000000..02da74c0c3 --- /dev/null +++ b/rayon/str/struct.Lines.html @@ -0,0 +1,190 @@ +Lines in rayon::str - Rust +

Struct rayon::str::Lines

source ·
pub struct Lines<'ch>(/* private fields */);
Expand description

Parallel iterator over lines in a string

+

Trait Implementations§

source§

impl<'ch> Clone for Lines<'ch>

source§

fn clone(&self) -> Lines<'ch>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch> Debug for Lines<'ch>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch> ParallelIterator for Lines<'ch>

§

type Item = &'ch str

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch> Freeze for Lines<'ch>

§

impl<'ch> RefUnwindSafe for Lines<'ch>

§

impl<'ch> Send for Lines<'ch>

§

impl<'ch> Sync for Lines<'ch>

§

impl<'ch> Unpin for Lines<'ch>

§

impl<'ch> UnwindSafe for Lines<'ch>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.MatchIndices.html b/rayon/str/struct.MatchIndices.html new file mode 100644 index 0000000000..f237739aaa --- /dev/null +++ b/rayon/str/struct.MatchIndices.html @@ -0,0 +1,194 @@ +MatchIndices in rayon::str - Rust +

Struct rayon::str::MatchIndices

source ·
pub struct MatchIndices<'ch, P: Pattern> { /* private fields */ }
Expand description

Parallel iterator over substrings that match a pattern, with their positions

+

Trait Implementations§

source§

impl<'ch, P: Clone + Pattern> Clone for MatchIndices<'ch, P>

source§

fn clone(&self) -> MatchIndices<'ch, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch, P: Debug + Pattern> Debug for MatchIndices<'ch, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch, P: Pattern> ParallelIterator for MatchIndices<'ch, P>

§

type Item = (usize, &'ch str)

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch, P> Freeze for MatchIndices<'ch, P>
where + P: Freeze,

§

impl<'ch, P> RefUnwindSafe for MatchIndices<'ch, P>
where + P: RefUnwindSafe,

§

impl<'ch, P> Send for MatchIndices<'ch, P>

§

impl<'ch, P> Sync for MatchIndices<'ch, P>

§

impl<'ch, P> Unpin for MatchIndices<'ch, P>
where + P: Unpin,

§

impl<'ch, P> UnwindSafe for MatchIndices<'ch, P>
where + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.Matches.html b/rayon/str/struct.Matches.html new file mode 100644 index 0000000000..8bda98240e --- /dev/null +++ b/rayon/str/struct.Matches.html @@ -0,0 +1,194 @@ +Matches in rayon::str - Rust +

Struct rayon::str::Matches

source ·
pub struct Matches<'ch, P: Pattern> { /* private fields */ }
Expand description

Parallel iterator over substrings that match a pattern

+

Trait Implementations§

source§

impl<'ch, P: Clone + Pattern> Clone for Matches<'ch, P>

source§

fn clone(&self) -> Matches<'ch, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch, P: Debug + Pattern> Debug for Matches<'ch, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch, P: Pattern> ParallelIterator for Matches<'ch, P>

§

type Item = &'ch str

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch, P> Freeze for Matches<'ch, P>
where + P: Freeze,

§

impl<'ch, P> RefUnwindSafe for Matches<'ch, P>
where + P: RefUnwindSafe,

§

impl<'ch, P> Send for Matches<'ch, P>

§

impl<'ch, P> Sync for Matches<'ch, P>

§

impl<'ch, P> Unpin for Matches<'ch, P>
where + P: Unpin,

§

impl<'ch, P> UnwindSafe for Matches<'ch, P>
where + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.Split.html b/rayon/str/struct.Split.html new file mode 100644 index 0000000000..5354fe618d --- /dev/null +++ b/rayon/str/struct.Split.html @@ -0,0 +1,194 @@ +Split in rayon::str - Rust +

Struct rayon::str::Split

source ·
pub struct Split<'ch, P: Pattern> { /* private fields */ }
Expand description

Parallel iterator over substrings separated by a pattern

+

Trait Implementations§

source§

impl<'ch, P: Clone + Pattern> Clone for Split<'ch, P>

source§

fn clone(&self) -> Split<'ch, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch, P: Debug + Pattern> Debug for Split<'ch, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch, P: Pattern> ParallelIterator for Split<'ch, P>

§

type Item = &'ch str

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch, P> Freeze for Split<'ch, P>
where + P: Freeze,

§

impl<'ch, P> RefUnwindSafe for Split<'ch, P>
where + P: RefUnwindSafe,

§

impl<'ch, P> Send for Split<'ch, P>

§

impl<'ch, P> Sync for Split<'ch, P>

§

impl<'ch, P> Unpin for Split<'ch, P>
where + P: Unpin,

§

impl<'ch, P> UnwindSafe for Split<'ch, P>
where + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.SplitAsciiWhitespace.html b/rayon/str/struct.SplitAsciiWhitespace.html new file mode 100644 index 0000000000..9757d39fae --- /dev/null +++ b/rayon/str/struct.SplitAsciiWhitespace.html @@ -0,0 +1,190 @@ +SplitAsciiWhitespace in rayon::str - Rust +
pub struct SplitAsciiWhitespace<'ch>(/* private fields */);
Expand description

Parallel iterator over substrings separated by ASCII whitespace

+

Trait Implementations§

source§

impl<'ch> Clone for SplitAsciiWhitespace<'ch>

source§

fn clone(&self) -> SplitAsciiWhitespace<'ch>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch> Debug for SplitAsciiWhitespace<'ch>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch> ParallelIterator for SplitAsciiWhitespace<'ch>

§

type Item = &'ch str

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch> Freeze for SplitAsciiWhitespace<'ch>

§

impl<'ch> RefUnwindSafe for SplitAsciiWhitespace<'ch>

§

impl<'ch> Send for SplitAsciiWhitespace<'ch>

§

impl<'ch> Sync for SplitAsciiWhitespace<'ch>

§

impl<'ch> Unpin for SplitAsciiWhitespace<'ch>

§

impl<'ch> UnwindSafe for SplitAsciiWhitespace<'ch>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.SplitInclusive.html b/rayon/str/struct.SplitInclusive.html new file mode 100644 index 0000000000..ad131cbbc4 --- /dev/null +++ b/rayon/str/struct.SplitInclusive.html @@ -0,0 +1,194 @@ +SplitInclusive in rayon::str - Rust +

Struct rayon::str::SplitInclusive

source ·
pub struct SplitInclusive<'ch, P: Pattern> { /* private fields */ }
Expand description

Parallel iterator over substrings separated by a pattern

+

Trait Implementations§

source§

impl<'ch, P: Clone + Pattern> Clone for SplitInclusive<'ch, P>

source§

fn clone(&self) -> SplitInclusive<'ch, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch, P: Debug + Pattern> Debug for SplitInclusive<'ch, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch, P: Pattern> ParallelIterator for SplitInclusive<'ch, P>

§

type Item = &'ch str

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch, P> Freeze for SplitInclusive<'ch, P>
where + P: Freeze,

§

impl<'ch, P> RefUnwindSafe for SplitInclusive<'ch, P>
where + P: RefUnwindSafe,

§

impl<'ch, P> Send for SplitInclusive<'ch, P>

§

impl<'ch, P> Sync for SplitInclusive<'ch, P>

§

impl<'ch, P> Unpin for SplitInclusive<'ch, P>
where + P: Unpin,

§

impl<'ch, P> UnwindSafe for SplitInclusive<'ch, P>
where + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.SplitTerminator.html b/rayon/str/struct.SplitTerminator.html new file mode 100644 index 0000000000..fc02d7fe11 --- /dev/null +++ b/rayon/str/struct.SplitTerminator.html @@ -0,0 +1,194 @@ +SplitTerminator in rayon::str - Rust +

Struct rayon::str::SplitTerminator

source ·
pub struct SplitTerminator<'ch, P: Pattern> { /* private fields */ }
Expand description

Parallel iterator over substrings separated by a terminator pattern

+

Trait Implementations§

source§

impl<'ch, P: Clone + Pattern> Clone for SplitTerminator<'ch, P>

source§

fn clone(&self) -> SplitTerminator<'ch, P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch, P: Debug + Pattern> Debug for SplitTerminator<'ch, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch, P: Pattern> ParallelIterator for SplitTerminator<'ch, P>

§

type Item = &'ch str

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch, P> Freeze for SplitTerminator<'ch, P>
where + P: Freeze,

§

impl<'ch, P> RefUnwindSafe for SplitTerminator<'ch, P>
where + P: RefUnwindSafe,

§

impl<'ch, P> Send for SplitTerminator<'ch, P>

§

impl<'ch, P> Sync for SplitTerminator<'ch, P>

§

impl<'ch, P> Unpin for SplitTerminator<'ch, P>
where + P: Unpin,

§

impl<'ch, P> UnwindSafe for SplitTerminator<'ch, P>
where + P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/struct.SplitWhitespace.html b/rayon/str/struct.SplitWhitespace.html new file mode 100644 index 0000000000..f6a455460e --- /dev/null +++ b/rayon/str/struct.SplitWhitespace.html @@ -0,0 +1,190 @@ +SplitWhitespace in rayon::str - Rust +

Struct rayon::str::SplitWhitespace

source ·
pub struct SplitWhitespace<'ch>(/* private fields */);
Expand description

Parallel iterator over substrings separated by whitespace

+

Trait Implementations§

source§

impl<'ch> Clone for SplitWhitespace<'ch>

source§

fn clone(&self) -> SplitWhitespace<'ch>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ch> Debug for SplitWhitespace<'ch>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'ch> ParallelIterator for SplitWhitespace<'ch>

§

type Item = &'ch str

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'ch> Freeze for SplitWhitespace<'ch>

§

impl<'ch> RefUnwindSafe for SplitWhitespace<'ch>

§

impl<'ch> Send for SplitWhitespace<'ch>

§

impl<'ch> Sync for SplitWhitespace<'ch>

§

impl<'ch> Unpin for SplitWhitespace<'ch>

§

impl<'ch> UnwindSafe for SplitWhitespace<'ch>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/str/trait.ParallelString.html b/rayon/str/trait.ParallelString.html new file mode 100644 index 0000000000..38edf65e2d --- /dev/null +++ b/rayon/str/trait.ParallelString.html @@ -0,0 +1,180 @@ +ParallelString in rayon::str - Rust +

Trait rayon::str::ParallelString

source ·
pub trait ParallelString {
+
Show 13 methods // Required method + fn as_parallel_string(&self) -> &str; + + // Provided methods + fn par_chars(&self) -> Chars<'_> { ... } + fn par_char_indices(&self) -> CharIndices<'_> { ... } + fn par_bytes(&self) -> Bytes<'_> { ... } + fn par_encode_utf16(&self) -> EncodeUtf16<'_> { ... } + fn par_split<P: Pattern>(&self, separator: P) -> Split<'_, P> { ... } + fn par_split_inclusive<P: Pattern>( + &self, + separator: P + ) -> SplitInclusive<'_, P> { ... } + fn par_split_terminator<P: Pattern>( + &self, + terminator: P + ) -> SplitTerminator<'_, P> { ... } + fn par_lines(&self) -> Lines<'_> { ... } + fn par_split_whitespace(&self) -> SplitWhitespace<'_> { ... } + fn par_split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_> { ... } + fn par_matches<P: Pattern>(&self, pattern: P) -> Matches<'_, P> { ... } + fn par_match_indices<P: Pattern>(&self, pattern: P) -> MatchIndices<'_, P> { ... } +
}
Expand description

Parallel extensions for strings.

+

Required Methods§

source

fn as_parallel_string(&self) -> &str

Returns a plain string slice, which is used to implement the rest of +the parallel methods.

+

Provided Methods§

source

fn par_chars(&self) -> Chars<'_>

Returns a parallel iterator over the characters of a string.

+
§Examples
+
use rayon::prelude::*;
+let max = "hello".par_chars().max_by_key(|c| *c as i32);
+assert_eq!(Some('o'), max);
+
source

fn par_char_indices(&self) -> CharIndices<'_>

Returns a parallel iterator over the characters of a string, with their positions.

+
§Examples
+
use rayon::prelude::*;
+let min = "hello".par_char_indices().min_by_key(|&(_i, c)| c as i32);
+assert_eq!(Some((1, 'e')), min);
+
source

fn par_bytes(&self) -> Bytes<'_>

Returns a parallel iterator over the bytes of a string.

+

Note that multi-byte sequences (for code points greater than U+007F) +are produced as separate items, but will not be split across threads. +If you would prefer an indexed iterator without that guarantee, consider +string.as_bytes().par_iter().copied() instead.

+
§Examples
+
use rayon::prelude::*;
+let max = "hello".par_bytes().max();
+assert_eq!(Some(b'o'), max);
+
source

fn par_encode_utf16(&self) -> EncodeUtf16<'_>

Returns a parallel iterator over a string encoded as UTF-16.

+

Note that surrogate pairs (for code points greater than U+FFFF) are +produced as separate items, but will not be split across threads.

+
§Examples
+
use rayon::prelude::*;
+
+let max = "hello".par_encode_utf16().max();
+assert_eq!(Some(b'o' as u16), max);
+
+let text = "Zażółć gęślą jaźń";
+let utf8_len = text.len();
+let utf16_len = text.par_encode_utf16().count();
+assert!(utf16_len <= utf8_len);
+
source

fn par_split<P: Pattern>(&self, separator: P) -> Split<'_, P>

Returns a parallel iterator over substrings separated by a +given character or predicate, similar to str::split.

+

Note: the Pattern trait is private, for use only by Rayon itself. +It is implemented for char, &[char], [char; N], &[char; N], +and any function or closure F: Fn(char) -> bool + Sync + Send.

+
§Examples
+
use rayon::prelude::*;
+let total = "1, 2, buckle, 3, 4, door"
+   .par_split(',')
+   .filter_map(|s| s.trim().parse::<i32>().ok())
+   .sum();
+assert_eq!(10, total);
+
source

fn par_split_inclusive<P: Pattern>(&self, separator: P) -> SplitInclusive<'_, P>

Returns a parallel iterator over substrings separated by a +given character or predicate, keeping the matched part as a terminator +of the substring similar to str::split_inclusive.

+

Note: the Pattern trait is private, for use only by Rayon itself. +It is implemented for char, &[char], [char; N], &[char; N], +and any function or closure F: Fn(char) -> bool + Sync + Send.

+
§Examples
+
use rayon::prelude::*;
+let lines: Vec<_> = "Mary had a little lamb\nlittle lamb\nlittle lamb."
+   .par_split_inclusive('\n')
+   .collect();
+assert_eq!(lines, ["Mary had a little lamb\n", "little lamb\n", "little lamb."]);
+
source

fn par_split_terminator<P: Pattern>( + &self, + terminator: P +) -> SplitTerminator<'_, P>

Returns a parallel iterator over substrings terminated by a +given character or predicate, similar to str::split_terminator. +It’s equivalent to par_split, except it doesn’t produce an empty +substring after a trailing terminator.

+

Note: the Pattern trait is private, for use only by Rayon itself. +It is implemented for char, &[char], [char; N], &[char; N], +and any function or closure F: Fn(char) -> bool + Sync + Send.

+
§Examples
+
use rayon::prelude::*;
+let parts: Vec<_> = "((1 + 3) * 2)"
+    .par_split_terminator(|c| c == '(' || c == ')')
+    .collect();
+assert_eq!(vec!["", "", "1 + 3", " * 2"], parts);
+
source

fn par_lines(&self) -> Lines<'_>

Returns a parallel iterator over the lines of a string, ending with an +optional carriage return and with a newline (\r\n or just \n). +The final line ending is optional, and line endings are not included in +the output strings.

+
§Examples
+
use rayon::prelude::*;
+let lengths: Vec<_> = "hello world\nfizbuzz"
+    .par_lines()
+    .map(|l| l.len())
+    .collect();
+assert_eq!(vec![11, 7], lengths);
+
source

fn par_split_whitespace(&self) -> SplitWhitespace<'_>

Returns a parallel iterator over the sub-slices of a string that are +separated by any amount of whitespace.

+

As with str::split_whitespace, ‘whitespace’ is defined according to +the terms of the Unicode Derived Core Property White_Space. +If you only want to split on ASCII whitespace instead, use +par_split_ascii_whitespace.

+
§Examples
+
use rayon::prelude::*;
+let longest = "which is the longest word?"
+    .par_split_whitespace()
+    .max_by_key(|word| word.len());
+assert_eq!(Some("longest"), longest);
+

All kinds of whitespace are considered:

+ +
use rayon::prelude::*;
+let words: Vec<&str> = " Mary   had\ta\u{2009}little  \n\t lamb"
+    .par_split_whitespace()
+    .collect();
+assert_eq!(words, ["Mary", "had", "a", "little", "lamb"]);
+

If the string is empty or all whitespace, the iterator yields no string slices:

+ +
use rayon::prelude::*;
+assert_eq!("".par_split_whitespace().count(), 0);
+assert_eq!("   ".par_split_whitespace().count(), 0);
+
source

fn par_split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_>

Returns a parallel iterator over the sub-slices of a string that are +separated by any amount of ASCII whitespace.

+

To split by Unicode White_Space instead, use +par_split_whitespace.

+
§Examples
+
use rayon::prelude::*;
+let longest = "which is the longest word?"
+    .par_split_ascii_whitespace()
+    .max_by_key(|word| word.len());
+assert_eq!(Some("longest"), longest);
+

All kinds of ASCII whitespace are considered, but not Unicode White_Space:

+ +
use rayon::prelude::*;
+let words: Vec<&str> = " Mary   had\ta\u{2009}little  \n\t lamb"
+    .par_split_ascii_whitespace()
+    .collect();
+assert_eq!(words, ["Mary", "had", "a\u{2009}little", "lamb"]);
+

If the string is empty or all ASCII whitespace, the iterator yields no string slices:

+ +
use rayon::prelude::*;
+assert_eq!("".par_split_whitespace().count(), 0);
+assert_eq!("   ".par_split_whitespace().count(), 0);
+
source

fn par_matches<P: Pattern>(&self, pattern: P) -> Matches<'_, P>

Returns a parallel iterator over substrings that match a +given character or predicate, similar to str::matches.

+

Note: the Pattern trait is private, for use only by Rayon itself. +It is implemented for char, &[char], [char; N], &[char; N], +and any function or closure F: Fn(char) -> bool + Sync + Send.

+
§Examples
+
use rayon::prelude::*;
+let total = "1, 2, buckle, 3, 4, door"
+   .par_matches(char::is_numeric)
+   .map(|s| s.parse::<i32>().expect("digit"))
+   .sum();
+assert_eq!(10, total);
+
source

fn par_match_indices<P: Pattern>(&self, pattern: P) -> MatchIndices<'_, P>

Returns a parallel iterator over substrings that match a given character +or predicate, with their positions, similar to str::match_indices.

+

Note: the Pattern trait is private, for use only by Rayon itself. +It is implemented for char, &[char], [char; N], &[char; N], +and any function or closure F: Fn(char) -> bool + Sync + Send.

+
§Examples
+
use rayon::prelude::*;
+let digits: Vec<_> = "1, 2, buckle, 3, 4, door"
+   .par_match_indices(char::is_numeric)
+   .collect();
+assert_eq!(digits, vec![(0, "1"), (3, "2"), (14, "3"), (17, "4")]);
+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ParallelString for str

Implementors§

\ No newline at end of file diff --git a/rayon/string/index.html b/rayon/string/index.html new file mode 100644 index 0000000000..c1083a9e7b --- /dev/null +++ b/rayon/string/index.html @@ -0,0 +1,6 @@ +rayon::string - Rust +

Module rayon::string

source ·
Expand description

This module contains the parallel iterator types for owned strings +(String). You will rarely need to interact with it directly +unless you have need to name one of the iterator types.

+

Structs§

  • Draining parallel iterator that moves a range of characters out of a string, +but keeps the total capacity.
\ No newline at end of file diff --git a/rayon/string/sidebar-items.js b/rayon/string/sidebar-items.js new file mode 100644 index 0000000000..da083cd8c6 --- /dev/null +++ b/rayon/string/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Drain"]}; \ No newline at end of file diff --git a/rayon/string/struct.Drain.html b/rayon/string/struct.Drain.html new file mode 100644 index 0000000000..7e119efa3f --- /dev/null +++ b/rayon/string/struct.Drain.html @@ -0,0 +1,190 @@ +Drain in rayon::string - Rust +

Struct rayon::string::Drain

source ·
pub struct Drain<'a> { /* private fields */ }
Expand description

Draining parallel iterator that moves a range of characters out of a string, +but keeps the total capacity.

+

Trait Implementations§

source§

impl<'a> Debug for Drain<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Drop for Drain<'a>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a> ParallelIterator for Drain<'a>

§

type Item = char

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Drain<'a>

§

impl<'a> RefUnwindSafe for Drain<'a>

§

impl<'a> Send for Drain<'a>

§

impl<'a> Sync for Drain<'a>

§

impl<'a> Unpin for Drain<'a>

§

impl<'a> !UnwindSafe for Drain<'a>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.BroadcastContext.html b/rayon/struct.BroadcastContext.html new file mode 100644 index 0000000000..ff99bfc932 --- /dev/null +++ b/rayon/struct.BroadcastContext.html @@ -0,0 +1,26 @@ +BroadcastContext in rayon - Rust +

Struct rayon::BroadcastContext

source ·
pub struct BroadcastContext<'a> { /* private fields */ }
Expand description

Provides context to a closure called by broadcast.

+

Implementations§

source§

impl<'a> BroadcastContext<'a>

source

pub fn index(&self) -> usize

Our index amongst the broadcast threads (ranges from 0..self.num_threads()).

+
source

pub fn num_threads(&self) -> usize

The number of threads receiving the broadcast in the thread pool.

+
§Future compatibility note
+

Future versions of Rayon might vary the number of threads over time, but +this method will always return the number of threads which are actually +receiving your particular broadcast call.

+

Trait Implementations§

source§

impl<'a> Debug for BroadcastContext<'a>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for BroadcastContext<'a>

§

impl<'a> !RefUnwindSafe for BroadcastContext<'a>

§

impl<'a> !Send for BroadcastContext<'a>

§

impl<'a> !Sync for BroadcastContext<'a>

§

impl<'a> Unpin for BroadcastContext<'a>

§

impl<'a> !UnwindSafe for BroadcastContext<'a>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.FnContext.html b/rayon/struct.FnContext.html new file mode 100644 index 0000000000..2e4447f8a6 --- /dev/null +++ b/rayon/struct.FnContext.html @@ -0,0 +1,22 @@ +FnContext in rayon - Rust +

Struct rayon::FnContext

source ·
pub struct FnContext { /* private fields */ }
Expand description

Provides the calling context to a closure called by join_context.

+

Implementations§

source§

impl FnContext

source

pub fn migrated(&self) -> bool

Returns true if the closure was called from a different thread +than it was provided from.

+

Trait Implementations§

source§

impl Debug for FnContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.Scope.html b/rayon/struct.Scope.html new file mode 100644 index 0000000000..e855954470 --- /dev/null +++ b/rayon/struct.Scope.html @@ -0,0 +1,67 @@ +Scope in rayon - Rust +

Struct rayon::Scope

source ·
pub struct Scope<'scope> { /* private fields */ }
Expand description

Represents a fork-join scope which can be used to spawn any number of tasks. +See scope() for more information.

+

Implementations§

source§

impl<'scope> Scope<'scope>

source

pub fn spawn<BODY>(&self, body: BODY)
where + BODY: FnOnce(&Scope<'scope>) + Send + 'scope,

Spawns a job into the fork-join scope self. This job will +execute sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its +own reference to the scope self as argument. This can be +used to inject new jobs into self.

+
§Returns
+

Nothing. The spawned closures cannot pass back values to the +caller directly, though they can write to local variables on +the stack (if those variables outlive the scope) or +communicate through shared channels.

+

(The intention is to eventually integrate with Rust futures to +support spawns of functions that compute a value.)

+
§Examples
+
let mut value_a = None;
+let mut value_b = None;
+let mut value_c = None;
+rayon::scope(|s| {
+    s.spawn(|s1| {
+          // ^ this is the same scope as `s`; this handle `s1`
+          //   is intended for use by the spawned task,
+          //   since scope handles cannot cross thread boundaries.
+
+        value_a = Some(22);
+
+        // the scope `s` will not end until all these tasks are done
+        s1.spawn(|_| {
+            value_b = Some(44);
+        });
+    });
+
+    s.spawn(|_| {
+        value_c = Some(66);
+    });
+});
+assert_eq!(value_a, Some(22));
+assert_eq!(value_b, Some(44));
+assert_eq!(value_c, Some(66));
+
§See also
+

The scope function has more extensive documentation about +task spawning.

+
source

pub fn spawn_broadcast<BODY>(&self, body: BODY)
where + BODY: Fn(&Scope<'scope>, BroadcastContext<'_>) + Send + Sync + 'scope,

Spawns a job into every thread of the fork-join scope self. This job will +execute on each thread sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its own reference +to the scope self as argument, as well as a BroadcastContext.

+

Trait Implementations§

source§

impl<'scope> Debug for Scope<'scope>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'scope> !Freeze for Scope<'scope>

§

impl<'scope> !RefUnwindSafe for Scope<'scope>

§

impl<'scope> Send for Scope<'scope>

§

impl<'scope> Sync for Scope<'scope>

§

impl<'scope> Unpin for Scope<'scope>

§

impl<'scope> !UnwindSafe for Scope<'scope>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.ScopeFifo.html b/rayon/struct.ScopeFifo.html new file mode 100644 index 0000000000..abf07085d6 --- /dev/null +++ b/rayon/struct.ScopeFifo.html @@ -0,0 +1,37 @@ +ScopeFifo in rayon - Rust +

Struct rayon::ScopeFifo

source ·
pub struct ScopeFifo<'scope> { /* private fields */ }
Expand description

Represents a fork-join scope which can be used to spawn any number of tasks. +Those spawned from the same thread are prioritized in relative FIFO order. +See scope_fifo() for more information.

+

Implementations§

source§

impl<'scope> ScopeFifo<'scope>

source

pub fn spawn_fifo<BODY>(&self, body: BODY)
where + BODY: FnOnce(&ScopeFifo<'scope>) + Send + 'scope,

Spawns a job into the fork-join scope self. This job will +execute sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its +own reference to the scope self as argument. This can be +used to inject new jobs into self.

+
§See also
+

This method is akin to Scope::spawn(), but with a FIFO +priority. The scope_fifo function has more details about +this distinction.

+
source

pub fn spawn_broadcast<BODY>(&self, body: BODY)
where + BODY: Fn(&ScopeFifo<'scope>, BroadcastContext<'_>) + Send + Sync + 'scope,

Spawns a job into every thread of the fork-join scope self. This job will +execute on each thread sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its own reference +to the scope self as argument, as well as a BroadcastContext.

+

Trait Implementations§

source§

impl<'scope> Debug for ScopeFifo<'scope>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'scope> !Freeze for ScopeFifo<'scope>

§

impl<'scope> !RefUnwindSafe for ScopeFifo<'scope>

§

impl<'scope> Send for ScopeFifo<'scope>

§

impl<'scope> Sync for ScopeFifo<'scope>

§

impl<'scope> Unpin for ScopeFifo<'scope>

§

impl<'scope> !UnwindSafe for ScopeFifo<'scope>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.ThreadBuilder.html b/rayon/struct.ThreadBuilder.html new file mode 100644 index 0000000000..c7be0ddf22 --- /dev/null +++ b/rayon/struct.ThreadBuilder.html @@ -0,0 +1,26 @@ +ThreadBuilder in rayon - Rust +

Struct rayon::ThreadBuilder

source ·
pub struct ThreadBuilder { /* private fields */ }
Expand description

Thread builder used for customization via +ThreadPoolBuilder::spawn_handler.

+

Implementations§

source§

impl ThreadBuilder

source

pub fn index(&self) -> usize

Gets the index of this thread in the pool, within 0..num_threads.

+
source

pub fn name(&self) -> Option<&str>

Gets the string that was specified by ThreadPoolBuilder::name().

+
source

pub fn stack_size(&self) -> Option<usize>

Gets the value that was specified by ThreadPoolBuilder::stack_size().

+
source

pub fn run(self)

Executes the main loop for this thread. This will not return until the +thread pool is dropped.

+

Trait Implementations§

source§

impl Debug for ThreadBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.ThreadPool.html b/rayon/struct.ThreadPool.html new file mode 100644 index 0000000000..f06a8519ba --- /dev/null +++ b/rayon/struct.ThreadPool.html @@ -0,0 +1,206 @@ +ThreadPool in rayon - Rust +

Struct rayon::ThreadPool

source ·
pub struct ThreadPool { /* private fields */ }
Expand description

Represents a user created thread-pool.

+

Use a ThreadPoolBuilder to specify the number and/or names of threads +in the pool. After calling ThreadPoolBuilder::build(), you can then +execute functions explicitly within this ThreadPool using +ThreadPool::install(). By contrast, top level rayon functions +(like join()) will execute implicitly within the current thread-pool.

+

§Creating a ThreadPool

+
let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+

install() executes a closure in one of the ThreadPool’s +threads. In addition, any other rayon operations called inside of install() will also +execute in the context of the ThreadPool.

+

When the ThreadPool is dropped, that’s a signal for the threads it manages to terminate, +they will complete executing any remaining work that you have spawned, and automatically +terminate.

+

Implementations§

source§

impl ThreadPool

source

pub fn new(configuration: Configuration) -> Result<ThreadPool, Box<dyn Error>>

👎Deprecated: Use ThreadPoolBuilder::build

Deprecated in favor of ThreadPoolBuilder::build.

+
source

pub fn install<OP, R>(&self, op: OP) -> R
where + OP: FnOnce() -> R + Send, + R: Send,

Executes op within the threadpool. Any attempts to use +join, scope, or parallel iterators will then operate +within that threadpool.

+
§Warning: thread-local data
+

Because op is executing within the Rayon thread-pool, +thread-local data from the current thread will not be +accessible.

+
§Warning: execution order
+

If the current thread is part of a different thread pool, it will try to +keep busy while the op completes in its target pool, similar to +calling ThreadPool::yield_now() in a loop. Therefore, it may +potentially schedule other tasks to run on the current thread in the +meantime. For example

+ +
fn main() {
+    rayon::ThreadPoolBuilder::new().num_threads(1).build_global().unwrap();
+    let pool = rayon_core::ThreadPoolBuilder::default().build().unwrap();
+    let do_it = || {
+        print!("one ");
+        pool.install(||{});
+        print!("two ");
+    };
+    rayon::join(|| do_it(), || do_it());
+}
+

Since we configured just one thread in the global pool, one might +expect do_it() to run sequentially, producing:

+
one two one two
+
+

However each call to install() yields implicitly, allowing rayon to +run multiple instances of do_it() concurrently on the single, global +thread. The following output would be equally valid:

+
one one two two
+
§Panics
+

If op should panic, that panic will be propagated.

+
§Using install()
+
   fn main() {
+        let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+        let n = pool.install(|| fib(20));
+        println!("{}", n);
+   }
+
+   fn fib(n: usize) -> usize {
+        if n == 0 || n == 1 {
+            return n;
+        }
+        let (a, b) = rayon::join(|| fib(n - 1), || fib(n - 2)); // runs inside of `pool`
+        return a + b;
+    }
+
source

pub fn broadcast<OP, R>(&self, op: OP) -> Vec<R>
where + OP: Fn(BroadcastContext<'_>) -> R + Sync, + R: Send,

Executes op within every thread in the threadpool. Any attempts to use +join, scope, or parallel iterators will then operate within that +threadpool.

+

Broadcasts are executed on each thread after they have exhausted their +local work queue, before they attempt work-stealing from other threads. +The goal of that strategy is to run everywhere in a timely manner +without being too disruptive to current work. There may be alternative +broadcast styles added in the future for more or less aggressive +injection, if the need arises.

+
§Warning: thread-local data
+

Because op is executing within the Rayon thread-pool, +thread-local data from the current thread will not be +accessible.

+
§Panics
+

If op should panic on one or more threads, exactly one panic +will be propagated, only after all threads have completed +(or panicked) their own op.

+
§Examples
+
   use std::sync::atomic::{AtomicUsize, Ordering};
+
+   fn main() {
+        let pool = rayon::ThreadPoolBuilder::new().num_threads(5).build().unwrap();
+
+        // The argument gives context, including the index of each thread.
+        let v: Vec<usize> = pool.broadcast(|ctx| ctx.index() * ctx.index());
+        assert_eq!(v, &[0, 1, 4, 9, 16]);
+
+        // The closure can reference the local stack
+        let count = AtomicUsize::new(0);
+        pool.broadcast(|_| count.fetch_add(1, Ordering::Relaxed));
+        assert_eq!(count.into_inner(), 5);
+   }
+
source

pub fn current_num_threads(&self) -> usize

Returns the (current) number of threads in the thread pool.

+
§Future compatibility note
+

Note that unless this thread-pool was created with a +ThreadPoolBuilder that specifies the number of threads, +then this number may vary over time in future versions (see the +num_threads() method for details).

+
source

pub fn current_thread_index(&self) -> Option<usize>

If called from a Rayon worker thread in this thread-pool, +returns the index of that thread; if not called from a Rayon +thread, or called from a Rayon thread that belongs to a +different thread-pool, returns None.

+

The index for a given thread will not change over the thread’s +lifetime. However, multiple threads may share the same index if +they are in distinct thread-pools.

+
§Future compatibility note
+

Currently, every thread-pool (including the global +thread-pool) has a fixed number of threads, but this may +change in future Rayon versions (see the num_threads() method +for details). In that case, the index for a +thread would not change during its lifetime, but thread +indices may wind up being reused if threads are terminated and +restarted.

+
source

pub fn current_thread_has_pending_tasks(&self) -> Option<bool>

Returns true if the current worker thread currently has “local +tasks” pending. This can be useful as part of a heuristic for +deciding whether to spawn a new task or execute code on the +current thread, particularly in breadth-first +schedulers. However, keep in mind that this is an inherently +racy check, as other worker threads may be actively “stealing” +tasks from our local deque.

+

Background: Rayon’s uses a work-stealing scheduler. The +key idea is that each thread has its own deque of +tasks. Whenever a new task is spawned – whether through +join(), Scope::spawn(), or some other means – that new +task is pushed onto the thread’s local deque. Worker threads +have a preference for executing their own tasks; if however +they run out of tasks, they will go try to “steal” tasks from +other threads. This function therefore has an inherent race +with other active worker threads, which may be removing items +from the local deque.

+
source

pub fn join<A, B, RA, RB>(&self, oper_a: A, oper_b: B) -> (RA, RB)
where + A: FnOnce() -> RA + Send, + B: FnOnce() -> RB + Send, + RA: Send, + RB: Send,

Execute oper_a and oper_b in the thread-pool and return +the results. Equivalent to self.install(|| join(oper_a, oper_b)).

+
source

pub fn scope<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R + Send, + R: Send,

Creates a scope that executes within this thread-pool. +Equivalent to self.install(|| scope(...)).

+

See also: the scope() function.

+
source

pub fn scope_fifo<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R + Send, + R: Send,

Creates a scope that executes within this thread-pool. +Spawns from the same thread are prioritized in relative FIFO order. +Equivalent to self.install(|| scope_fifo(...)).

+

See also: the scope_fifo() function.

+
source

pub fn in_place_scope<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R,

Creates a scope that spawns work into this thread-pool.

+

See also: the in_place_scope() function.

+
source

pub fn in_place_scope_fifo<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R,

Creates a scope that spawns work into this thread-pool in FIFO order.

+

See also: the in_place_scope_fifo() function.

+
source

pub fn spawn<OP>(&self, op: OP)
where + OP: FnOnce() + Send + 'static,

Spawns an asynchronous task in this thread-pool. This task will +run in the implicit, global scope, which means that it may outlast +the current stack frame – therefore, it cannot capture any references +onto the stack (you will likely need a move closure).

+

See also: the spawn() function defined on scopes.

+
source

pub fn spawn_fifo<OP>(&self, op: OP)
where + OP: FnOnce() + Send + 'static,

Spawns an asynchronous task in this thread-pool. This task will +run in the implicit, global scope, which means that it may outlast +the current stack frame – therefore, it cannot capture any references +onto the stack (you will likely need a move closure).

+

See also: the spawn_fifo() function defined on scopes.

+
source

pub fn spawn_broadcast<OP>(&self, op: OP)
where + OP: Fn(BroadcastContext<'_>) + Send + Sync + 'static,

Spawns an asynchronous task on every thread in this thread-pool. This task +will run in the implicit, global scope, which means that it may outlast the +current stack frame – therefore, it cannot capture any references onto the +stack (you will likely need a move closure).

+
source

pub fn yield_now(&self) -> Option<Yield>

Cooperatively yields execution to Rayon.

+

This is similar to the general yield_now(), but only if the current +thread is part of this thread pool.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if the current thread is not part this pool.

+
source

pub fn yield_local(&self) -> Option<Yield>

Cooperatively yields execution to local Rayon work.

+

This is similar to the general yield_local(), but only if the current +thread is part of this thread pool.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if the current thread is not part this pool.

+

Trait Implementations§

source§

impl Debug for ThreadPool

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Drop for ThreadPool

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.ThreadPoolBuildError.html b/rayon/struct.ThreadPoolBuildError.html new file mode 100644 index 0000000000..4f9348da27 --- /dev/null +++ b/rayon/struct.ThreadPoolBuildError.html @@ -0,0 +1,21 @@ +ThreadPoolBuildError in rayon - Rust +
pub struct ThreadPoolBuildError { /* private fields */ }
Expand description

Error when initializing a thread pool.

+

Trait Implementations§

source§

impl Debug for ThreadPoolBuildError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for ThreadPoolBuildError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for ThreadPoolBuildError

source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/struct.ThreadPoolBuilder.html b/rayon/struct.ThreadPoolBuilder.html new file mode 100644 index 0000000000..587b55815c --- /dev/null +++ b/rayon/struct.ThreadPoolBuilder.html @@ -0,0 +1,236 @@ +ThreadPoolBuilder in rayon - Rust +
pub struct ThreadPoolBuilder<S = DefaultSpawn> { /* private fields */ }
Expand description

Used to create a new ThreadPool or to configure the global rayon thread pool.

+

§Creating a ThreadPool

+

The following creates a thread pool with 22 threads.

+ +
let pool = rayon::ThreadPoolBuilder::new().num_threads(22).build().unwrap();
+

To instead configure the global thread pool, use build_global():

+ +
rayon::ThreadPoolBuilder::new().num_threads(22).build_global().unwrap();
+

Implementations§

source§

impl ThreadPoolBuilder

source

pub fn new() -> ThreadPoolBuilder

Creates and returns a valid rayon thread pool builder, but does not initialize it.

+
source§

impl<S> ThreadPoolBuilder<S>
where + S: ThreadSpawn,

Note: the S: ThreadSpawn constraint is an internal implementation detail for the +default spawn and those set by spawn_handler.

+
source

pub fn build(self) -> Result<ThreadPool, ThreadPoolBuildError>

Creates a new ThreadPool initialized using this configuration.

+
source

pub fn build_global(self) -> Result<(), ThreadPoolBuildError>

Initializes the global thread pool. This initialization is +optional. If you do not call this function, the thread pool +will be automatically initialized with the default +configuration. Calling build_global is not recommended, except +in two scenarios:

+
    +
  • You wish to change the default configuration.
  • +
  • You are running a benchmark, in which case initializing may +yield slightly more consistent results, since the worker threads +will already be ready to go even in the first iteration. But +this cost is minimal.
  • +
+

Initialization of the global thread pool happens exactly +once. Once started, the configuration cannot be +changed. Therefore, if you call build_global a second time, it +will return an error. An Ok result indicates that this +is the first initialization of the thread pool.

+
source§

impl ThreadPoolBuilder

source

pub fn build_scoped<W, F, R>( + self, + wrapper: W, + with_pool: F +) -> Result<R, ThreadPoolBuildError>
where + W: Fn(ThreadBuilder) + Sync, + F: FnOnce(&ThreadPool) -> R,

Creates a scoped ThreadPool initialized using this configuration.

+

This is a convenience function for building a pool using std::thread::scope +to spawn threads in a spawn_handler. +The threads in this pool will start by calling wrapper, which should +do initialization and continue by calling ThreadBuilder::run().

+
§Examples
+

A scoped pool may be useful in combination with scoped thread-local variables.

+ +

+scoped_tls::scoped_thread_local!(static POOL_DATA: Vec<i32>);
+
+fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    let pool_data = vec![1, 2, 3];
+
+    // We haven't assigned any TLS data yet.
+    assert!(!POOL_DATA.is_set());
+
+    rayon::ThreadPoolBuilder::new()
+        .build_scoped(
+            // Borrow `pool_data` in TLS for each thread.
+            |thread| POOL_DATA.set(&pool_data, || thread.run()),
+            // Do some work that needs the TLS data.
+            |pool| pool.install(|| assert!(POOL_DATA.is_set())),
+        )?;
+
+    // Once we've returned, `pool_data` is no longer borrowed.
+    drop(pool_data);
+    Ok(())
+}
+
source§

impl<S> ThreadPoolBuilder<S>

source

pub fn spawn_handler<F>(self, spawn: F) -> ThreadPoolBuilder<CustomSpawn<F>>
where + F: FnMut(ThreadBuilder) -> Result<(), Error>,

Sets a custom function for spawning threads.

+

Note that the threads will not exit until after the pool is dropped. It +is up to the caller to wait for thread termination if that is important +for any invariants. For instance, threads created in std::thread::scope +will be joined before that scope returns, and this will block indefinitely +if the pool is leaked. Furthermore, the global thread pool doesn’t terminate +until the entire process exits!

+
§Examples
+

A minimal spawn handler just needs to call run() from an independent thread.

+ +
fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    let pool = rayon::ThreadPoolBuilder::new()
+        .spawn_handler(|thread| {
+            std::thread::spawn(|| thread.run());
+            Ok(())
+        })
+        .build()?;
+
+    pool.install(|| println!("Hello from my custom thread!"));
+    Ok(())
+}
+

The default spawn handler sets the name and stack size if given, and propagates +any errors from the thread builder.

+ +
fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    let pool = rayon::ThreadPoolBuilder::new()
+        .spawn_handler(|thread| {
+            let mut b = std::thread::Builder::new();
+            if let Some(name) = thread.name() {
+                b = b.name(name.to_owned());
+            }
+            if let Some(stack_size) = thread.stack_size() {
+                b = b.stack_size(stack_size);
+            }
+            b.spawn(|| thread.run())?;
+            Ok(())
+        })
+        .build()?;
+
+    pool.install(|| println!("Hello from my fully custom thread!"));
+    Ok(())
+}
+

This can also be used for a pool of scoped threads like crossbeam::scope, +or std::thread::scope introduced in Rust 1.63, which is encapsulated in +build_scoped.

+ +
fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    std::thread::scope(|scope| {
+        let pool = rayon::ThreadPoolBuilder::new()
+            .spawn_handler(|thread| {
+                let mut builder = std::thread::Builder::new();
+                if let Some(name) = thread.name() {
+                    builder = builder.name(name.to_string());
+                }
+                if let Some(size) = thread.stack_size() {
+                    builder = builder.stack_size(size);
+                }
+                builder.spawn_scoped(scope, || {
+                    // Add any scoped initialization here, then run!
+                    thread.run()
+                })?;
+                Ok(())
+            })
+            .build()?;
+
+        pool.install(|| println!("Hello from my custom scoped thread!"));
+        Ok(())
+    })
+}
+
source

pub fn thread_name<F>(self, closure: F) -> ThreadPoolBuilder<S>
where + F: FnMut(usize) -> String + 'static,

Sets a closure which takes a thread index and returns +the thread’s name.

+
source

pub fn num_threads(self, num_threads: usize) -> ThreadPoolBuilder<S>

Sets the number of threads to be used in the rayon threadpool.

+

If you specify a non-zero number of threads using this +function, then the resulting thread-pools are guaranteed to +start at most this number of threads.

+

If num_threads is 0, or you do not call this function, then +the Rayon runtime will select the number of threads +automatically. At present, this is based on the +RAYON_NUM_THREADS environment variable (if set), +or the number of logical CPUs (otherwise). +In the future, however, the default behavior may +change to dynamically add or remove threads as needed.

+

Future compatibility warning: Given the default behavior +may change in the future, if you wish to rely on a fixed +number of threads, you should use this function to specify +that number. To reproduce the current default behavior, you +may wish to use std::thread::available_parallelism +to query the number of CPUs dynamically.

+

Old environment variable: RAYON_NUM_THREADS is a one-to-one +replacement of the now deprecated RAYON_RS_NUM_CPUS environment +variable. If both variables are specified, RAYON_NUM_THREADS will +be preferred.

+
source

pub fn use_current_thread(self) -> ThreadPoolBuilder<S>

Use the current thread as one of the threads in the pool.

+

The current thread is guaranteed to be at index 0, and since the thread is not managed by +rayon, the spawn and exit handlers do not run for that thread.

+

Note that the current thread won’t run the main work-stealing loop, so jobs spawned into +the thread-pool will generally not be picked up automatically by this thread unless you +yield to rayon in some way, like via yield_now(), yield_local(), or scope().

+
§Local thread-pools
+

Using this in a local thread-pool means the registry will be leaked. In future versions +there might be a way of cleaning up the current-thread state.

+
source

pub fn panic_handler<H>(self, panic_handler: H) -> ThreadPoolBuilder<S>
where + H: Fn(Box<dyn Any + Send>) + Send + Sync + 'static,

Normally, whenever Rayon catches a panic, it tries to +propagate it to someplace sensible, to try and reflect the +semantics of sequential execution. But in some cases, +particularly with the spawn() APIs, there is no +obvious place where we should propagate the panic to. +In that case, this panic handler is invoked.

+

If no panic handler is set, the default is to abort the +process, under the principle that panics should not go +unobserved.

+

If the panic handler itself panics, this will abort the +process. To prevent this, wrap the body of your panic handler +in a call to std::panic::catch_unwind().

+
source

pub fn stack_size(self, stack_size: usize) -> ThreadPoolBuilder<S>

Sets the stack size of the worker threads

+
source

pub fn breadth_first(self) -> ThreadPoolBuilder<S>

👎Deprecated: use scope_fifo and spawn_fifo for similar effect

(DEPRECATED) Suggest to worker threads that they execute +spawned jobs in a “breadth-first” fashion.

+

Typically, when a worker thread is idle or blocked, it will +attempt to execute the job from the top of its local deque of +work (i.e., the job most recently spawned). If this flag is set +to true, however, workers will prefer to execute in a +breadth-first fashion – that is, they will search for jobs at +the bottom of their local deque. (At present, workers always +steal from the bottom of other workers’ deques, regardless of +the setting of this flag.)

+

If you think of the tasks as a tree, where a parent task +spawns its children in the tree, then this flag loosely +corresponds to doing a breadth-first traversal of the tree, +whereas the default would be to do a depth-first traversal.

+

Note that this is an “execution hint”. Rayon’s task +execution is highly dynamic and the precise order in which +independent tasks are executed is not intended to be +guaranteed.

+

This breadth_first() method is now deprecated per RFC #1, +and in the future its effect may be removed. Consider using +scope_fifo() for a similar effect.

+
source

pub fn start_handler<H>(self, start_handler: H) -> ThreadPoolBuilder<S>
where + H: Fn(usize) + Send + Sync + 'static,

Sets a callback to be invoked on thread start.

+

The closure is passed the index of the thread on which it is invoked. +Note that this same closure may be invoked multiple times in parallel. +If this closure panics, the panic will be passed to the panic handler. +If that handler returns, then startup will continue normally.

+
source

pub fn exit_handler<H>(self, exit_handler: H) -> ThreadPoolBuilder<S>
where + H: Fn(usize) + Send + Sync + 'static,

Sets a callback to be invoked on thread exit.

+

The closure is passed the index of the thread on which it is invoked. +Note that this same closure may be invoked multiple times in parallel. +If this closure panics, the panic will be passed to the panic handler. +If that handler returns, then the thread will exit normally.

+

Trait Implementations§

source§

impl<S> Debug for ThreadPoolBuilder<S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ThreadPoolBuilder

source§

fn default() -> ThreadPoolBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<S> Freeze for ThreadPoolBuilder<S>
where + S: Freeze,

§

impl<S = DefaultSpawn> !RefUnwindSafe for ThreadPoolBuilder<S>

§

impl<S = DefaultSpawn> !Send for ThreadPoolBuilder<S>

§

impl<S = DefaultSpawn> !Sync for ThreadPoolBuilder<S>

§

impl<S> Unpin for ThreadPoolBuilder<S>
where + S: Unpin,

§

impl<S = DefaultSpawn> !UnwindSafe for ThreadPoolBuilder<S>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/vec/index.html b/rayon/vec/index.html new file mode 100644 index 0000000000..931fc2d95e --- /dev/null +++ b/rayon/vec/index.html @@ -0,0 +1,5 @@ +rayon::vec - Rust +

Module rayon::vec

source ·
Expand description

Parallel iterator types for vectors (Vec<T>)

+

You will rarely need to interact with this module directly unless you need +to name one of the iterator types.

+

Structs§

  • Draining parallel iterator that moves a range out of a vector, but keeps the total capacity.
  • Parallel iterator that moves out of a vector.
\ No newline at end of file diff --git a/rayon/vec/sidebar-items.js b/rayon/vec/sidebar-items.js new file mode 100644 index 0000000000..7537c78e37 --- /dev/null +++ b/rayon/vec/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Drain","IntoIter"]}; \ No newline at end of file diff --git a/rayon/vec/struct.Drain.html b/rayon/vec/struct.Drain.html new file mode 100644 index 0000000000..4f69f126be --- /dev/null +++ b/rayon/vec/struct.Drain.html @@ -0,0 +1,285 @@ +Drain in rayon::vec - Rust +

Struct rayon::vec::Drain

source ·
pub struct Drain<'data, T: Send> { /* private fields */ }
Expand description

Draining parallel iterator that moves a range out of a vector, but keeps the total capacity.

+

Trait Implementations§

source§

impl<'data, T: Debug + Send> Debug for Drain<'data, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, T: Send> Drop for Drain<'data, T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'data, T: Send> IndexedParallelIterator for Drain<'data, T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<'data, T: Send> ParallelIterator for Drain<'data, T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<'data, T> Freeze for Drain<'data, T>

§

impl<'data, T> RefUnwindSafe for Drain<'data, T>
where + T: RefUnwindSafe,

§

impl<'data, T> Send for Drain<'data, T>

§

impl<'data, T> Sync for Drain<'data, T>
where + T: Sync,

§

impl<'data, T> Unpin for Drain<'data, T>

§

impl<'data, T> !UnwindSafe for Drain<'data, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon/vec/struct.IntoIter.html b/rayon/vec/struct.IntoIter.html new file mode 100644 index 0000000000..dee4bd974d --- /dev/null +++ b/rayon/vec/struct.IntoIter.html @@ -0,0 +1,288 @@ +IntoIter in rayon::vec - Rust +

Struct rayon::vec::IntoIter

source ·
pub struct IntoIter<T: Send> { /* private fields */ }
Expand description

Parallel iterator that moves out of a vector.

+

Trait Implementations§

source§

impl<T: Clone + Send> Clone for IntoIter<T>

source§

fn clone(&self) -> IntoIter<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Send> Debug for IntoIter<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send> IndexedParallelIterator for IntoIter<T>

source§

fn drive<C>(self, consumer: C) -> C::Result
where + C: Consumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn len(&self) -> usize

Produces an exact count of how many items this iterator will +produce, presuming no panic occurs. Read more
source§

fn with_producer<CB>(self, callback: CB) -> CB::Output
where + CB: ProducerCallback<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn by_exponential_blocks(self) -> ExponentialBlocks<Self>

Divides an iterator into sequential blocks of exponentially-increasing size. Read more
source§

fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>

Divides an iterator into sequential blocks of the given size. Read more
source§

fn collect_into_vec(self, target: &mut Vec<Self::Item>)

Collects the results of the iterator into the specified +vector. The vector is always cleared before execution +begins. If possible, reusing the vector across calls can lead +to better performance since it reuses the same backing buffer. Read more
source§

fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
where + Self: IndexedParallelIterator<Item = (A, B)>, + A: Send, + B: Send,

Unzips the results of the iterator into the specified +vectors. The vectors are always cleared before execution +begins. If possible, reusing the vectors across calls can lead +to better performance since they reuse the same backing buffer. Read more
source§

fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>

Iterates over tuples (A, B), where the items A are from +this iterator and B are from the iterator given as argument. +Like the zip method on ordinary iterators, if the two +iterators are of unequal length, you only get the items they +have in common. Read more
source§

fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>

The same as Zip, but requires that both iterators have the same length. Read more
source§

fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator. Alternately yields elements from this iterator and +the given iterator, until both are exhausted. If one iterator +is exhausted before the other, the last elements are provided +from the other. Read more
source§

fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
where + I: IntoParallelIterator<Item = Self::Item>, + I::Iter: IndexedParallelIterator<Item = Self::Item>,

Interleaves elements of this iterator and the other given +iterator, until one is exhausted. Read more
source§

fn chunks(self, chunk_size: usize) -> Chunks<Self>

Splits an iterator up into fixed-size chunks. Read more
source§

fn fold_chunks<T, ID, F>( + self, + chunk_size: usize, + identity: ID, + fold_op: F +) -> FoldChunks<Self, ID, F>
where + ID: Fn() -> T + Send + Sync, + F: Fn(T, Self::Item) -> T + Send + Sync, + T: Send,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn fold_chunks_with<T, F>( + self, + chunk_size: usize, + init: T, + fold_op: F +) -> FoldChunksWith<Self, T, F>
where + T: Send + Clone, + F: Fn(T, Self::Item) -> T + Send + Sync,

Splits an iterator into fixed-size chunks, performing a sequential fold() on +each chunk. Read more
source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>

Lexicographically compares the elements of this ParallelIterator with those of +another. Read more
source§

fn eq<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are equal to those of another
source§

fn ne<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are unequal to those of another
source§

fn lt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically less than those of another.
source§

fn le<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn gt<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are lexicographically greater than those of another.
source§

fn ge<I>(self, other: I) -> bool

Determines if the elements of this ParallelIterator +are less or equal to those of another.
source§

fn enumerate(self) -> Enumerate<Self>

Yields an index along with each item. Read more
source§

fn step_by(self, step: usize) -> StepBy<Self>

Creates an iterator that steps by the given amount Read more
source§

fn skip(self, n: usize) -> Skip<Self>

Creates an iterator that skips the first n elements. Read more
source§

fn take(self, n: usize) -> Take<Self>

Creates an iterator that yields the first n elements. Read more
source§

fn position_any<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and returns its index. Like +ParallelIterator::find_any, the parallel search will not +necessarily find the first match, and once a match is +found we’ll attempt to stop processing any more. Read more
source§

fn position_first<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn position_last<P>(self, predicate: P) -> Option<usize>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate, and returns its index. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for items in the parallel iterator that match the given +predicate, and returns their indices. Read more
source§

fn rev(self) -> Rev<Self>

Produces a new iterator with the elements of this iterator in +reverse order. Read more
source§

fn with_min_len(self, min: usize) -> MinLen<Self>

Sets the minimum length of iterators desired to process in each +rayon job. Rayon will not split any smaller than this length, but +of course an iterator could already be smaller to begin with. Read more
source§

fn with_max_len(self, max: usize) -> MaxLen<Self>

Sets the maximum length of iterators desired to process in each +rayon job. Rayon will try to split at least below this length, +unless that would put it below the length from with_min_len(). +For example, given min=10 and max=15, a length of 16 will not be +split any further. Read more
source§

impl<T: Send> ParallelIterator for IntoIter<T>

§

type Item = T

The type of item that this parallel iterator produces. +For example, if you use the for_each method, this is the type of +item that your closure will be invoked with.
source§

fn drive_unindexed<C>(self, consumer: C) -> C::Result
where + C: UnindexedConsumer<Self::Item>,

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn opt_len(&self) -> Option<usize>

Internal method used to define the behavior of this parallel +iterator. You should not need to call this directly. Read more
source§

fn for_each<OP>(self, op: OP)
where + OP: Fn(Self::Item) + Sync + Send,

Executes OP on each item produced by the iterator, in parallel. Read more
source§

fn for_each_with<OP, T>(self, init: T, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + T: Send + Clone,

Executes OP on the given init value with each item produced by +the iterator, in parallel. Read more
source§

fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
where + OP: Fn(&mut T, Self::Item) + Sync + Send, + INIT: Fn() -> T + Sync + Send,

Executes OP on a value returned by init with each item produced by +the iterator, in parallel. Read more
source§

fn try_for_each<OP, R>(self, op: OP) -> R
where + OP: Fn(Self::Item) -> R + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on each item produced by the iterator, in parallel. Read more
source§

fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Try<Output = ()> + Send,

Executes a fallible OP on the given init value with each item +produced by the iterator, in parallel. Read more
source§

fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
where + OP: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Try<Output = ()> + Send,

Executes a fallible OP on a value returned by init with each item +produced by the iterator, in parallel. Read more
source§

fn count(self) -> usize

Counts the number of items in this parallel iterator. Read more
source§

fn map<F, R>(self, map_op: F) -> Map<Self, F>
where + F: Fn(Self::Item) -> R + Sync + Send, + R: Send,

Applies map_op to each item of this iterator, producing a new +iterator with the results. Read more
source§

fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + T: Send + Clone, + R: Send,

Applies map_op to the given init value with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn map_init<F, INIT, T, R>( + self, + init: INIT, + map_op: F +) -> MapInit<Self, INIT, F>
where + F: Fn(&mut T, Self::Item) -> R + Sync + Send, + INIT: Fn() -> T + Sync + Send, + R: Send,

Applies map_op to a value returned by init with each item of this +iterator, producing a new iterator with the results. Read more
source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which clones all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Clone. See also copied(). Read more
source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy + Send, + Self: ParallelIterator<Item = &'a T>,

Creates an iterator which copies all of its elements. This may be +useful when you have an iterator over &T, but you need T, and +that type implements Copy. See also cloned(). Read more
source§

fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
where + OP: Fn(&Self::Item) + Sync + Send,

Applies inspect_op to a reference to each item of this iterator, +producing a new iterator passing through the original items. This is +often useful for debugging to see what’s happening in iterator stages. Read more
source§

fn update<F>(self, update_op: F) -> Update<Self, F>
where + F: Fn(&mut Self::Item) + Sync + Send,

Mutates each item of this iterator before yielding it. Read more
source§

fn filter<P>(self, filter_op: P) -> Filter<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Applies filter_op to each item of this iterator, producing a new +iterator with only the items that gave true results. Read more
source§

fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies filter_op to each item of this iterator to get an Option, +producing a new iterator with only the items from Some results. Read more
source§

fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
where + F: Fn(Self::Item) -> PI + Sync + Send, + PI: IntoParallelIterator,

Applies map_op to each item of this iterator to get nested parallel iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
where + F: Fn(Self::Item) -> SI + Sync + Send, + SI: IntoIterator, + SI::Item: Send,

Applies map_op to each item of this iterator to get nested serial iterators, +producing a new parallel iterator that flattens these back into one. Read more
source§

fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send, + ID: Fn() -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +The argument identity should be a closure that can produce +“identity” value which may be inserted into the sequence as +needed to create opportunities for parallel execution. So, for +example, if you are doing a summation, then identity() ought +to produce something that represents the zero for your type +(but consider just calling sum() in that case). Read more
source§

fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
where + OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,

Reduces the items in the iterator into one item using op. +If the iterator is empty, None is returned; otherwise, +Some is returned. Read more
source§

fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + ID: Fn() -> T + Sync + Send, + T: Send,

Parallel fold is similar to sequential fold except that the +sequence of items may be subdivided before it is +folded. Consider a list of numbers like 22 3 77 89 46. If +you used sequential fold to add them (fold(0, |a,b| a+b), +you would wind up first adding 0 + 22, then 22 + 3, then 25 + +77, and so forth. The parallel fold works similarly except +that it first breaks up your list into sublists, and hence +instead of yielding up a single sum at the end, it yields up +multiple sums. The number of results is nondeterministic, as +is the point where the breaks occur. Read more
source§

fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
where + F: Fn(T, Self::Item) -> T + Sync + Send, + T: Send + Clone,

Applies fold_op to the given init value with each item of this +iterator, finally producing the value for further use. Read more
source§

fn try_fold<T, R, ID, F>( + self, + identity: ID, + fold_op: F +) -> TryFold<Self, R, ID, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + ID: Fn() -> T + Sync + Send, + R: Try<Output = T> + Send,

Performs a fallible parallel fold. Read more
source§

fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
where + F: Fn(T, Self::Item) -> R + Sync + Send, + R: Try<Output = T> + Send, + T: Clone + Send,

Performs a fallible parallel fold with a cloneable init value. Read more
source§

fn sum<S>(self) -> S
where + S: Send + Sum<Self::Item> + Sum<S>,

Sums up the items in the iterator. Read more
source§

fn product<P>(self) -> P
where + P: Send + Product<Self::Item> + Product<P>,

Multiplies all the items in the iterator. Read more
source§

fn min_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the minimum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(min) is returned. Read more
source§

fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the minimum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn max_by<F>(self, f: F) -> Option<Self::Item>
where + F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,

Computes the maximum of all the items in the iterator with respect to +the given comparison function. If the iterator is empty, None is +returned; otherwise, Some(max) is returned. Read more
source§

fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
where + K: Ord + Send, + F: Sync + Send + Fn(&Self::Item) -> K,

Computes the item that yields the maximum value for the given +function. If the iterator is empty, None is returned; +otherwise, Some(item) is returned. Read more
source§

fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
where + C: IntoParallelIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both. Read more
source§

fn find_any<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate and returns it. This operation +is similar to find on sequential iterators but +the item returned may not be the first one in the parallel +sequence which matches, since we search the entire sequence in parallel. Read more
source§

fn find_first<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially first item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_last<P>(self, predicate: P) -> Option<Self::Item>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Searches for the sequentially last item in the parallel iterator +that matches the given predicate and returns it. Read more
source§

fn find_map_any<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator +and returns any non-None result of the map operation. Read more
source§

fn find_map_first<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially first non-None result of the map operation. Read more
source§

fn find_map_last<P, R>(self, predicate: P) -> Option<R>
where + P: Fn(Self::Item) -> Option<R> + Sync + Send, + R: Send,

Applies the given predicate to the items in the parallel iterator and +returns the sequentially last non-None result of the map operation. Read more
source§

fn any<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Searches for some item in the parallel iterator that +matches the given predicate, and if so returns true. Once +a match is found, we’ll attempt to stop process the rest +of the items. Proving that there’s no match, returning false, +does require visiting every item. Read more
source§

fn all<P>(self, predicate: P) -> bool
where + P: Fn(Self::Item) -> bool + Sync + Send,

Tests that every item in the parallel iterator matches the given +predicate, and if so returns true. If a counter-example is found, +we’ll attempt to stop processing more items, then return false. Read more
source§

fn while_some<T>(self) -> WhileSome<Self>
where + Self: ParallelIterator<Item = Option<T>>, + T: Send,

Creates an iterator over the Some items of this iterator, halting +as soon as any None is found. Read more
source§

fn panic_fuse(self) -> PanicFuse<Self>

Wraps an iterator with a fuse in case of panics, to halt all threads +as soon as possible. Read more
source§

fn collect<C>(self) -> C
where + C: FromParallelIterator<Self::Item>,

Creates a fresh collection containing all the elements produced +by this parallel iterator. Read more
source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + Self: ParallelIterator<Item = (A, B)>, + FromA: Default + Send + ParallelExtend<A>, + FromB: Default + Send + ParallelExtend<B>, + A: Send, + B: Send,

Unzips the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Read more
source§

fn partition<A, B, P>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<Self::Item>, + B: Default + Send + ParallelExtend<Self::Item>, + P: Fn(&Self::Item) -> bool + Sync + Send,

Partitions the items of a parallel iterator into a pair of arbitrary +ParallelExtend containers. Items for which the predicate returns +true go into the first container, and the rest go into the second. Read more
source§

fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
where + A: Default + Send + ParallelExtend<L>, + B: Default + Send + ParallelExtend<R>, + P: Fn(Self::Item) -> Either<L, R> + Sync + Send, + L: Send, + R: Send,

Partitions and maps the items of a parallel iterator into a pair of +arbitrary ParallelExtend containers. Either::Left items go into +the first container, and Either::Right items go into the second. Read more
source§

fn take_any(self, n: usize) -> TakeAny<Self>

Creates an iterator that yields n elements from anywhere in the original iterator. Read more
source§

fn skip_any(self, n: usize) -> SkipAny<Self>

Creates an iterator that skips n elements from anywhere in the original iterator. Read more
source§

fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that takes elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
where + P: Fn(&Self::Item) -> bool + Sync + Send,

Creates an iterator that skips elements from anywhere in the original iterator +until the given predicate returns false. Read more
source§

fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>

Collects this iterator into a linked list of vectors. Read more

Auto Trait Implementations§

§

impl<T> Freeze for IntoIter<T>

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> +if into_left is true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where + F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> +if into_left(&self) returns true. +Converts self into a Right variant of Either<Self, Self> +otherwise. Read more
source§

impl<T> IntoParallelIterator for T
where + T: ParallelIterator,

§

type Iter = T

The parallel iterator type that will be created.
§

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
source§

fn into_par_iter(self) -> T

Converts self into a parallel iterator. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/all.html b/rayon_core/all.html new file mode 100644 index 0000000000..6fe7bdcbb3 --- /dev/null +++ b/rayon_core/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +
\ No newline at end of file diff --git a/rayon_core/broadcast/fn.broadcast.html b/rayon_core/broadcast/fn.broadcast.html new file mode 100644 index 0000000000..ce898fb758 --- /dev/null +++ b/rayon_core/broadcast/fn.broadcast.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.broadcast.html...

+ + + \ No newline at end of file diff --git a/rayon_core/broadcast/fn.spawn_broadcast.html b/rayon_core/broadcast/fn.spawn_broadcast.html new file mode 100644 index 0000000000..761d42bbd7 --- /dev/null +++ b/rayon_core/broadcast/fn.spawn_broadcast.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.spawn_broadcast.html...

+ + + \ No newline at end of file diff --git a/rayon_core/broadcast/struct.BroadcastContext.html b/rayon_core/broadcast/struct.BroadcastContext.html new file mode 100644 index 0000000000..599724b744 --- /dev/null +++ b/rayon_core/broadcast/struct.BroadcastContext.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/struct.BroadcastContext.html...

+ + + \ No newline at end of file diff --git a/rayon_core/enum.Yield.html b/rayon_core/enum.Yield.html new file mode 100644 index 0000000000..0b7d62116c --- /dev/null +++ b/rayon_core/enum.Yield.html @@ -0,0 +1,21 @@ +Yield in rayon_core - Rust +

Enum rayon_core::Yield

source ·
pub enum Yield {
+    Executed,
+    Idle,
+}
Expand description

Result of yield_now() or yield_local().

+

Variants§

§

Executed

Work was found and executed.

+
§

Idle

No available work was found.

+

Trait Implementations§

source§

impl Clone for Yield

source§

fn clone(&self) -> Yield

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Yield

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Yield

source§

fn eq(&self, other: &Yield) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Yield

source§

impl Eq for Yield

source§

impl StructuralPartialEq for Yield

Auto Trait Implementations§

§

impl Freeze for Yield

§

impl RefUnwindSafe for Yield

§

impl Send for Yield

§

impl Sync for Yield

§

impl Unpin for Yield

§

impl UnwindSafe for Yield

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/fn.broadcast.html b/rayon_core/fn.broadcast.html new file mode 100644 index 0000000000..ff6fbbe901 --- /dev/null +++ b/rayon_core/fn.broadcast.html @@ -0,0 +1,10 @@ +broadcast in rayon_core - Rust +

Function rayon_core::broadcast

source ·
pub fn broadcast<OP, R>(op: OP) -> Vec<R>
where + OP: Fn(BroadcastContext<'_>) -> R + Sync, + R: Send,
Expand description

Executes op within every thread in the current threadpool. If this is +called from a non-Rayon thread, it will execute in the global threadpool. +Any attempts to use join, scope, or parallel iterators will then operate +within that threadpool. When the call has completed on each thread, returns +a vector containing all of their return values.

+

For more information, see the ThreadPool::broadcast() method.

+
\ No newline at end of file diff --git a/rayon_core/fn.current_num_threads.html b/rayon_core/fn.current_num_threads.html new file mode 100644 index 0000000000..0db539328b --- /dev/null +++ b/rayon_core/fn.current_num_threads.html @@ -0,0 +1,15 @@ +current_num_threads in rayon_core - Rust +
pub fn current_num_threads() -> usize
Expand description

Returns the number of threads in the current registry. If this +code is executing within a Rayon thread-pool, then this will be +the number of threads for the thread-pool of the current +thread. Otherwise, it will be the number of threads for the global +thread-pool.

+

This can be useful when trying to judge how many times to split +parallel work (the parallel iterator traits use this value +internally for this purpose).

+

§Future compatibility note

+

Note that unless this thread-pool was created with a +builder that specifies the number of threads, then this +number may vary over time in future versions (see the +num_threads() method for details).

+
\ No newline at end of file diff --git a/rayon_core/fn.current_thread_has_pending_tasks.html b/rayon_core/fn.current_thread_has_pending_tasks.html new file mode 100644 index 0000000000..f015da9538 --- /dev/null +++ b/rayon_core/fn.current_thread_has_pending_tasks.html @@ -0,0 +1,6 @@ +current_thread_has_pending_tasks in rayon_core - Rust +
pub fn current_thread_has_pending_tasks() -> Option<bool>
Expand description

If called from a Rayon worker thread, indicates whether that +thread’s local deque still has pending tasks. Otherwise, returns +None. For more information, see the +ThreadPool::current_thread_has_pending_tasks() method.

+
\ No newline at end of file diff --git a/rayon_core/fn.current_thread_index.html b/rayon_core/fn.current_thread_index.html new file mode 100644 index 0000000000..7fe70402d1 --- /dev/null +++ b/rayon_core/fn.current_thread_index.html @@ -0,0 +1,17 @@ +current_thread_index in rayon_core - Rust +
pub fn current_thread_index() -> Option<usize>
Expand description

If called from a Rayon worker thread, returns the index of that +thread within its current pool; if not called from a Rayon thread, +returns None.

+

The index for a given thread will not change over the thread’s +lifetime. However, multiple threads may share the same index if +they are in distinct thread-pools.

+

See also: [the ThreadPool::current_thread_index() method].

+

§Future compatibility note

+

Currently, every thread-pool (including the global +thread-pool) has a fixed number of threads, but this may +change in future Rayon versions (see the num_threads() method +for details). In that case, the index for a +thread would not change during its lifetime, but thread +indices may wind up being reused if threads are terminated and +restarted.

+
\ No newline at end of file diff --git a/rayon_core/fn.in_place_scope.html b/rayon_core/fn.in_place_scope.html new file mode 100644 index 0000000000..a8c0dd61c4 --- /dev/null +++ b/rayon_core/fn.in_place_scope.html @@ -0,0 +1,21 @@ +in_place_scope in rayon_core - Rust +

Function rayon_core::in_place_scope

source ·
pub fn in_place_scope<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R,
Expand description

Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.

+

This is just like scope() except the closure runs on the same thread +that calls in_place_scope(). Only work that it spawns runs in the +thread pool.

+

§Panics

+

If a panic occurs, either in the closure given to in_place_scope() or in +any of the spawned jobs, that panic will be propagated and the +call to in_place_scope() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn(), it will +execute, even if the spawning task should later panic. in_place_scope() +returns once all spawned jobs have completed, and any panics are +propagated at that point.

+
\ No newline at end of file diff --git a/rayon_core/fn.in_place_scope_fifo.html b/rayon_core/fn.in_place_scope_fifo.html new file mode 100644 index 0000000000..58929fa617 --- /dev/null +++ b/rayon_core/fn.in_place_scope_fifo.html @@ -0,0 +1,21 @@ +in_place_scope_fifo in rayon_core - Rust +
pub fn in_place_scope_fifo<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R,
Expand description

Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.

+

This is just like scope_fifo() except the closure runs on the same thread +that calls in_place_scope_fifo(). Only work that it spawns runs in the +thread pool.

+

§Panics

+

If a panic occurs, either in the closure given to in_place_scope_fifo() or in +any of the spawned jobs, that panic will be propagated and the +call to in_place_scope_fifo() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn_fifo(), it will +execute, even if the spawning task should later panic. in_place_scope_fifo() +returns once all spawned jobs have completed, and any panics are +propagated at that point.

+
\ No newline at end of file diff --git a/rayon_core/fn.initialize.html b/rayon_core/fn.initialize.html new file mode 100644 index 0000000000..c7534cf9b3 --- /dev/null +++ b/rayon_core/fn.initialize.html @@ -0,0 +1,3 @@ +initialize in rayon_core - Rust +

Function rayon_core::initialize

source ·
pub fn initialize(config: Configuration) -> Result<(), Box<dyn Error>>
👎Deprecated: use ThreadPoolBuilder::build_global
Expand description

Deprecated in favor of ThreadPoolBuilder::build_global.

+
\ No newline at end of file diff --git a/rayon_core/fn.join.html b/rayon_core/fn.join.html new file mode 100644 index 0000000000..ba76fb8811 --- /dev/null +++ b/rayon_core/fn.join.html @@ -0,0 +1,74 @@ +join in rayon_core - Rust +

Function rayon_core::join

source ·
pub fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
where + A: FnOnce() -> RA + Send, + B: FnOnce() -> RB + Send, + RA: Send, + RB: Send,
Expand description

Takes two closures and potentially runs them in parallel. It +returns a pair of the results from those closures.

+

Conceptually, calling join() is similar to spawning two threads, +one executing each of the two closures. However, the +implementation is quite different and incurs very low +overhead. The underlying technique is called “work stealing”: the +Rayon runtime uses a fixed pool of worker threads and attempts to +only execute code in parallel when there are idle CPUs to handle +it.

+

When join is called from outside the thread pool, the calling +thread will block while the closures execute in the pool. When +join is called within the pool, the calling thread still actively +participates in the thread pool. It will begin by executing closure +A (on the current thread). While it is doing that, it will advertise +closure B as being available for other threads to execute. Once closure A +has completed, the current thread will try to execute closure B; +if however closure B has been stolen, then it will look for other work +while waiting for the thief to fully execute closure B. (This is the +typical work-stealing strategy).

+

§Examples

+

This example uses join to perform a quick-sort (note this is not a +particularly optimized implementation: if you actually want to +sort for real, you should prefer the par_sort method offered +by Rayon).

+ +
let mut v = vec![5, 1, 8, 22, 0, 44];
+quick_sort(&mut v);
+assert_eq!(v, vec![0, 1, 5, 8, 22, 44]);
+
+fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
+   if v.len() > 1 {
+       let mid = partition(v);
+       let (lo, hi) = v.split_at_mut(mid);
+       rayon::join(|| quick_sort(lo),
+                   || quick_sort(hi));
+   }
+}
+
+// Partition rearranges all items `<=` to the pivot
+// item (arbitrary selected to be the last item in the slice)
+// to the first half of the slice. It then returns the
+// "dividing point" where the pivot is placed.
+fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
+    let pivot = v.len() - 1;
+    let mut i = 0;
+    for j in 0..pivot {
+        if v[j] <= v[pivot] {
+            v.swap(i, j);
+            i += 1;
+        }
+    }
+    v.swap(i, pivot);
+    i
+}
+

§Warning about blocking I/O

+

The assumption is that the closures given to join() are +CPU-bound tasks that do not perform I/O or other blocking +operations. If you do perform I/O, and that I/O should block +(e.g., waiting for a network request), the overall performance may +be poor. Moreover, if you cause one closure to be blocked waiting +on another (for example, using a channel), that could lead to a +deadlock.

+

§Panics

+

No matter what happens, both closures will always be executed. If +a single closure panics, whether it be the first or second +closure, that panic will be propagated and hence join() will +panic with the same panic value. If both closures panic, join() +will panic with the panic value from the first closure.

+
\ No newline at end of file diff --git a/rayon_core/fn.join_context.html b/rayon_core/fn.join_context.html new file mode 100644 index 0000000000..65b569b9f7 --- /dev/null +++ b/rayon_core/fn.join_context.html @@ -0,0 +1,13 @@ +join_context in rayon_core - Rust +

Function rayon_core::join_context

source ·
pub fn join_context<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
where + A: FnOnce(FnContext) -> RA + Send, + B: FnOnce(FnContext) -> RB + Send, + RA: Send, + RB: Send,
Expand description

Identical to join, except that the closures have a parameter +that provides context for the way the closure has been called, +especially indicating whether they’re executing on a different +thread than where join_context was called. This will occur if +the second job is stolen by a different thread, or if +join_context was called from outside the thread pool to begin +with.

+
\ No newline at end of file diff --git a/rayon_core/fn.max_num_threads.html b/rayon_core/fn.max_num_threads.html new file mode 100644 index 0000000000..2c9dd90822 --- /dev/null +++ b/rayon_core/fn.max_num_threads.html @@ -0,0 +1,6 @@ +max_num_threads in rayon_core - Rust +
pub fn max_num_threads() -> usize
Expand description

Returns the maximum number of threads that Rayon supports in a single thread-pool.

+

If a higher thread count is requested by calling ThreadPoolBuilder::num_threads or by setting +the RAYON_NUM_THREADS environment variable, then it will be reduced to this maximum.

+

The value may vary between different targets, and is subject to change in new Rayon versions.

+
\ No newline at end of file diff --git a/rayon_core/fn.scope.html b/rayon_core/fn.scope.html new file mode 100644 index 0000000000..fa133e5aae --- /dev/null +++ b/rayon_core/fn.scope.html @@ -0,0 +1,191 @@ +scope in rayon_core - Rust +

Function rayon_core::scope

source ·
pub fn scope<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R + Send, + R: Send,
Expand description

Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.

+

scope() is a more flexible building block compared to join(), +since a loop can be used to spawn any number of tasks without +recursing. However, that flexibility comes at a performance price: +tasks spawned using scope() must be allocated onto the heap, +whereas join() can make exclusive use of the stack. Prefer +join() (or, even better, parallel iterators) where possible.

+

§Example

+

The Rayon join() function launches two closures and waits for them +to stop. One could implement join() using a scope like so, although +it would be less efficient than the real implementation:

+ +
pub fn join<A,B,RA,RB>(oper_a: A, oper_b: B) -> (RA, RB)
+    where A: FnOnce() -> RA + Send,
+          B: FnOnce() -> RB + Send,
+          RA: Send,
+          RB: Send,
+{
+    let mut result_a: Option<RA> = None;
+    let mut result_b: Option<RB> = None;
+    rayon::scope(|s| {
+        s.spawn(|_| result_a = Some(oper_a()));
+        s.spawn(|_| result_b = Some(oper_b()));
+    });
+    (result_a.unwrap(), result_b.unwrap())
+}
+

§A note on threading

+

The closure given to scope() executes in the Rayon thread-pool, +as do those given to spawn(). This means that you can’t access +thread-local variables (well, you can, but they may have +unexpected values).

+

§Task execution

+

Task execution potentially starts as soon as spawn() is called. +The task will end sometime before scope() returns. Note that the +closure given to scope may return much earlier. In general +the lifetime of a scope created like scope(body) goes something like this:

+
    +
  • Scope begins when scope(body) is called
  • +
  • Scope body body() is invoked +
      +
    • Scope tasks may be spawned
    • +
    +
  • +
  • Scope body returns
  • +
  • Scope tasks execute, possibly spawning more tasks
  • +
  • Once all tasks are done, scope ends and scope() returns
  • +
+

To see how and when tasks are joined, consider this example:

+ +
// point start
+rayon::scope(|s| {
+    s.spawn(|s| { // task s.1
+        s.spawn(|s| { // task s.1.1
+            rayon::scope(|t| {
+                t.spawn(|_| ()); // task t.1
+                t.spawn(|_| ()); // task t.2
+            });
+        });
+    });
+    s.spawn(|s| { // task s.2
+    });
+    // point mid
+});
+// point end
+

The various tasks that are run will execute roughly like so:

+
| (start)
+|
+| (scope `s` created)
++-----------------------------------------------+ (task s.2)
++-------+ (task s.1)                            |
+|       |                                       |
+|       +---+ (task s.1.1)                      |
+|       |   |                                   |
+|       |   | (scope `t` created)               |
+|       |   +----------------+ (task t.2)       |
+|       |   +---+ (task t.1) |                  |
+| (mid) |   |   |            |                  |
+:       |   + <-+------------+ (scope `t` ends) |
+:       |   |                                   |
+|<------+---+-----------------------------------+ (scope `s` ends)
+|
+| (end)
+
+

The point here is that everything spawned into scope s will +terminate (at latest) at the same point – right before the +original call to rayon::scope returns. This includes new +subtasks created by other subtasks (e.g., task s.1.1). If a new +scope is created (such as t), the things spawned into that scope +will be joined before that scope returns, which in turn occurs +before the creating task (task s.1.1 in this case) finishes.

+

There is no guaranteed order of execution for spawns in a scope, +given that other threads may steal tasks at any time. However, they +are generally prioritized in a LIFO order on the thread from which +they were spawned. So in this example, absent any stealing, we can +expect s.2 to execute before s.1, and t.2 before t.1. Other +threads always steal from the other end of the deque, like FIFO +order. The idea is that “recent” tasks are most likely to be fresh +in the local CPU’s cache, while other threads can steal older +“stale” tasks. For an alternate approach, consider +scope_fifo() instead.

+

§Accessing stack data

+

In general, spawned tasks may access stack data in place that +outlives the scope itself. Other data must be fully owned by the +spawned task.

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    s.spawn(|_| {
+        // We can access `ok` because outlives the scope `s`.
+        println!("ok: {:?}", ok);
+
+        // If we just try to use `bad` here, the closure will borrow `bad`
+        // (because we are just printing it out, and that only requires a
+        // borrow), which will result in a compilation error. Read on
+        // for options.
+        // println!("bad: {:?}", bad);
+   });
+});
+

As the comments example above suggest, to reference bad we must +take ownership of it. One way to do this is to detach the closure +from the surrounding stack frame, using the move keyword. This +will cause it to take ownership of all the variables it touches, +in this case including both ok and bad:

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    s.spawn(move |_| {
+        println!("ok: {:?}", ok);
+        println!("bad: {:?}", bad);
+    });
+
+    // That closure is fine, but now we can't use `ok` anywhere else,
+    // since it is owned by the previous task:
+    // s.spawn(|_| println!("ok: {:?}", ok));
+});
+

While this works, it could be a problem if we want to use ok elsewhere. +There are two choices. We can keep the closure as a move closure, but +instead of referencing the variable ok, we create a shadowed variable that +is a borrow of ok and capture that:

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    let ok: &Vec<i32> = &ok; // shadow the original `ok`
+    s.spawn(move |_| {
+        println!("ok: {:?}", ok); // captures the shadowed version
+        println!("bad: {:?}", bad);
+    });
+
+    // Now we too can use the shadowed `ok`, since `&Vec<i32>` references
+    // can be shared freely. Note that we need a `move` closure here though,
+    // because otherwise we'd be trying to borrow the shadowed `ok`,
+    // and that doesn't outlive `scope`.
+    s.spawn(move |_| println!("ok: {:?}", ok));
+});
+

Another option is not to use the move keyword but instead to take ownership +of individual variables:

+ +
let ok: Vec<i32> = vec![1, 2, 3];
+rayon::scope(|s| {
+    let bad: Vec<i32> = vec![4, 5, 6];
+    s.spawn(|_| {
+        // Transfer ownership of `bad` into a local variable (also named `bad`).
+        // This will force the closure to take ownership of `bad` from the environment.
+        let bad = bad;
+        println!("ok: {:?}", ok); // `ok` is only borrowed.
+        println!("bad: {:?}", bad); // refers to our local variable, above.
+    });
+
+    s.spawn(|_| println!("ok: {:?}", ok)); // we too can borrow `ok`
+});
+

§Panics

+

If a panic occurs, either in the closure given to scope() or in +any of the spawned jobs, that panic will be propagated and the +call to scope() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn(), it will +execute, even if the spawning task should later panic. scope() +returns once all spawned jobs have completed, and any panics are +propagated at that point.

+
\ No newline at end of file diff --git a/rayon_core/fn.scope_fifo.html b/rayon_core/fn.scope_fifo.html new file mode 100644 index 0000000000..0f016e1985 --- /dev/null +++ b/rayon_core/fn.scope_fifo.html @@ -0,0 +1,67 @@ +scope_fifo in rayon_core - Rust +

Function rayon_core::scope_fifo

source ·
pub fn scope_fifo<'scope, OP, R>(op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R + Send, + R: Send,
Expand description

Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.

+

§Task execution

+

Tasks in a scope_fifo() run similarly to scope(), but there’s a +difference in the order of execution. Consider a similar example:

+ +
// point start
+rayon::scope_fifo(|s| {
+    s.spawn_fifo(|s| { // task s.1
+        s.spawn_fifo(|s| { // task s.1.1
+            rayon::scope_fifo(|t| {
+                t.spawn_fifo(|_| ()); // task t.1
+                t.spawn_fifo(|_| ()); // task t.2
+            });
+        });
+    });
+    s.spawn_fifo(|s| { // task s.2
+    });
+    // point mid
+});
+// point end
+

The various tasks that are run will execute roughly like so:

+
| (start)
+|
+| (FIFO scope `s` created)
++--------------------+ (task s.1)
++-------+ (task s.2) |
+|       |            +---+ (task s.1.1)
+|       |            |   |
+|       |            |   | (FIFO scope `t` created)
+|       |            |   +----------------+ (task t.1)
+|       |            |   +---+ (task t.2) |
+| (mid) |            |   |   |            |
+:       |            |   + <-+------------+ (scope `t` ends)
+:       |            |   |
+|<------+------------+---+ (scope `s` ends)
+|
+| (end)
+
+

Under scope_fifo(), the spawns are prioritized in a FIFO order on +the thread from which they were spawned, as opposed to scope()’s +LIFO. So in this example, we can expect s.1 to execute before +s.2, and t.1 before t.2. Other threads also steal tasks in +FIFO order, as usual. Overall, this has roughly the same order as +the now-deprecated breadth_first option, except the effect is +isolated to a particular scope. If spawns are intermingled from any +combination of scope() and scope_fifo(), or from different +threads, their order is only specified with respect to spawns in the +same scope and thread.

+

For more details on this design, see Rayon RFC #1.

+

§Panics

+

If a panic occurs, either in the closure given to scope_fifo() or +in any of the spawned jobs, that panic will be propagated and the +call to scope_fifo() will panic. If multiple panics occurs, it is +non-deterministic which of their panic values will propagate. +Regardless, once a task is spawned using scope.spawn_fifo(), it +will execute, even if the spawning task should later panic. +scope_fifo() returns once all spawned jobs have completed, and any +panics are propagated at that point.

+
\ No newline at end of file diff --git a/rayon_core/fn.spawn.html b/rayon_core/fn.spawn.html new file mode 100644 index 0000000000..806c5eaf46 --- /dev/null +++ b/rayon_core/fn.spawn.html @@ -0,0 +1,40 @@ +spawn in rayon_core - Rust +

Function rayon_core::spawn

source ·
pub fn spawn<F>(func: F)
where + F: FnOnce() + Send + 'static,
Expand description

Puts the task into the Rayon threadpool’s job queue in the “static” +or “global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope() +function to create a scope.

+

Since tasks spawned with this function cannot hold references into +the enclosing stack frame, you almost certainly want to use a +move closure as their argument (otherwise, the closure will +typically hold references to any variables from the enclosing +function that you happen to use).

+

This API assumes that the closure is executed purely for its +side-effects (i.e., it might send messages, modify data protected +by a mutex, or some such thing).

+

There is no guaranteed order of execution for spawns, given that +other threads may steal tasks at any time. However, they are +generally prioritized in a LIFO order on the thread from which +they were spawned. Other threads always steal from the other end of +the deque, like FIFO order. The idea is that “recent” tasks are +most likely to be fresh in the local CPU’s cache, while other +threads can steal older “stale” tasks. For an alternate approach, +consider spawn_fifo() instead.

+

§Panic handling

+

If this closure should panic, the resulting panic will be +propagated to the panic handler registered in the ThreadPoolBuilder, +if any. See ThreadPoolBuilder::panic_handler() for more +details.

+

§Examples

+

This code creates a Rayon task that increments a global counter.

+ +
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
+
+static GLOBAL_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
+
+rayon::spawn(move || {
+    GLOBAL_COUNTER.fetch_add(1, Ordering::SeqCst);
+});
+
\ No newline at end of file diff --git a/rayon_core/fn.spawn_broadcast.html b/rayon_core/fn.spawn_broadcast.html new file mode 100644 index 0000000000..1f5913eeb7 --- /dev/null +++ b/rayon_core/fn.spawn_broadcast.html @@ -0,0 +1,8 @@ +spawn_broadcast in rayon_core - Rust +
pub fn spawn_broadcast<OP>(op: OP)
where + OP: Fn(BroadcastContext<'_>) + Send + Sync + 'static,
Expand description

Spawns an asynchronous task on every thread in this thread-pool. This task +will run in the implicit, global scope, which means that it may outlast the +current stack frame – therefore, it cannot capture any references onto the +stack (you will likely need a move closure).

+

For more information, see the ThreadPool::spawn_broadcast() method.

+
\ No newline at end of file diff --git a/rayon_core/fn.spawn_fifo.html b/rayon_core/fn.spawn_fifo.html new file mode 100644 index 0000000000..53061ea826 --- /dev/null +++ b/rayon_core/fn.spawn_fifo.html @@ -0,0 +1,20 @@ +spawn_fifo in rayon_core - Rust +

Function rayon_core::spawn_fifo

source ·
pub fn spawn_fifo<F>(func: F)
where + F: FnOnce() + Send + 'static,
Expand description

Fires off a task into the Rayon threadpool in the “static” or +“global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope_fifo() +function to create a scope.

+

The behavior is essentially the same as the spawn +function, except that calls from the same thread +will be prioritized in FIFO order. This is similar to the now- +deprecated breadth_first option, except the effect is isolated +to relative spawn_fifo calls, not all threadpool tasks.

+

For more details on this design, see Rayon RFC #1.

+

§Panic handling

+

If this closure should panic, the resulting panic will be +propagated to the panic handler registered in the ThreadPoolBuilder, +if any. See ThreadPoolBuilder::panic_handler() for more +details.

+
\ No newline at end of file diff --git a/rayon_core/fn.yield_local.html b/rayon_core/fn.yield_local.html new file mode 100644 index 0000000000..979abf113f --- /dev/null +++ b/rayon_core/fn.yield_local.html @@ -0,0 +1,9 @@ +yield_local in rayon_core - Rust +

Function rayon_core::yield_local

source ·
pub fn yield_local() -> Option<Yield>
Expand description

Cooperatively yields execution to local Rayon work.

+

If the current thread is part of a rayon thread pool, this looks for a +single unit of pending work in this thread’s queue, then executes it. +Completion of that work might include nested work or further work stealing.

+

This is similar to yield_now(), but does not steal from other threads.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if this thread is not part of any pool at all.

+
\ No newline at end of file diff --git a/rayon_core/fn.yield_now.html b/rayon_core/fn.yield_now.html new file mode 100644 index 0000000000..100449c4e0 --- /dev/null +++ b/rayon_core/fn.yield_now.html @@ -0,0 +1,11 @@ +yield_now in rayon_core - Rust +

Function rayon_core::yield_now

source ·
pub fn yield_now() -> Option<Yield>
Expand description

Cooperatively yields execution to Rayon.

+

If the current thread is part of a rayon thread pool, this looks for a +single unit of pending work in the pool, then executes it. Completion of +that work might include nested work or further work stealing.

+

This is similar to std::thread::yield_now(), but does not literally make +that call. If you are implementing a polling loop, you may want to also +yield to the OS scheduler yourself if no Rayon work was found.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if this thread is not part of any pool at all.

+
\ No newline at end of file diff --git a/rayon_core/index.html b/rayon_core/index.html new file mode 100644 index 0000000000..d9d3b05e7c --- /dev/null +++ b/rayon_core/index.html @@ -0,0 +1,100 @@ +rayon_core - Rust +

Crate rayon_core

source ·
Expand description

Rayon-core houses the core stable APIs of Rayon.

+

These APIs have been mirrored in the Rayon crate and it is recommended to use these from there.

+

join is used to take two closures and potentially run them in parallel.

+
    +
  • It will run in parallel if task B gets stolen before task A can finish.
  • +
  • It will run sequentially if task A finishes before task B is stolen and can continue on task B.
  • +
+

scope creates a scope in which you can run any number of parallel tasks. +These tasks can spawn nested tasks and scopes, but given the nature of work stealing, the order of execution can not be guaranteed. +The scope will exist until all tasks spawned within the scope have been completed.

+

spawn add a task into the ‘static’ or ‘global’ scope, or a local scope created by the scope() function.

+

ThreadPool can be used to create your own thread pools (using ThreadPoolBuilder) or to customize the global one. +Tasks spawned within the pool (using install(), join(), etc.) will be added to a deque, +where it becomes available for work stealing from other threads in the local threadpool.

+

§Global fallback when threading is unsupported

+

Rayon uses std APIs for threading, but some targets have incomplete implementations that +always return Unsupported errors. The WebAssembly wasm32-unknown-unknown and wasm32-wasi +targets are notable examples of this. Rather than panicking on the unsupported error when +creating the implicit global threadpool, Rayon configures a fallback mode instead.

+

This fallback mode mostly functions as if it were using a single-threaded “pool”, like setting +RAYON_NUM_THREADS=1. For example, join will execute its two closures sequentially, since +there is no other thread to share the work. However, since the pool is not running independent +of the main thread, non-blocking calls like spawn may not execute at all, unless a lower- +priority call like broadcast gives them an opening. The fallback mode does not try to emulate +anything like thread preemption or async task switching, but yield_now or yield_local +can also volunteer execution time.

+

Explicit ThreadPoolBuilder methods always report their error without any fallback.

+

§Restricting multiple versions

+

In order to ensure proper coordination between threadpools, and especially +to make sure there’s only one global threadpool, rayon-core is actively +restricted from building multiple versions of itself into a single target. +You may see a build error like this in violation:

+
error: native library `rayon-core` is being linked to by more
+than one package, and can only be linked to by one package
+
+

While we strive to keep rayon-core semver-compatible, it’s still +possible to arrive at this situation if different crates have overly +restrictive tilde or inequality requirements for rayon-core. The +conflicting requirements will need to be resolved before the build will +succeed.

+

Structs§

Enums§

Functions§

  • Executes op within every thread in the current threadpool. If this is +called from a non-Rayon thread, it will execute in the global threadpool. +Any attempts to use join, scope, or parallel iterators will then operate +within that threadpool. When the call has completed on each thread, returns +a vector containing all of their return values.
  • Returns the number of threads in the current registry. If this +code is executing within a Rayon thread-pool, then this will be +the number of threads for the thread-pool of the current +thread. Otherwise, it will be the number of threads for the global +thread-pool.
  • If called from a Rayon worker thread, indicates whether that +thread’s local deque still has pending tasks. Otherwise, returns +None. For more information, see the +ThreadPool::current_thread_has_pending_tasks() method.
  • If called from a Rayon worker thread, returns the index of that +thread within its current pool; if not called from a Rayon thread, +returns None.
  • Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.
  • Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.
  • initializeDeprecated
    Deprecated in favor of ThreadPoolBuilder::build_global.
  • Takes two closures and potentially runs them in parallel. It +returns a pair of the results from those closures.
  • Identical to join, except that the closures have a parameter +that provides context for the way the closure has been called, +especially indicating whether they’re executing on a different +thread than where join_context was called. This will occur if +the second job is stolen by a different thread, or if +join_context was called from outside the thread pool to begin +with.
  • Returns the maximum number of threads that Rayon supports in a single thread-pool.
  • Creates a “fork-join” scope s and invokes the closure with a +reference to s. This closure can then spawn asynchronous tasks +into s. Those tasks may run asynchronously with respect to the +closure; they may themselves spawn additional tasks into s. When +the closure returns, it will block until all tasks that have been +spawned into s complete.
  • Creates a “fork-join” scope s with FIFO order, and invokes the +closure with a reference to s. This closure can then spawn +asynchronous tasks into s. Those tasks may run asynchronously with +respect to the closure; they may themselves spawn additional tasks +into s. When the closure returns, it will block until all tasks +that have been spawned into s complete.
  • Puts the task into the Rayon threadpool’s job queue in the “static” +or “global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope() +function to create a scope.
  • Spawns an asynchronous task on every thread in this thread-pool. This task +will run in the implicit, global scope, which means that it may outlast the +current stack frame – therefore, it cannot capture any references onto the +stack (you will likely need a move closure).
  • Fires off a task into the Rayon threadpool in the “static” or +“global” scope. Just like a standard thread, this task is not +tied to the current stack frame, and hence it cannot hold any +references other than those with 'static lifetime. If you want +to spawn a task that references stack data, use the scope_fifo() +function to create a scope.
  • Cooperatively yields execution to local Rayon work.
  • Cooperatively yields execution to Rayon.
\ No newline at end of file diff --git a/rayon_core/join/fn.join.html b/rayon_core/join/fn.join.html new file mode 100644 index 0000000000..738804b58c --- /dev/null +++ b/rayon_core/join/fn.join.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.join.html...

+ + + \ No newline at end of file diff --git a/rayon_core/join/fn.join_context.html b/rayon_core/join/fn.join_context.html new file mode 100644 index 0000000000..d60d018a97 --- /dev/null +++ b/rayon_core/join/fn.join_context.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.join_context.html...

+ + + \ No newline at end of file diff --git a/rayon_core/registry/struct.ThreadBuilder.html b/rayon_core/registry/struct.ThreadBuilder.html new file mode 100644 index 0000000000..720020af4f --- /dev/null +++ b/rayon_core/registry/struct.ThreadBuilder.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/struct.ThreadBuilder.html...

+ + + \ No newline at end of file diff --git a/rayon_core/scope/fn.in_place_scope.html b/rayon_core/scope/fn.in_place_scope.html new file mode 100644 index 0000000000..81fd7bca75 --- /dev/null +++ b/rayon_core/scope/fn.in_place_scope.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.in_place_scope.html...

+ + + \ No newline at end of file diff --git a/rayon_core/scope/fn.in_place_scope_fifo.html b/rayon_core/scope/fn.in_place_scope_fifo.html new file mode 100644 index 0000000000..68f23255b7 --- /dev/null +++ b/rayon_core/scope/fn.in_place_scope_fifo.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.in_place_scope_fifo.html...

+ + + \ No newline at end of file diff --git a/rayon_core/scope/fn.scope.html b/rayon_core/scope/fn.scope.html new file mode 100644 index 0000000000..e2411178d3 --- /dev/null +++ b/rayon_core/scope/fn.scope.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.scope.html...

+ + + \ No newline at end of file diff --git a/rayon_core/scope/fn.scope_fifo.html b/rayon_core/scope/fn.scope_fifo.html new file mode 100644 index 0000000000..f1792a1ea9 --- /dev/null +++ b/rayon_core/scope/fn.scope_fifo.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.scope_fifo.html...

+ + + \ No newline at end of file diff --git a/rayon_core/scope/struct.Scope.html b/rayon_core/scope/struct.Scope.html new file mode 100644 index 0000000000..89b2f977a2 --- /dev/null +++ b/rayon_core/scope/struct.Scope.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/struct.Scope.html...

+ + + \ No newline at end of file diff --git a/rayon_core/scope/struct.ScopeFifo.html b/rayon_core/scope/struct.ScopeFifo.html new file mode 100644 index 0000000000..3be8a53365 --- /dev/null +++ b/rayon_core/scope/struct.ScopeFifo.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/struct.ScopeFifo.html...

+ + + \ No newline at end of file diff --git a/rayon_core/sidebar-items.js b/rayon_core/sidebar-items.js new file mode 100644 index 0000000000..b854c36f6d --- /dev/null +++ b/rayon_core/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Yield"],"fn":["broadcast","current_num_threads","current_thread_has_pending_tasks","current_thread_index","in_place_scope","in_place_scope_fifo","initialize","join","join_context","max_num_threads","scope","scope_fifo","spawn","spawn_broadcast","spawn_fifo","yield_local","yield_now"],"struct":["BroadcastContext","Configuration","FnContext","Scope","ScopeFifo","ThreadBuilder","ThreadPool","ThreadPoolBuildError","ThreadPoolBuilder"]}; \ No newline at end of file diff --git a/rayon_core/spawn/fn.spawn.html b/rayon_core/spawn/fn.spawn.html new file mode 100644 index 0000000000..ab15f92a66 --- /dev/null +++ b/rayon_core/spawn/fn.spawn.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.spawn.html...

+ + + \ No newline at end of file diff --git a/rayon_core/spawn/fn.spawn_fifo.html b/rayon_core/spawn/fn.spawn_fifo.html new file mode 100644 index 0000000000..3b0c880610 --- /dev/null +++ b/rayon_core/spawn/fn.spawn_fifo.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.spawn_fifo.html...

+ + + \ No newline at end of file diff --git a/rayon_core/struct.BroadcastContext.html b/rayon_core/struct.BroadcastContext.html new file mode 100644 index 0000000000..5874b71046 --- /dev/null +++ b/rayon_core/struct.BroadcastContext.html @@ -0,0 +1,19 @@ +BroadcastContext in rayon_core - Rust +
pub struct BroadcastContext<'a> { /* private fields */ }
Expand description

Provides context to a closure called by broadcast.

+

Implementations§

source§

impl<'a> BroadcastContext<'a>

source

pub fn index(&self) -> usize

Our index amongst the broadcast threads (ranges from 0..self.num_threads()).

+
source

pub fn num_threads(&self) -> usize

The number of threads receiving the broadcast in the thread pool.

+
§Future compatibility note
+

Future versions of Rayon might vary the number of threads over time, but +this method will always return the number of threads which are actually +receiving your particular broadcast call.

+

Trait Implementations§

source§

impl<'a> Debug for BroadcastContext<'a>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for BroadcastContext<'a>

§

impl<'a> !RefUnwindSafe for BroadcastContext<'a>

§

impl<'a> !Send for BroadcastContext<'a>

§

impl<'a> !Sync for BroadcastContext<'a>

§

impl<'a> Unpin for BroadcastContext<'a>

§

impl<'a> !UnwindSafe for BroadcastContext<'a>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.Configuration.html b/rayon_core/struct.Configuration.html new file mode 100644 index 0000000000..21f56e336c --- /dev/null +++ b/rayon_core/struct.Configuration.html @@ -0,0 +1,26 @@ +Configuration in rayon_core - Rust +
pub struct Configuration { /* private fields */ }
👎Deprecated: Use ThreadPoolBuilder
Expand description

Contains the rayon thread pool configuration. Use ThreadPoolBuilder instead.

+

Implementations§

source§

impl Configuration

source

pub fn new() -> Configuration

Creates and return a valid rayon thread pool configuration, but does not initialize it.

+
source

pub fn build(self) -> Result<ThreadPool, Box<dyn Error + 'static>>

Deprecated in favor of ThreadPoolBuilder::build.

+
source

pub fn thread_name<F>(self, closure: F) -> Self
where + F: FnMut(usize) -> String + 'static,

Deprecated in favor of ThreadPoolBuilder::thread_name.

+
source

pub fn num_threads(self, num_threads: usize) -> Configuration

Deprecated in favor of ThreadPoolBuilder::num_threads.

+
source

pub fn panic_handler<H>(self, panic_handler: H) -> Configuration
where + H: Fn(Box<dyn Any + Send>) + Send + Sync + 'static,

Deprecated in favor of ThreadPoolBuilder::panic_handler.

+
source

pub fn stack_size(self, stack_size: usize) -> Self

Deprecated in favor of ThreadPoolBuilder::stack_size.

+
source

pub fn breadth_first(self) -> Self

Deprecated in favor of ThreadPoolBuilder::breadth_first.

+
source

pub fn start_handler<H>(self, start_handler: H) -> Configuration
where + H: Fn(usize) + Send + Sync + 'static,

Deprecated in favor of ThreadPoolBuilder::start_handler.

+
source

pub fn exit_handler<H>(self, exit_handler: H) -> Configuration
where + H: Fn(usize) + Send + Sync + 'static,

Deprecated in favor of ThreadPoolBuilder::exit_handler.

+

Trait Implementations§

source§

impl Debug for Configuration

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Configuration

source§

fn default() -> Configuration

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.FnContext.html b/rayon_core/struct.FnContext.html new file mode 100644 index 0000000000..8d4aa3faa7 --- /dev/null +++ b/rayon_core/struct.FnContext.html @@ -0,0 +1,15 @@ +FnContext in rayon_core - Rust +

Struct rayon_core::FnContext

source ·
pub struct FnContext { /* private fields */ }
Expand description

Provides the calling context to a closure called by join_context.

+

Implementations§

source§

impl FnContext

source

pub fn migrated(&self) -> bool

Returns true if the closure was called from a different thread +than it was provided from.

+

Trait Implementations§

source§

impl Debug for FnContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.Scope.html b/rayon_core/struct.Scope.html new file mode 100644 index 0000000000..fc376ca13e --- /dev/null +++ b/rayon_core/struct.Scope.html @@ -0,0 +1,60 @@ +Scope in rayon_core - Rust +

Struct rayon_core::Scope

source ·
pub struct Scope<'scope> { /* private fields */ }
Expand description

Represents a fork-join scope which can be used to spawn any number of tasks. +See scope() for more information.

+

Implementations§

source§

impl<'scope> Scope<'scope>

source

pub fn spawn<BODY>(&self, body: BODY)
where + BODY: FnOnce(&Scope<'scope>) + Send + 'scope,

Spawns a job into the fork-join scope self. This job will +execute sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its +own reference to the scope self as argument. This can be +used to inject new jobs into self.

+
§Returns
+

Nothing. The spawned closures cannot pass back values to the +caller directly, though they can write to local variables on +the stack (if those variables outlive the scope) or +communicate through shared channels.

+

(The intention is to eventually integrate with Rust futures to +support spawns of functions that compute a value.)

+
§Examples
+
let mut value_a = None;
+let mut value_b = None;
+let mut value_c = None;
+rayon::scope(|s| {
+    s.spawn(|s1| {
+          // ^ this is the same scope as `s`; this handle `s1`
+          //   is intended for use by the spawned task,
+          //   since scope handles cannot cross thread boundaries.
+
+        value_a = Some(22);
+
+        // the scope `s` will not end until all these tasks are done
+        s1.spawn(|_| {
+            value_b = Some(44);
+        });
+    });
+
+    s.spawn(|_| {
+        value_c = Some(66);
+    });
+});
+assert_eq!(value_a, Some(22));
+assert_eq!(value_b, Some(44));
+assert_eq!(value_c, Some(66));
+
§See also
+

The scope function has more extensive documentation about +task spawning.

+
source

pub fn spawn_broadcast<BODY>(&self, body: BODY)
where + BODY: Fn(&Scope<'scope>, BroadcastContext<'_>) + Send + Sync + 'scope,

Spawns a job into every thread of the fork-join scope self. This job will +execute on each thread sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its own reference +to the scope self as argument, as well as a BroadcastContext.

+

Trait Implementations§

source§

impl<'scope> Debug for Scope<'scope>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'scope> !Freeze for Scope<'scope>

§

impl<'scope> !RefUnwindSafe for Scope<'scope>

§

impl<'scope> Send for Scope<'scope>

§

impl<'scope> Sync for Scope<'scope>

§

impl<'scope> Unpin for Scope<'scope>

§

impl<'scope> !UnwindSafe for Scope<'scope>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.ScopeFifo.html b/rayon_core/struct.ScopeFifo.html new file mode 100644 index 0000000000..cae3959513 --- /dev/null +++ b/rayon_core/struct.ScopeFifo.html @@ -0,0 +1,30 @@ +ScopeFifo in rayon_core - Rust +

Struct rayon_core::ScopeFifo

source ·
pub struct ScopeFifo<'scope> { /* private fields */ }
Expand description

Represents a fork-join scope which can be used to spawn any number of tasks. +Those spawned from the same thread are prioritized in relative FIFO order. +See scope_fifo() for more information.

+

Implementations§

source§

impl<'scope> ScopeFifo<'scope>

source

pub fn spawn_fifo<BODY>(&self, body: BODY)
where + BODY: FnOnce(&ScopeFifo<'scope>) + Send + 'scope,

Spawns a job into the fork-join scope self. This job will +execute sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its +own reference to the scope self as argument. This can be +used to inject new jobs into self.

+
§See also
+

This method is akin to Scope::spawn(), but with a FIFO +priority. The scope_fifo function has more details about +this distinction.

+
source

pub fn spawn_broadcast<BODY>(&self, body: BODY)
where + BODY: Fn(&ScopeFifo<'scope>, BroadcastContext<'_>) + Send + Sync + 'scope,

Spawns a job into every thread of the fork-join scope self. This job will +execute on each thread sometime before the fork-join scope completes. The +job is specified as a closure, and this closure receives its own reference +to the scope self as argument, as well as a BroadcastContext.

+

Trait Implementations§

source§

impl<'scope> Debug for ScopeFifo<'scope>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'scope> !Freeze for ScopeFifo<'scope>

§

impl<'scope> !RefUnwindSafe for ScopeFifo<'scope>

§

impl<'scope> Send for ScopeFifo<'scope>

§

impl<'scope> Sync for ScopeFifo<'scope>

§

impl<'scope> Unpin for ScopeFifo<'scope>

§

impl<'scope> !UnwindSafe for ScopeFifo<'scope>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.ThreadBuilder.html b/rayon_core/struct.ThreadBuilder.html new file mode 100644 index 0000000000..27323fba93 --- /dev/null +++ b/rayon_core/struct.ThreadBuilder.html @@ -0,0 +1,19 @@ +ThreadBuilder in rayon_core - Rust +
pub struct ThreadBuilder { /* private fields */ }
Expand description

Thread builder used for customization via +ThreadPoolBuilder::spawn_handler.

+

Implementations§

source§

impl ThreadBuilder

source

pub fn index(&self) -> usize

Gets the index of this thread in the pool, within 0..num_threads.

+
source

pub fn name(&self) -> Option<&str>

Gets the string that was specified by ThreadPoolBuilder::name().

+
source

pub fn stack_size(&self) -> Option<usize>

Gets the value that was specified by ThreadPoolBuilder::stack_size().

+
source

pub fn run(self)

Executes the main loop for this thread. This will not return until the +thread pool is dropped.

+

Trait Implementations§

source§

impl Debug for ThreadBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.ThreadPool.html b/rayon_core/struct.ThreadPool.html new file mode 100644 index 0000000000..0b03c94390 --- /dev/null +++ b/rayon_core/struct.ThreadPool.html @@ -0,0 +1,199 @@ +ThreadPool in rayon_core - Rust +

Struct rayon_core::ThreadPool

source ·
pub struct ThreadPool { /* private fields */ }
Expand description

Represents a user created thread-pool.

+

Use a ThreadPoolBuilder to specify the number and/or names of threads +in the pool. After calling ThreadPoolBuilder::build(), you can then +execute functions explicitly within this ThreadPool using +ThreadPool::install(). By contrast, top level rayon functions +(like join()) will execute implicitly within the current thread-pool.

+

§Creating a ThreadPool

+
let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+

install() executes a closure in one of the ThreadPool’s +threads. In addition, any other rayon operations called inside of install() will also +execute in the context of the ThreadPool.

+

When the ThreadPool is dropped, that’s a signal for the threads it manages to terminate, +they will complete executing any remaining work that you have spawned, and automatically +terminate.

+

Implementations§

source§

impl ThreadPool

source

pub fn new(configuration: Configuration) -> Result<ThreadPool, Box<dyn Error>>

👎Deprecated: Use ThreadPoolBuilder::build

Deprecated in favor of ThreadPoolBuilder::build.

+
source

pub fn install<OP, R>(&self, op: OP) -> R
where + OP: FnOnce() -> R + Send, + R: Send,

Executes op within the threadpool. Any attempts to use +join, scope, or parallel iterators will then operate +within that threadpool.

+
§Warning: thread-local data
+

Because op is executing within the Rayon thread-pool, +thread-local data from the current thread will not be +accessible.

+
§Warning: execution order
+

If the current thread is part of a different thread pool, it will try to +keep busy while the op completes in its target pool, similar to +calling ThreadPool::yield_now() in a loop. Therefore, it may +potentially schedule other tasks to run on the current thread in the +meantime. For example

+ +
fn main() {
+    rayon::ThreadPoolBuilder::new().num_threads(1).build_global().unwrap();
+    let pool = rayon_core::ThreadPoolBuilder::default().build().unwrap();
+    let do_it = || {
+        print!("one ");
+        pool.install(||{});
+        print!("two ");
+    };
+    rayon::join(|| do_it(), || do_it());
+}
+

Since we configured just one thread in the global pool, one might +expect do_it() to run sequentially, producing:

+
one two one two
+
+

However each call to install() yields implicitly, allowing rayon to +run multiple instances of do_it() concurrently on the single, global +thread. The following output would be equally valid:

+
one one two two
+
§Panics
+

If op should panic, that panic will be propagated.

+
§Using install()
+
   fn main() {
+        let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+        let n = pool.install(|| fib(20));
+        println!("{}", n);
+   }
+
+   fn fib(n: usize) -> usize {
+        if n == 0 || n == 1 {
+            return n;
+        }
+        let (a, b) = rayon::join(|| fib(n - 1), || fib(n - 2)); // runs inside of `pool`
+        return a + b;
+    }
+
source

pub fn broadcast<OP, R>(&self, op: OP) -> Vec<R>
where + OP: Fn(BroadcastContext<'_>) -> R + Sync, + R: Send,

Executes op within every thread in the threadpool. Any attempts to use +join, scope, or parallel iterators will then operate within that +threadpool.

+

Broadcasts are executed on each thread after they have exhausted their +local work queue, before they attempt work-stealing from other threads. +The goal of that strategy is to run everywhere in a timely manner +without being too disruptive to current work. There may be alternative +broadcast styles added in the future for more or less aggressive +injection, if the need arises.

+
§Warning: thread-local data
+

Because op is executing within the Rayon thread-pool, +thread-local data from the current thread will not be +accessible.

+
§Panics
+

If op should panic on one or more threads, exactly one panic +will be propagated, only after all threads have completed +(or panicked) their own op.

+
§Examples
+
   use std::sync::atomic::{AtomicUsize, Ordering};
+
+   fn main() {
+        let pool = rayon::ThreadPoolBuilder::new().num_threads(5).build().unwrap();
+
+        // The argument gives context, including the index of each thread.
+        let v: Vec<usize> = pool.broadcast(|ctx| ctx.index() * ctx.index());
+        assert_eq!(v, &[0, 1, 4, 9, 16]);
+
+        // The closure can reference the local stack
+        let count = AtomicUsize::new(0);
+        pool.broadcast(|_| count.fetch_add(1, Ordering::Relaxed));
+        assert_eq!(count.into_inner(), 5);
+   }
+
source

pub fn current_num_threads(&self) -> usize

Returns the (current) number of threads in the thread pool.

+
§Future compatibility note
+

Note that unless this thread-pool was created with a +ThreadPoolBuilder that specifies the number of threads, +then this number may vary over time in future versions (see the +num_threads() method for details).

+
source

pub fn current_thread_index(&self) -> Option<usize>

If called from a Rayon worker thread in this thread-pool, +returns the index of that thread; if not called from a Rayon +thread, or called from a Rayon thread that belongs to a +different thread-pool, returns None.

+

The index for a given thread will not change over the thread’s +lifetime. However, multiple threads may share the same index if +they are in distinct thread-pools.

+
§Future compatibility note
+

Currently, every thread-pool (including the global +thread-pool) has a fixed number of threads, but this may +change in future Rayon versions (see the num_threads() method +for details). In that case, the index for a +thread would not change during its lifetime, but thread +indices may wind up being reused if threads are terminated and +restarted.

+
source

pub fn current_thread_has_pending_tasks(&self) -> Option<bool>

Returns true if the current worker thread currently has “local +tasks” pending. This can be useful as part of a heuristic for +deciding whether to spawn a new task or execute code on the +current thread, particularly in breadth-first +schedulers. However, keep in mind that this is an inherently +racy check, as other worker threads may be actively “stealing” +tasks from our local deque.

+

Background: Rayon’s uses a work-stealing scheduler. The +key idea is that each thread has its own deque of +tasks. Whenever a new task is spawned – whether through +join(), Scope::spawn(), or some other means – that new +task is pushed onto the thread’s local deque. Worker threads +have a preference for executing their own tasks; if however +they run out of tasks, they will go try to “steal” tasks from +other threads. This function therefore has an inherent race +with other active worker threads, which may be removing items +from the local deque.

+
source

pub fn join<A, B, RA, RB>(&self, oper_a: A, oper_b: B) -> (RA, RB)
where + A: FnOnce() -> RA + Send, + B: FnOnce() -> RB + Send, + RA: Send, + RB: Send,

Execute oper_a and oper_b in the thread-pool and return +the results. Equivalent to self.install(|| join(oper_a, oper_b)).

+
source

pub fn scope<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R + Send, + R: Send,

Creates a scope that executes within this thread-pool. +Equivalent to self.install(|| scope(...)).

+

See also: the scope() function.

+
source

pub fn scope_fifo<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R + Send, + R: Send,

Creates a scope that executes within this thread-pool. +Spawns from the same thread are prioritized in relative FIFO order. +Equivalent to self.install(|| scope_fifo(...)).

+

See also: the scope_fifo() function.

+
source

pub fn in_place_scope<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&Scope<'scope>) -> R,

Creates a scope that spawns work into this thread-pool.

+

See also: the in_place_scope() function.

+
source

pub fn in_place_scope_fifo<'scope, OP, R>(&self, op: OP) -> R
where + OP: FnOnce(&ScopeFifo<'scope>) -> R,

Creates a scope that spawns work into this thread-pool in FIFO order.

+

See also: the in_place_scope_fifo() function.

+
source

pub fn spawn<OP>(&self, op: OP)
where + OP: FnOnce() + Send + 'static,

Spawns an asynchronous task in this thread-pool. This task will +run in the implicit, global scope, which means that it may outlast +the current stack frame – therefore, it cannot capture any references +onto the stack (you will likely need a move closure).

+

See also: the spawn() function defined on scopes.

+
source

pub fn spawn_fifo<OP>(&self, op: OP)
where + OP: FnOnce() + Send + 'static,

Spawns an asynchronous task in this thread-pool. This task will +run in the implicit, global scope, which means that it may outlast +the current stack frame – therefore, it cannot capture any references +onto the stack (you will likely need a move closure).

+

See also: the spawn_fifo() function defined on scopes.

+
source

pub fn spawn_broadcast<OP>(&self, op: OP)
where + OP: Fn(BroadcastContext<'_>) + Send + Sync + 'static,

Spawns an asynchronous task on every thread in this thread-pool. This task +will run in the implicit, global scope, which means that it may outlast the +current stack frame – therefore, it cannot capture any references onto the +stack (you will likely need a move closure).

+
source

pub fn yield_now(&self) -> Option<Yield>

Cooperatively yields execution to Rayon.

+

This is similar to the general yield_now(), but only if the current +thread is part of this thread pool.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if the current thread is not part this pool.

+
source

pub fn yield_local(&self) -> Option<Yield>

Cooperatively yields execution to local Rayon work.

+

This is similar to the general yield_local(), but only if the current +thread is part of this thread pool.

+

Returns Some(Yield::Executed) if anything was executed, Some(Yield::Idle) if +nothing was available, or None if the current thread is not part this pool.

+

Trait Implementations§

source§

impl Debug for ThreadPool

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for ThreadPool

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.ThreadPoolBuildError.html b/rayon_core/struct.ThreadPoolBuildError.html new file mode 100644 index 0000000000..05220a6d74 --- /dev/null +++ b/rayon_core/struct.ThreadPoolBuildError.html @@ -0,0 +1,14 @@ +ThreadPoolBuildError in rayon_core - Rust +
pub struct ThreadPoolBuildError { /* private fields */ }
Expand description

Error when initializing a thread pool.

+

Trait Implementations§

source§

impl Debug for ThreadPoolBuildError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ThreadPoolBuildError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ThreadPoolBuildError

source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/struct.ThreadPoolBuilder.html b/rayon_core/struct.ThreadPoolBuilder.html new file mode 100644 index 0000000000..1340a53d0a --- /dev/null +++ b/rayon_core/struct.ThreadPoolBuilder.html @@ -0,0 +1,229 @@ +ThreadPoolBuilder in rayon_core - Rust +
pub struct ThreadPoolBuilder<S = DefaultSpawn> { /* private fields */ }
Expand description

Used to create a new ThreadPool or to configure the global rayon thread pool.

+

§Creating a ThreadPool

+

The following creates a thread pool with 22 threads.

+ +
let pool = rayon::ThreadPoolBuilder::new().num_threads(22).build().unwrap();
+

To instead configure the global thread pool, use build_global():

+ +
rayon::ThreadPoolBuilder::new().num_threads(22).build_global().unwrap();
+

Implementations§

source§

impl ThreadPoolBuilder

source

pub fn new() -> Self

Creates and returns a valid rayon thread pool builder, but does not initialize it.

+
source§

impl<S> ThreadPoolBuilder<S>
where + S: ThreadSpawn,

Note: the S: ThreadSpawn constraint is an internal implementation detail for the +default spawn and those set by spawn_handler.

+
source

pub fn build(self) -> Result<ThreadPool, ThreadPoolBuildError>

Creates a new ThreadPool initialized using this configuration.

+
source

pub fn build_global(self) -> Result<(), ThreadPoolBuildError>

Initializes the global thread pool. This initialization is +optional. If you do not call this function, the thread pool +will be automatically initialized with the default +configuration. Calling build_global is not recommended, except +in two scenarios:

+
    +
  • You wish to change the default configuration.
  • +
  • You are running a benchmark, in which case initializing may +yield slightly more consistent results, since the worker threads +will already be ready to go even in the first iteration. But +this cost is minimal.
  • +
+

Initialization of the global thread pool happens exactly +once. Once started, the configuration cannot be +changed. Therefore, if you call build_global a second time, it +will return an error. An Ok result indicates that this +is the first initialization of the thread pool.

+
source§

impl ThreadPoolBuilder

source

pub fn build_scoped<W, F, R>( + self, + wrapper: W, + with_pool: F +) -> Result<R, ThreadPoolBuildError>
where + W: Fn(ThreadBuilder) + Sync, + F: FnOnce(&ThreadPool) -> R,

Creates a scoped ThreadPool initialized using this configuration.

+

This is a convenience function for building a pool using std::thread::scope +to spawn threads in a spawn_handler. +The threads in this pool will start by calling wrapper, which should +do initialization and continue by calling ThreadBuilder::run().

+
§Examples
+

A scoped pool may be useful in combination with scoped thread-local variables.

+ +

+scoped_tls::scoped_thread_local!(static POOL_DATA: Vec<i32>);
+
+fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    let pool_data = vec![1, 2, 3];
+
+    // We haven't assigned any TLS data yet.
+    assert!(!POOL_DATA.is_set());
+
+    rayon::ThreadPoolBuilder::new()
+        .build_scoped(
+            // Borrow `pool_data` in TLS for each thread.
+            |thread| POOL_DATA.set(&pool_data, || thread.run()),
+            // Do some work that needs the TLS data.
+            |pool| pool.install(|| assert!(POOL_DATA.is_set())),
+        )?;
+
+    // Once we've returned, `pool_data` is no longer borrowed.
+    drop(pool_data);
+    Ok(())
+}
+
source§

impl<S> ThreadPoolBuilder<S>

source

pub fn spawn_handler<F>(self, spawn: F) -> ThreadPoolBuilder<CustomSpawn<F>>
where + F: FnMut(ThreadBuilder) -> Result<()>,

Sets a custom function for spawning threads.

+

Note that the threads will not exit until after the pool is dropped. It +is up to the caller to wait for thread termination if that is important +for any invariants. For instance, threads created in std::thread::scope +will be joined before that scope returns, and this will block indefinitely +if the pool is leaked. Furthermore, the global thread pool doesn’t terminate +until the entire process exits!

+
§Examples
+

A minimal spawn handler just needs to call run() from an independent thread.

+ +
fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    let pool = rayon::ThreadPoolBuilder::new()
+        .spawn_handler(|thread| {
+            std::thread::spawn(|| thread.run());
+            Ok(())
+        })
+        .build()?;
+
+    pool.install(|| println!("Hello from my custom thread!"));
+    Ok(())
+}
+

The default spawn handler sets the name and stack size if given, and propagates +any errors from the thread builder.

+ +
fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    let pool = rayon::ThreadPoolBuilder::new()
+        .spawn_handler(|thread| {
+            let mut b = std::thread::Builder::new();
+            if let Some(name) = thread.name() {
+                b = b.name(name.to_owned());
+            }
+            if let Some(stack_size) = thread.stack_size() {
+                b = b.stack_size(stack_size);
+            }
+            b.spawn(|| thread.run())?;
+            Ok(())
+        })
+        .build()?;
+
+    pool.install(|| println!("Hello from my fully custom thread!"));
+    Ok(())
+}
+

This can also be used for a pool of scoped threads like crossbeam::scope, +or std::thread::scope introduced in Rust 1.63, which is encapsulated in +build_scoped.

+ +
fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    std::thread::scope(|scope| {
+        let pool = rayon::ThreadPoolBuilder::new()
+            .spawn_handler(|thread| {
+                let mut builder = std::thread::Builder::new();
+                if let Some(name) = thread.name() {
+                    builder = builder.name(name.to_string());
+                }
+                if let Some(size) = thread.stack_size() {
+                    builder = builder.stack_size(size);
+                }
+                builder.spawn_scoped(scope, || {
+                    // Add any scoped initialization here, then run!
+                    thread.run()
+                })?;
+                Ok(())
+            })
+            .build()?;
+
+        pool.install(|| println!("Hello from my custom scoped thread!"));
+        Ok(())
+    })
+}
+
source

pub fn thread_name<F>(self, closure: F) -> Self
where + F: FnMut(usize) -> String + 'static,

Sets a closure which takes a thread index and returns +the thread’s name.

+
source

pub fn num_threads(self, num_threads: usize) -> Self

Sets the number of threads to be used in the rayon threadpool.

+

If you specify a non-zero number of threads using this +function, then the resulting thread-pools are guaranteed to +start at most this number of threads.

+

If num_threads is 0, or you do not call this function, then +the Rayon runtime will select the number of threads +automatically. At present, this is based on the +RAYON_NUM_THREADS environment variable (if set), +or the number of logical CPUs (otherwise). +In the future, however, the default behavior may +change to dynamically add or remove threads as needed.

+

Future compatibility warning: Given the default behavior +may change in the future, if you wish to rely on a fixed +number of threads, you should use this function to specify +that number. To reproduce the current default behavior, you +may wish to use std::thread::available_parallelism +to query the number of CPUs dynamically.

+

Old environment variable: RAYON_NUM_THREADS is a one-to-one +replacement of the now deprecated RAYON_RS_NUM_CPUS environment +variable. If both variables are specified, RAYON_NUM_THREADS will +be preferred.

+
source

pub fn use_current_thread(self) -> Self

Use the current thread as one of the threads in the pool.

+

The current thread is guaranteed to be at index 0, and since the thread is not managed by +rayon, the spawn and exit handlers do not run for that thread.

+

Note that the current thread won’t run the main work-stealing loop, so jobs spawned into +the thread-pool will generally not be picked up automatically by this thread unless you +yield to rayon in some way, like via yield_now(), yield_local(), or scope().

+
§Local thread-pools
+

Using this in a local thread-pool means the registry will be leaked. In future versions +there might be a way of cleaning up the current-thread state.

+
source

pub fn panic_handler<H>(self, panic_handler: H) -> Self
where + H: Fn(Box<dyn Any + Send>) + Send + Sync + 'static,

Normally, whenever Rayon catches a panic, it tries to +propagate it to someplace sensible, to try and reflect the +semantics of sequential execution. But in some cases, +particularly with the spawn() APIs, there is no +obvious place where we should propagate the panic to. +In that case, this panic handler is invoked.

+

If no panic handler is set, the default is to abort the +process, under the principle that panics should not go +unobserved.

+

If the panic handler itself panics, this will abort the +process. To prevent this, wrap the body of your panic handler +in a call to std::panic::catch_unwind().

+
source

pub fn stack_size(self, stack_size: usize) -> Self

Sets the stack size of the worker threads

+
source

pub fn breadth_first(self) -> Self

👎Deprecated: use scope_fifo and spawn_fifo for similar effect

(DEPRECATED) Suggest to worker threads that they execute +spawned jobs in a “breadth-first” fashion.

+

Typically, when a worker thread is idle or blocked, it will +attempt to execute the job from the top of its local deque of +work (i.e., the job most recently spawned). If this flag is set +to true, however, workers will prefer to execute in a +breadth-first fashion – that is, they will search for jobs at +the bottom of their local deque. (At present, workers always +steal from the bottom of other workers’ deques, regardless of +the setting of this flag.)

+

If you think of the tasks as a tree, where a parent task +spawns its children in the tree, then this flag loosely +corresponds to doing a breadth-first traversal of the tree, +whereas the default would be to do a depth-first traversal.

+

Note that this is an “execution hint”. Rayon’s task +execution is highly dynamic and the precise order in which +independent tasks are executed is not intended to be +guaranteed.

+

This breadth_first() method is now deprecated per RFC #1, +and in the future its effect may be removed. Consider using +scope_fifo() for a similar effect.

+
source

pub fn start_handler<H>(self, start_handler: H) -> Self
where + H: Fn(usize) + Send + Sync + 'static,

Sets a callback to be invoked on thread start.

+

The closure is passed the index of the thread on which it is invoked. +Note that this same closure may be invoked multiple times in parallel. +If this closure panics, the panic will be passed to the panic handler. +If that handler returns, then startup will continue normally.

+
source

pub fn exit_handler<H>(self, exit_handler: H) -> Self
where + H: Fn(usize) + Send + Sync + 'static,

Sets a callback to be invoked on thread exit.

+

The closure is passed the index of the thread on which it is invoked. +Note that this same closure may be invoked multiple times in parallel. +If this closure panics, the panic will be passed to the panic handler. +If that handler returns, then the thread will exit normally.

+

Trait Implementations§

source§

impl<S> Debug for ThreadPoolBuilder<S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ThreadPoolBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<S> Freeze for ThreadPoolBuilder<S>
where + S: Freeze,

§

impl<S = DefaultSpawn> !RefUnwindSafe for ThreadPoolBuilder<S>

§

impl<S = DefaultSpawn> !Send for ThreadPoolBuilder<S>

§

impl<S = DefaultSpawn> !Sync for ThreadPoolBuilder<S>

§

impl<S> Unpin for ThreadPoolBuilder<S>
where + S: Unpin,

§

impl<S = DefaultSpawn> !UnwindSafe for ThreadPoolBuilder<S>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/rayon_core/thread_pool/enum.Yield.html b/rayon_core/thread_pool/enum.Yield.html new file mode 100644 index 0000000000..7b7a531f64 --- /dev/null +++ b/rayon_core/thread_pool/enum.Yield.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/enum.Yield.html...

+ + + \ No newline at end of file diff --git a/rayon_core/thread_pool/fn.current_thread_has_pending_tasks.html b/rayon_core/thread_pool/fn.current_thread_has_pending_tasks.html new file mode 100644 index 0000000000..70f4a77284 --- /dev/null +++ b/rayon_core/thread_pool/fn.current_thread_has_pending_tasks.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.current_thread_has_pending_tasks.html...

+ + + \ No newline at end of file diff --git a/rayon_core/thread_pool/fn.current_thread_index.html b/rayon_core/thread_pool/fn.current_thread_index.html new file mode 100644 index 0000000000..98f8aa0540 --- /dev/null +++ b/rayon_core/thread_pool/fn.current_thread_index.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.current_thread_index.html...

+ + + \ No newline at end of file diff --git a/rayon_core/thread_pool/fn.yield_local.html b/rayon_core/thread_pool/fn.yield_local.html new file mode 100644 index 0000000000..97857efa65 --- /dev/null +++ b/rayon_core/thread_pool/fn.yield_local.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.yield_local.html...

+ + + \ No newline at end of file diff --git a/rayon_core/thread_pool/fn.yield_now.html b/rayon_core/thread_pool/fn.yield_now.html new file mode 100644 index 0000000000..ac46021f54 --- /dev/null +++ b/rayon_core/thread_pool/fn.yield_now.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/fn.yield_now.html...

+ + + \ No newline at end of file diff --git a/rayon_core/thread_pool/struct.ThreadPool.html b/rayon_core/thread_pool/struct.ThreadPool.html new file mode 100644 index 0000000000..7c43b178ac --- /dev/null +++ b/rayon_core/thread_pool/struct.ThreadPool.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../rayon_core/struct.ThreadPool.html...

+ + + \ No newline at end of file diff --git a/search-index.js b/search-index.js index 5c2587cd99..a91ec26a5f 100644 --- a/search-index.js +++ b/search-index.js @@ -2,7 +2,11 @@ var searchIndex = new Map(JSON.parse('[\ ["bitflags",{"doc":"Generate types for C-style flags with ergonomic APIs.","t":"TEKRTTFKNNQMNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNCNNNNNNCNNNNNNNNNNNNNNFFNNNNNNNNNNNNNNNNNNNFKKNNNNNNHHHNNNMHHHNNNM","n":["ALL","BitFlags","Bits","Bits","EMPTY","FLAGS","Flag","Flags","all","all","bitflags","bits","borrow","borrow_mut","complement","complement","contains","contains","difference","difference","empty","empty","fmt","from","from_bits","from_bits","from_bits_retain","from_bits_truncate","from_bits_truncate","from_name","from_name","insert","insert","intersection","intersection","intersects","intersects","into","is_all","is_all","is_empty","is_empty","is_named","is_unnamed","iter","iter","iter","iter_names","iter_names","name","new","parser","remove","remove","set","set","symmetric_difference","symmetric_difference","toggle","toggle","try_from","try_into","type_id","union","union","value","Iter","IterNames","borrow","borrow","borrow_mut","borrow_mut","from","from","into","into","into_iter","into_iter","next","next","remaining","try_from","try_from","try_into","try_into","type_id","type_id","ParseError","ParseHex","WriteHex","borrow","borrow_mut","empty_flag","fmt","fmt","from","from_str","from_str_strict","from_str_truncate","into","invalid_hex_flag","invalid_named_flag","parse_hex","to_writer","to_writer_strict","to_writer_truncate","try_from","try_into","type_id","write_hex"],"q":[[0,"bitflags"],[66,"bitflags::iter"],[87,"bitflags::parser"],[110,"core::fmt"],[111,"core::fmt"],[112,"core::result"],[113,"core::any"],[114,"core::fmt"]],"d":["A value with all bits set.","","A bits type that can be used as storage for a flags type.","The underlying bits type.","A value with all bits unset.","The set of defined flags.","A defined flags value that may be named or unnamed.","A set of defined flags using a bits type as storage.","Get a flags value with all known bits set.","Get a flags value with all known bits set.","Generate a flags type.","Get the underlying bits value.","","","The bitwise negation (!) of the bits in a flags value, …","The bitwise negation (!) of the bits in a flags value, …","Whether all set bits in a source flags value are also set …","Whether all set bits in a source flags value are also set …","The intersection of a source flags value with the …","The intersection of a source flags value with the …","Get a flags value with all bits unset.","Get a flags value with all bits unset.","","Returns the argument unchanged.","Convert from a bits value.","Convert from a bits value.","Convert from a bits value exactly.","Convert from a bits value, unsetting any unknown bits.","Convert from a bits value, unsetting any unknown bits.","Get a flags value with the bits of a flag with the given …","Get a flags value with the bits of a flag with the given …","The bitwise or (|) of the bits in two flags values.","The bitwise or (|) of the bits in two flags values.","The bitwise and (&) of the bits in two flags values.","The bitwise and (&) of the bits in two flags values.","Whether any set bits in a source flags value are also set …","Whether any set bits in a source flags value are also set …","Calls U::from(self).","Whether all known bits in this flags value are set.","Whether all known bits in this flags value are set.","Whether all bits in this flags value are unset.","Whether all bits in this flags value are unset.","Whether the flag is named.","Whether the flag is unnamed.","Yield the bits of a source flags value in a set of …","Yield a set of contained flags values.","Yield a set of contained flags values.","Yield a set of contained named flags values.","Yield a set of contained named flags values.","Get the name of this flag.","Define a flag.","Parsing flags from text.","The intersection of a source flags value with the …","The intersection of a source flags value with the …","Call Flags::insert when value is true or Flags::remove …","Call Flags::insert when value is true or Flags::remove …","The bitwise exclusive-or (^) of the bits in two flags …","The bitwise exclusive-or (^) of the bits in two flags …","The bitwise exclusive-or (^) of the bits in two flags …","The bitwise exclusive-or (^) of the bits in two flags …","","","","The bitwise or (|) of the bits in two flags values.","The bitwise or (|) of the bits in two flags values.","Get the flags value of this flag.","An iterator over flags values.","An iterator over flags values.","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","","","","","Get a flags value of any remaining bits that haven’t …","","","","","","","An error encountered while parsing flags from text.","Parse a value from a hex string.","Encode a value as a hex string.","","","A hex or named flag wasn’t found between separators.","","","Returns the argument unchanged.","Parse a flags value from text.","Parse a flags value from text.","Parse a flags value from text.","Calls U::from(self).","An invalid hex flag was encountered.","A named flag that doesn’t correspond to any on the flags …","Parse the value from hex.","Write a flags value as text.","Write only the contained, defined, named flags in a flags …","Write a flags value as text, ignoring any unknown bits.","","","","Write the value as hex."],"i":[3,0,0,2,3,2,0,0,2,2,0,2,5,5,2,2,2,2,2,2,2,2,5,5,2,2,2,2,2,2,2,2,2,2,2,2,2,5,2,2,2,2,5,5,0,2,2,2,2,5,5,0,2,2,2,2,2,2,2,2,5,5,5,2,2,5,0,0,12,13,12,13,12,13,12,13,12,13,12,13,13,12,13,12,13,12,13,0,0,0,16,16,16,16,16,16,0,0,0,16,16,16,18,0,0,0,16,16,16,21],"f":"````````{{}{{d{}{{b{c}}}}}f}0`{{{d{}{{b{c}}}}}cf}{ce{}{}}0{{{d{}{{b{c}}}}}{{d{}{{b{c}}}}}f}0{{{d{}{{b{c}}}}{d{}{{b{c}}}}}hf}0{{{d{}{{b{c}}}}{d{}{{b{c}}}}}{{d{}{{b{c}}}}}f}055{{{j{c}}l}nA`}{cc{}}{c{{Ab{{d{}{{b{c}}}}}}}f}0{c{{d{}{{b{c}}}}}f}00{Ad{{Ab{{d{}{{b{c}}}}}}}f}0{{{d{}{{b{c}}}}{d{}{{b{c}}}}}Aff}066779{{{d{}{{b{c}}}}}hf}000{{{j{c}}}h{}}0`{{{d{}{{b{c}}}}}{{Ah{{d{}{{b{c}}}}}}}f}0{{{d{}{{b{c}}}}}{{Aj{{d{}{{b{c}}}}}}}f}0{{{j{c}}}Ad{}}{{Adc}{{j{c}}}{}}`66{{{d{}{{b{c}}}}{d{}{{b{c}}}}h}Aff}0==77{c{{Al{e}}}{}{}}0{cAn{}}??{{{j{c}}}c{}}``{ce{}{}}000??0000{{{Ah{c}}}{{Ab{e}}}d{}}{{{Aj{c}}}{{Ab{e}}}d{}}{{{Aj{c}}}c{}}666655```33{{}B`}{{B`l}n}0{cc{}}{Ad{{Al{cB`}}}d}007{cB`Bb}0{Ad{{Al{BdB`}}}}{{ce}{{Al{AfBf}}}dBh}00==<{{Bjc}nBh}","c":[],"p":[[17,"Bits"],[10,"Flags",0],[10,"Bits",0],[1,"bool"],[5,"Flag",0],[5,"Formatter",110],[8,"Result",110],[10,"Debug",110],[6,"Option",111],[1,"str"],[1,"unit"],[5,"Iter",66],[5,"IterNames",66],[6,"Result",112],[5,"TypeId",113],[5,"ParseError",87],[10,"Display",110],[10,"ParseHex",87],[5,"Error",110],[10,"Write",110],[10,"WriteHex",87]],"b":[[93,"impl-Debug-for-ParseError"],[94,"impl-Display-for-ParseError"]]}],\ ["bytemuck",{"doc":"This crate gives small utilities for casting between plain …","t":"PKYYYEYKYRTTKYPKYGKPPKYKYKCNNHHHHHHHCNNNHNNNHHNNNNNNQNNNNNNNNNNHHHNNHHHHHNHHNHNNNNNNNNNNNHNNFKNNHHHHHHHHNNNNNHNNNNNNNNHHHHHHHHNHNHHHNNNNNHHHRKGPPNNHHHHHNNNNNNNHHNNMHNNHHHHHNHHNHN","n":["AlignmentMismatch","AnyBitPattern","AnyBitPattern","ByteEq","ByteHash","CheckedBitPattern","CheckedBitPattern","Contiguous","Contiguous","Int","MAX_VALUE","MIN_VALUE","NoUninit","NoUninit","OutputSliceWouldHaveSlop","Pod","Pod","PodCastError","PodInOption","SizeMismatch","TargetAlignmentGreaterAndInputNotAligned","TransparentWrapper","TransparentWrapper","Zeroable","Zeroable","ZeroableInOption","allocation","borrow","borrow_mut","bytes_of","bytes_of_mut","cast","cast_mut","cast_ref","cast_slice","cast_slice_mut","checked","clone","clone_into","eq","fill_zeroes","fmt","fmt","from","from_bytes","from_bytes_mut","from_integer","from_integer","hash","into","into_integer","into_integer","offset_of","peel","peel","peel_mut","peel_mut","peel_ref","peel_ref","peel_slice","peel_slice","peel_slice_mut","peel_slice_mut","pod_align_to","pod_align_to_mut","pod_read_unaligned","to_owned","to_string","try_cast","try_cast_mut","try_cast_ref","try_cast_slice","try_cast_slice_mut","try_from","try_from_bytes","try_from_bytes_mut","try_into","try_pod_read_unaligned","type_id","wrap","wrap","wrap_mut","wrap_mut","wrap_ref","wrap_ref","wrap_slice","wrap_slice","wrap_slice_mut","wrap_slice_mut","write_zeroes","zeroed","zeroed","BoxBytes","TransparentWrapperAlloc","borrow","borrow_mut","box_bytes_of","cast_arc","cast_box","cast_rc","cast_slice_arc","cast_slice_box","cast_slice_rc","cast_vec","deref","deref_mut","drop","from","from","from_box_bytes","from_raw_parts","into","into_raw_parts","layout","peel_arc","peel_box","peel_rc","peel_vec","pod_collect_to_vec","try_cast_arc","try_cast_box","try_cast_rc","try_cast_slice_arc","try_cast_slice_box","try_cast_slice_rc","try_cast_vec","try_from","try_from_box_bytes","try_into","try_zeroed_box","try_zeroed_slice_box","try_zeroed_vec","type_id","wrap_arc","wrap_box","wrap_rc","wrap_vec","zeroed_box","zeroed_slice_box","zeroed_vec","Bits","CheckedBitPattern","CheckedCastError","InvalidBitPattern","PodCastError","borrow","borrow_mut","cast","cast_mut","cast_ref","cast_slice","cast_slice_mut","clone","clone_into","eq","fmt","fmt","from","from","from_bytes","from_bytes_mut","hash","into","is_valid_bit_pattern","pod_read_unaligned","to_owned","to_string","try_cast","try_cast_mut","try_cast_ref","try_cast_slice","try_cast_slice_mut","try_from","try_from_bytes","try_from_bytes_mut","try_into","try_pod_read_unaligned","type_id"],"q":[[0,"bytemuck"],[92,"bytemuck::allocation"],[140,"bytemuck::checked"],[178,"core::fmt"],[179,"core::fmt"],[180,"core::marker"],[181,"core::cmp"],[182,"core::hash"],[183,"core::marker"],[184,"core::result"],[185,"core::any"],[186,"alloc::boxed"],[187,"alloc::sync"],[188,"alloc::rc"],[189,"alloc::vec"],[190,"core::ptr::non_null"],[191,"core::alloc::layout"]],"d":["For this type of cast the alignments must be exactly the …","Marker trait for “plain old data” types that are valid …","Derive the AnyBitPattern trait for a struct","Derive the PartialEq and Eq trait for a type","Derive the Hash trait for a type","","Derive the CheckedBitPattern trait for a struct or enum.","A trait indicating that:","Derive the Contiguous trait for an enum","The primitive integer type with an identical …","The upper inclusive bound for valid instances of this type.","The lower inclusive bound for valid instances of this type.","Marker trait for “plain old data” types with no uninit …","Derive the NoUninit trait for a struct or enum","If the element size changes then the output slice changes …","Marker trait for “plain old data”.","Derive the Pod trait for a struct","The things that can go wrong when casting between Pod data …","Trait for types which are Pod when wrapped in Option.","When casting a slice you can’t convert between ZST …","You tried to cast a slice to an element type with a higher …","A trait which indicates that a type is a …","Derive the TransparentWrapper trait for a struct","Trait for types that can be safely created with zeroed.","Derive the Zeroable trait for a struct","Trait for types which are Zeroable when wrapped in Option.","Stuff to boost things in the alloc crate.","","","Re-interprets &T as &[u8].","Re-interprets &mut T as &mut [u8].","Cast T into U","Cast &mut T into &mut U.","Cast &T into &U.","Cast &[A] into &[B].","Cast &mut [T] into &mut [U].","Checked versions of the casting functions exposed in crate …","","","","Fill all bytes of slice with zeroes (see Zeroable).","","","Returns the argument unchanged.","Re-interprets &[u8] as &T.","Re-interprets &mut [u8] as &mut T.","If value is within the range for valid instances of this …","If value is within the range for valid instances of this …","","Calls U::from(self).","Perform the conversion from C into the underlying integral …","Perform the conversion from C into the underlying integral …","Find the offset in bytes of the given $field of $Type. …","Convert the wrapper type into the inner type.","Convert the wrapper type into the inner type.","Convert a mutable reference to the wrapper type into a …","Convert a mutable reference to the wrapper type into a …","Convert a reference to the wrapper type into a reference …","Convert a reference to the wrapper type into a reference …","Convert a slice to the wrapped type into a slice to the …","Convert a slice to the wrapped type into a slice to the …","Convert a mutable slice to the wrapped type into a mutable …","Convert a mutable slice to the wrapped type into a mutable …","As align_to, but safe because of the Pod bound.","As align_to_mut, but safe because of the Pod bound.","Reads the slice into a T value.","","","Try to cast T into U.","Try to convert a &mut T into &mut U.","Try to convert a &T into &U.","Try to convert &[A] into &[B] (possibly with a change in …","Try to convert &mut [A] into &mut [B] (possibly with a …","","Re-interprets &[u8] as &T.","Re-interprets &mut [u8] as &mut T.","","Reads from the bytes as if they were a T.","","Convert the inner type into the wrapper type.","Convert the inner type into the wrapper type.","Convert a mutable reference to the inner type into a …","Convert a mutable reference to the inner type into a …","Convert a reference to the inner type into a reference to …","Convert a reference to the inner type into a reference to …","Convert a slice to the inner type into a slice to the …","Convert a slice to the inner type into a slice to the …","Convert a mutable slice to the inner type into a mutable …","Convert a mutable slice to the inner type into a mutable …","Fill all bytes of target with zeroes (see Zeroable).","Calls zeroed.","Calls zeroed.","As Box<[u8]>, but remembers the original alignment.","An extension trait for TransparentWrapper and alloc types.","","","Re-interprets Box<T> as BoxBytes.","As try_cast_arc, but unwraps for you.","As try_cast_box, but unwraps for you.","As try_cast_rc, but unwraps for you.","As try_cast_slice_arc, but unwraps for you.","As try_cast_slice_box, but unwraps for you.","As try_cast_slice_rc, but unwraps for you.","As try_cast_vec, but unwraps for you.","","","","Returns the argument unchanged.","","Re-interprets BoxBytes as Box<T>.","Constructs a BoxBytes from its raw parts.","Calls U::from(self).","Deconstructs a BoxBytes into its raw parts.","Returns the original layout.","Convert an Arc to the wrapper type into an Arc to the …","Convert a box to the wrapper type into a box to the inner …","Convert an Rc to the wrapper type into an Rc to the inner …","Convert a vec of the wrapper type into a vec of the inner …","This “collects” a slice of pod data into a vec of a …","Attempts to cast the content type of a Arc.","Attempts to cast the content type of a Box.","Attempts to cast the content type of a Rc.","Attempts to cast the content type of a Arc<[T]>.","Attempts to cast the content type of a Box<[T]>.","Attempts to cast the content type of a Rc<[T]>.","Attempts to cast the content type of a Vec.","","Re-interprets BoxBytes as Box<T>.","","Allocates a Box<T> with all of the contents being zeroed …","Allocates a Box<[T]> with all contents being zeroed out.","Allocates a Vec<T> of length and capacity exactly equal to …","","Convert an Arc to the inner type into an Arc to the …","Convert a box to the inner type into a box to the wrapper …","Convert an Rc to the inner type into an Rc to the wrapper …","Convert a vec of the inner type into a vec of the wrapper …","As try_zeroed_box, but unwraps for you.","As try_zeroed_slice_box, but unwraps for you.","As try_zeroed_vec but unwraps for you","Self must have the same layout as the specified Bits …","A marker trait that allows types that have some invalid …","The things that can go wrong when casting between …","When casting to a CheckedBitPattern type, it is possible …","An error occurred during a true-Pod cast","","","Cast T into U","Cast &mut T into &mut U.","Cast &T into &U.","Cast &[A] into &[B].","Cast &mut [T] into &mut [U].","","","","","","","Returns the argument unchanged.","Re-interprets &[u8] as &T.","Re-interprets &mut [u8] as &mut T.","","Calls U::from(self).","If this function returns true, then it must be valid to …","Reads the slice into a T value.","","","Try to cast T into U.","Try to convert a &mut T into &mut U.","Try to convert a &T into &U.","Try to convert &[A] into &[B] (possibly with a change in …","Try to convert &mut [A] into &mut [B] (possibly with a …","","Re-interprets &[u8] as &T.","Re-interprets &mut [u8] as &mut T.","","Reads from the bytes as if they were a T.",""],"i":[5,0,0,0,0,0,0,0,0,12,12,12,0,0,5,0,0,0,0,5,5,0,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,5,5,5,0,5,5,5,0,0,12,12,5,5,12,12,0,17,17,17,17,17,17,17,17,17,17,0,0,0,5,5,0,0,0,0,0,5,0,0,5,0,5,17,17,17,17,17,17,17,17,17,17,0,8,8,0,0,24,24,0,0,0,0,0,0,0,0,24,24,24,24,24,0,24,24,24,24,30,30,30,30,0,0,0,0,0,0,0,0,24,0,24,0,0,0,24,30,30,30,30,0,0,0,32,0,0,33,33,33,33,0,0,0,0,0,33,33,33,33,33,33,33,0,0,33,33,32,0,33,33,0,0,0,0,0,33,0,0,33,0,33],"f":"```````````````````````````{ce{}{}}0{c{{d{b}}}f}{c{{d{b}}}{fh}}{cefh}{ce{fh}{fh}}1{{{d{c}}}{{d{e}}}fh}{{{d{c}}}{{d{e}}}{fh}{fh}}`{jj}{{ce}l{}{}}{{jj}n}{{{d{c}}}lA`}{{jAb}Ad}0{cc{}}{{{d{b}}}ch}{{{d{b}}}c{fh}}{c{{Aj{{Ah{}{{Af{c}}}}}}}{AlAn}}0{{jc}lB`}{ce{}{}}{{{Ah{}{{Af{c}}}}}c{AlAn}}0`{Bbc{BdBd}}0{BbcBd}000{{{d{Bb}}}{{d{c}}}{BdBd}}000{{{d{c}}}{{Bf{{d{c}}{d{e}}{d{c}}}}}fh}{{{d{c}}}{{Bf{{d{c}}{d{e}}{d{c}}}}}{fh}{fh}}:6{cBh{}}{c{{Bj{ej}}}fh}{c{{Bj{ej}}}{fh}{fh}}1{{{d{c}}}{{Bj{{d{e}}j}}}fh}{{{d{c}}}{{Bj{{d{e}}j}}}{fh}{fh}}{c{{Bj{e}}}{}{}}{{{d{b}}}{{Bj{cj}}}h}{{{d{b}}}{{Bj{cj}}}{fh}}21{cBl{}}{cBb{BdBd}}0{cBbBd}000{{{d{c}}}{{d{Bb}}}{BdBd}}000{clA`}{{}A`}0``{ce{}{}}0{{{Bn{c}}}C`{`Bd}}{{{Cb{c}}}{{Cb{e}}}{fh}{fh}}{{{Bn{c}}}{{Bn{e}}}fh}{{{Cd{c}}}{{Cd{e}}}{fh}{fh}}{{{Cb{{d{c}}}}}{{Cb{{d{e}}}}}{fh}{fh}}{{{Bn{{d{c}}}}}{{Bn{{d{e}}}}}fh}{{{Cd{{d{c}}}}}{{Cd{{d{e}}}}}{fh}{fh}}{{{Cf{c}}}{{Cf{e}}}fh}{C`c{}}0{C`l}{cc{}}{{{Bn{c}}}C`{Bd`}}{C`{{Bn{c}}}{`Bd}}{{{Ch{b}}Cj}C`}>{C`{{Bf{{Ch{b}}Cj}}}}{C`Cj}{{{Cb{Cl}}}{{Cb{c}}}Bd}{{{Bn{Cl}}}{{Bn{c}}}Bd}{{{Cd{Cl}}}{{Cd{c}}}Bd}{{{Cf{Cl}}}{{Cf{c}}}{BdBd}}{{{d{c}}}{{Cf{e}}}f{fh}}{{{Cb{c}}}{{Bj{{Cb{e}}{Bf{j{Cb{c}}}}}}}{fh}{fh}}{{{Bn{c}}}{{Bj{{Bn{e}}{Bf{j{Bn{c}}}}}}}fh}{{{Cd{c}}}{{Bj{{Cd{e}}{Bf{j{Cd{c}}}}}}}{fh}{fh}}{{{Cb{{d{c}}}}}{{Bj{{Cb{{d{e}}}}{Bf{j{Cb{{d{c}}}}}}}}}{fh}{fh}}{{{Bn{{d{c}}}}}{{Bj{{Bn{{d{e}}}}{Bf{j{Bn{{d{c}}}}}}}}}fh}{{{Cd{{d{c}}}}}{{Bj{{Cd{{d{e}}}}{Bf{j{Cd{{d{c}}}}}}}}}{fh}{fh}}{{{Cf{c}}}{{Bj{{Cf{e}}{Bf{j{Cf{c}}}}}}}fh}{c{{Bj{e}}}{}{}}{C`{{Bj{{Bn{c}}{Bf{jC`}}}}}{`Bd}}1{{}{{Bj{{Bn{c}}l}}}A`}{Cn{{Bj{{Bn{{d{c}}}}l}}}A`}{Cn{{Bj{{Cf{c}}l}}}A`}{cBl{}}{{{Cb{c}}}{{Cb{Cl}}}Bd}{{{Bn{c}}}{{Bn{Cl}}}Bd}{{{Cd{c}}}{{Cd{Cl}}}Bd}{{{Cf{c}}}{{Cf{Cl}}}{BdBd}}{{}{{Bn{c}}}A`}{Cn{{Bn{{d{c}}}}}A`}{Cn{{Cf{c}}}A`}`````{ce{}{}}0{cefD`}{ce{fh}{fD`}}1{{{d{c}}}{{d{e}}}fD`}{{{d{c}}}{{d{e}}}{fh}{fD`}}{DbDb}{{ce}l{}{}}{{DbDb}n}{{DbAb}Ad}0{jDb}{cc{}}{{{d{b}}}cD`}{{{d{b}}}c{fD`}}{{Dbc}lB`}={cn{}}3>{cBh{}}{c{{Bj{eDb}}}fD`}{c{{Bj{eDb}}}{fh}{D`f}}1{{{d{c}}}{{Bj{{d{e}}Db}}}fD`}{{{d{c}}}{{Bj{{d{e}}Db}}}{fh}{D`f}}{c{{Bj{e}}}{}{}}{{{d{b}}}{{Bj{cDb}}}D`}{{{d{b}}}{{Bj{cDb}}}{D`f}}21{cBl{}}","c":[],"p":[[1,"u8"],[1,"slice"],[10,"NoUninit",0],[10,"AnyBitPattern",0],[6,"PodCastError",0],[1,"unit"],[1,"bool"],[10,"Zeroable",0],[5,"Formatter",178],[8,"Result",178],[17,"Int"],[10,"Contiguous",0],[6,"Option",179],[10,"Copy",180],[10,"Ord",181],[10,"Hasher",182],[10,"TransparentWrapper",0],[10,"Sized",180],[1,"tuple"],[5,"String",183],[6,"Result",184],[5,"TypeId",185],[5,"Box",186],[5,"BoxBytes",92],[5,"Arc",187],[5,"Rc",188],[5,"Vec",189],[5,"NonNull",190],[5,"Layout",191],[10,"TransparentWrapperAlloc",92],[1,"usize"],[10,"CheckedBitPattern",140],[6,"CheckedCastError",140]],"b":[[41,"impl-Debug-for-PodCastError"],[42,"impl-Display-for-PodCastError"],[155,"impl-Display-for-CheckedCastError"],[156,"impl-Debug-for-CheckedCastError"]]}],\ ["bytemuck_derive",{"doc":"Derive macros for bytemuck traits.","t":"YYYYYYYYY","n":["AnyBitPattern","ByteEq","ByteHash","CheckedBitPattern","Contiguous","NoUninit","Pod","TransparentWrapper","Zeroable"],"q":[[0,"bytemuck_derive"]],"d":["Derive the AnyBitPattern trait for a struct","Derive the PartialEq and Eq trait for a type","Derive the Hash trait for a type","Derive the CheckedBitPattern trait for a struct or enum.","Derive the Contiguous trait for an enum","Derive the NoUninit trait for a struct or enum","Derive the Pod trait for a struct","Derive the TransparentWrapper trait for a struct","Derive the Zeroable trait for a struct"],"i":[0,0,0,0,0,0,0,0,0],"f":"`````````","c":[],"p":[],"b":[]}],\ -["cosmic_text",{"doc":"COSMIC Text","t":"GPGPGFPFFFTTPPPFPFFPFGPFFPFFPPFPGPPPPPFPPPPPTTKFPPPPPPPTGGPPFFFFPPPTPPPPTFPFFFFPPPPPPGFPTPFPPGPPTPPPPPPPPPPPPPPPPPFFPPPPPPTPPFPGPPPPFFFFFFFGPGGGPFGFTPFPPPPPPPFPPPGTPNMNNNONNNNMNNNNNNNNONOMNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNMNONOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNOMNMNNNNONNNNNNNNNNNNNNNNNNONMNMNNNONNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOMNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOONNNNNNNNNNNNNNONNONOONNOMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNOONNNNNOOOOOOOONNNNOOOONNOONNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNONNNNNNNNNNNNNNNNNOOENNNNNMNNNNNNMNMNNNNNNNNNNNNNNMNNNMNNNNNNNMNNNNNNNNNNNONONNOOOMNNOONOONNNMNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONOOONNNNNNONOOOOOOOOOOOOOOOOOOOOOOOOOOOOO","n":["Action","Advanced","Affinity","After","Align","Angle","Arc","Attrs","AttrsList","AttrsOwned","BLACK","BOLD","Backspace","Basic","Before","BidiParagraphs","Borrowed","BorrowedWithFontSystem","Buffer","BufferEnd","BufferLine","BufferRef","BufferStart","CacheKey","CacheKeyFlags","Center","Change","ChangeItem","Click","Close","Color","Color","Command","Condensed","Cr","CrLf","Cursive","Cursive","Cursor","CurveTo","Delete","DoubleClick","Down","Drag","EXTRA_BOLD","EXTRA_LIGHT","Edit","Editor","End","End","Enter","Escape","Expanded","ExtraCondensed","ExtraExpanded","FAKE_ITALIC","Family","FamilyOwned","Fantasy","Fantasy","Font","FontMatchAttrs","FontMatchKey","FontSystem","Glyph","GotoLine","Home","IDENTITY","Indent","Insert","Italic","Justified","LIGHT","LayoutCursor","LayoutCursor","LayoutGlyph","LayoutLine","LayoutRun","LayoutRunIter","Left","Left","LeftWord","Lf","LfCr","Line","LineEnding","LineIter","LineTo","MEDIUM","Mask","Metrics","Monospace","Monospace","Motion","Motion","MoveTo","NORMAL","Name","Name","Next","NextWord","None","None","None","Normal","Normal","Normal","Oblique","One","Owned","PageDown","PageUp","ParagraphEnd","ParagraphStart","PhysicalGlyph","Placement","Previous","PreviousWord","QuadTo","Right","Right","RightWord","SEMIBOLD","SansSerif","SansSerif","Scroll","Scroll","Selection","SemiCondensed","SemiExpanded","Serif","Serif","ShapeBuffer","ShapeGlyph","ShapeLine","ShapeRunCache","ShapeRunKey","ShapeSpan","ShapeWord","Shaping","SoftHome","Stretch","Style","SubpixelBin","SubpixelMask","SwashCache","SwashContent","SwashImage","THIN","Three","Transform","TripleClick","Two","UltraCondensed","UltraExpanded","Unindent","Up","Vertical","Weight","Word","Word","WordOrGlyph","Wrap","ZERO","Zero","a","action","action","action","add_span","affinity","after","align","all","append","apply_change","apply_change","as_attrs","as_family","as_float","as_rgba","as_rgba_tuple","as_str","as_swash","ascent","attrs_list","attrs_spans","auto_indent","auto_indent","b","before","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","blank","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_with","borrow_with","borrow_with","buffer_ref","buffer_ref","buffer_ref_mut","buffer_ref_mut","cache_key","cache_key_flags","cache_key_flags","cache_key_flags","cache_key_flags","cache_key_flags","clear","clear_spans","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","color","color_opt","color_opt","color_opt","color_opt","compatible","complement","compute","contains","content","copy_selection","copy_selection","cursor","cursor","cursor_motion","cursor_motion","data","data","db","db_mut","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default_attrs","defaults","delete_range","delete_range","delete_selection","delete_selection","deref","deref_mut","descent","determinant","difference","draw","draw","draw","draw","empty","end","end","end","ending","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","extend","family","family","family_owned","finish_change","finish_change","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","font_id","font_id","font_id","font_monospace_em_width","font_size","font_size","font_size_bits","fontdb","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_after","from_before","from_bits","from_bits_retain","from_bits_retain","from_bits_truncate","from_degrees","from_gradians","from_iter","from_name","from_radians","from_turns","g","get","get_font","get_font_matches","get_font_supported_codepoints_in_word","get_image","get_image_uncached","get_monospace_ids_for_scripts","get_outline_commands","get_span","glyph","glyph_id","glyph_id","glyph_id","glyphs","glyphs","glyphs","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","height","highlight","hit","horizontal","id","image_cache","index","insert","insert","insert","insert_at","insert_at","insert_string","insert_string","intersection","intersects","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_locale_and_db","into_text","invert","is_all","is_empty","is_monospace","items","iter","iter_names","layout","layout","layout","layout","layout_cursor","layout_in_buffer","layout_opt","layout_runs","layout_to_buffer","left","level","level","line","line","line","line_height","line_i","line_layout","line_layout","line_shape","line_shape","line_top","line_w","line_y","lines","locale","matches","max_ascent","max_descent","metadata","metadata","metadata","metadata","metadata","metadata","metrics","monospace_em_width","monospace_width","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new_empty","new_in_buffer","new_in_buffer","new_in_buffer","new_with_affinity","new_with_fonts","new_with_locale_and_db","next","next","next","not","outline_command_cache","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","physical","placement","pre_rotate","pre_scale","pre_translate","r","redraw","redraw","redraw","remove","reset","reset_layout","reset_shaping","reverse","reverse","rgb","rgba","rotation","rotation_about","rtl","rtl","rustybuzz","rustybuzz","scale","scale","scripts","scroll","selection","selection","selection_bounds","selection_bounds","set","set_align","set_attrs_list","set_auto_indent","set_auto_indent","set_cursor","set_cursor","set_ending","set_metadata","set_metrics","set_metrics","set_metrics_and_size","set_metrics_and_size","set_monospace_width","set_redraw","set_redraw","set_redraw","set_rich_text","set_rich_text","set_scroll","set_selection","set_selection","set_size","set_size","set_tab_width","set_tab_width","set_text","set_text","set_text","set_wrap","set_wrap","shape","shape_as_needed","shape_as_needed","shape_as_needed","shape_in_buffer","shape_opt","shape_until_cursor","shape_until_cursor","shape_until_scroll","shape_until_scroll","size","size_hint","skew","source","spans","spans","split_off","split_off","start","start","start","start_change","start_change","stretch","stretch","stretch","style","style","style","sub","sub_assign","symmetric_difference","tab_width","tab_width","text","text","text","text","then","then_rotate","then_scale","then_translate","to_degrees","to_number","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_radians","to_string","to_string","to_string","toggle","top","transform","transform_point","transform_vector","translation","trim","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unicode_codepoints","union","verb","visible_lines","w","w","weight","weight","weight","width","with_buffer","with_buffer","with_buffer_mut","with_buffer_mut","with_buffer_mut","with_pixels","words","wrap","x","x","x","x_advance","x_advance","x_bin","x_offset","x_offset","xx","xy","y","y","y","y_advance","y_advance","y_bin","y_offset","y_offset","yx","yy","lines","x","x","x","x","y","y","y","y"],"q":[[0,"cosmic_text"],[1231,"cosmic_text::Action"],[1240,"core::ops::range"],[1241,"core::option"],[1242,"swash::font"],[1243,"core::cmp"],[1244,"zeno::geometry"],[1245,"zeno::geometry"],[1246,"alloc::string"],[1247,"fontdb"],[1248,"core::ops::function"],[1249,"core::iter::traits::collect"],[1250,"core::fmt"],[1251,"core::fmt"],[1252,"core::fmt"],[1253,"alloc::vec"],[1254,"fontdb"],[1255,"core::hash"],[1256,"bitflags::iter"],[1257,"bitflags::iter"],[1258,"fontdb"],[1259,"core::convert"],[1260,"zeno::command"],[1261,"core::ops::function"]],"d":["An action to perform on an Editor","Advanced text shaping and font fallback.","Whether to associate cursors placed at a boundary between …","","Align or justify","Represents an angle in degrees or radians.","","Text attributes","List of text attributes to apply to a line","An owned version of Attrs","Black weight (900), the thickest value.","Bold weight (700).","Delete text behind cursor","Basic shaping with no font fallback.","","An iterator over the paragraphs in the input text. It is …","","A value borrowed together with an FontSystem","A buffer of text that is shaped and laid out","Move cursor to the end of the document","A line (or paragraph) of text that is shaped and laid out","","Move cursor to the start of the document","Key for building a glyph cache","Flags that change rendering","","A set of change items grouped into one logical change","A unique change to an editor","Mouse click at specified position","Closes a subpath, connecting the final point to the …","Text color","32-bit RGBA bitmap.","Path command.","","Use \\\\r for line ending (many legacy systems)","Use \\\\r\\\\n for line ending (Windows-style)","Glyphs in cursive fonts generally use a more informal …","","Current cursor location","A cubic bezier curve from the previous point to the final …","Delete text in front of cursor","Mouse double click at specified position","Move cursor down","Mouse drag to specified position","Extra-bold weight (800).","Extra light weight (200).","A trait to allow easy replacements of Editor, like …","A wrapper of [Buffer] for easy editing","Move cursor to end of line","","Create new line","Escape, clears selection","","","","Skew by 14 degrees to synthesize italic","A font family.","An owned version of Family","Fantasy fonts are primarily decorative or expressive fonts …","","A font","Font-specific part of Attrs to be used for matching","","Access to the system fonts.","Wraps at a glyph level","Move cursor to specific line","Move cursor to start of line","Identity matrix.","","Insert character at cursor","A form that is generally cursive in nature.","","Light weight (300).","The position of a cursor within a [Buffer].","Apply specific LayoutCursor","A laid out glyph","A line of laid out glyphs","A line of visible text for rendering","An iterator of visible text lines, see LayoutRun","Move cursor left","","Move cursor to next word boundary to the left","Use \\\\n for line ending (POSIX-style)","Use \\\\n\\\\r for line ending (some legacy systems)","Select by lines","Line ending","Iterator over lines terminated by LineEnding","A straight line from the previous point to the specified …","Medium weight (500, higher than normal).","8-bit alpha mask.","Metrics of text","The sole criterion of a monospace font is that all glyphs …","","A motion to perform on a Cursor","Move the cursor with some motion","Begins a new subpath at the specified point.","Normal (400).","The name of a font family of choice.","","Move cursor to next character (Self::Right in LTR, …","Move cursor to next word boundary","No selection","No wrapping","No line ending","A face that is neither italic not obliqued.","Normal selection","","A typically-sloped version of the regular face.","","","Move cursor down one page","Move cursor up one page","Move cursor to end of paragraph","Move cursor to start of paragraph","","Describes the offset and dimensions of a rendered mask.","Move cursor to previous character (Self::Left in LTR, …","Move cursor to previous word boundary","A quadratic curve from the previous point to the final …","Move cursor right","","Move cursor to next word boundary to the right","Semibold weight (600).","Glyphs in sans-serif fonts, as the term is used in CSS, …","","Scroll position in [Buffer]","Scroll specified number of lines","Selection mode","","","Serif fonts represent the formal text style for a script.","","A set of buffers containing allocations for shaped text.","A shaped glyph","A shaped line (or paragraph)","A helper structure for caching shape runs.","Key for caching shape runs.","A shaped span (for bidirectional processing)","A shaped word (for word wrapping)","The shaping strategy of some text.","Move cursor to start of line, skipping whitespace","A face width.","Allows italic or oblique faces to be selected.","Binning of subpixel position for cache optimization","32-bit RGBA subpixel mask.","Cache for rasterizing with the swash scaler","Content of a scaled glyph image.","Scaled glyph image.","Thin weight (100), the thinnest value.","","Two dimensional transformation matrix.","Mouse triple click at specified position","","","","","Move cursor up","Move cursor up or down by a number of pixels","Specifies the weight of glyphs in the font, their degree …","Select by words","Wraps at the word level","Wraps at the word level, or fallback to glyph level if a …","Wrapping mode","Angle of zero degrees.","","Get the alpha component","Perform an Action on the editor","","Perform an Action on the editor","Add an attribute span, removes any previous matching parts …","Whether to associate the cursor with the run before it or …","","Get the Text alignment","Get a flags value with all known bits set.","Append line at end of this line","Apply a change","","","","","Get an array over all of the components, in [r, g, b, a] …","Get a tuple over all of the attributes, in (r, g, b, a) …","Get the line ending as a str","","","Get attributes list","","Get the current automatic indentation setting","","Get the blue component","","The bitwise and (&) of the bits in two flags values.","The bitwise and (&) of the bits in two flags values.","The bitwise or (|) of the bits in two flags values.","The bitwise or (|) of the bits in two flags values.","","Get the underlying bits value.","The bitwise exclusive-or (^) of the bits in two flags …","The bitwise exclusive-or (^) of the bits in two flags …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Mutably borrows self together with an FontSystem for more …","Mutably borrows self together with an FontSystem for more …","Mutably borrows the buffer together with an FontSystem for …","Get the internal BufferRef","","Get the internal BufferRef","","Cache key, see CacheKey","Set CacheKeyFlags","","","CacheKeyFlags","","Resets the image to a default state.","Clear the current attribute spans","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Set Color","","","Optional color override","","Check if this set of attributes can be shaped with another","The bitwise negation (!) of the bits in a flags value, …","Given an origin, offset and bounding box, computes the …","Whether all set bits in a source flags value are also set …","Content of the image.","Copy selection","","Get the current cursor","","Apply a Motion to a Cursor","Apply a Motion to a Cursor","","Raw image data.","Get the database.","Get a mutable reference to the database.","","","","","","","","","","","","","","","","","","Get the default Attrs","Delete text starting at start Cursor and ending at end …","","Delete selection, adjusting cursor and returning true if …","","","","","Returns the determinant of the transform.","The intersection of a source flags value with the …","Draw the buffer","Draw the editor","","Draw the buffer","Get a flags value with all bits unset.","Cursor indicating end of change","End index of cluster in original line","","Get line ending","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bitwise or (|) of the bits in each flags value.","Set Family","","","Get completed change","","CacheKeyFlags","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Font ID","Font id of the glyph","","","Font size in pixels","Font size of the glyph","f32 bits of font size","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Convert from a bits value.","","Convert from a bits value exactly.","Convert from a bits value, unsetting any unknown bits.","Creates a new angle from degrees.","Creates a new angle from gradians.","The bitwise or (|) of the bits in each flags value.","Get a flags value with the bits of a flag with the given …","Creates a new angle from radians.","Creates a new angle from turns.","Get the green component","Get cache item, updating age if found","Get a font by its ID.","","","Create a swash Image from a cache key, caching results","Create a swash Image from a cache key, without caching …","","","Get the attribute span for an index","Index of [LayoutGlyph] in [LayoutLine::glyphs]","Glyph ID","Font id of the glyph","","The array of layout glyphs to draw","Glyphs in line","","","","","","","","","","","","","","","","Height in pixels.","Return the pixel span Some((x_left, x_width)) of the …","Convert x, y position to Cursor (hit detection)","The horizontal position of scroll in fractional pixels","","","First-byte-index of glyph at cursor (will insert behind …","The bitwise or (|) of the bits in two flags values.","Insert cache item with current age","Insert if true, delete if false","Insert text at specified cursor with specified attrs_list","","Insert a string at the current cursor or replacing the …","Insert a string at the current cursor or replacing the …","The bitwise and (&) of the bits in two flags values.","Whether any set bits in a source flags value are also set …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","Consume this FontSystem and return the locale and database.","Consume this line, returning only its text contents as a …","Returns the inverse of the transform, if any.","Whether all known bits in this flags value are set.","Whether all bits in this flags value are unset.","","Change items grouped into one change","Yield a set of contained flags values.","Yield a set of contained named flags values.","Layout line, will cache results","","Index of [LayoutLine] in [BufferLine::layout]","Index of [LayoutLine] in [BufferLine::layout]. This will …","Convert a Cursor to a LayoutCursor","Layout a line using a pre-existing shape buffer, will …","Get line layout cache","Get the visible layout runs for rendering and other tasks","","Horizontal offset with respect to the origin specified …","Unicode BiDi embedding level, character is left-to-right …","","Index of [BufferLine] in [Buffer::lines]","Index of [BufferLine] in [Buffer::lines]","Index of [BufferLine] in [Buffer::lines]. This will be …","Line height in pixels","The index of the original text line","Lay out the provided line index and return the result","Lay out the provided line index and return the result","Shape the provided line index and return the result","Shape the provided line index and return the result","Y offset to top of line","Width of line","Y offset to baseline of line","BufferLines (or paragraphs) of text in the buffer","Get the locale.","Check if font matches","Maximum ascent of the glyphs in line","Maximum descent of the glyphs in line","Set metadata","Get line metadata. This will be None if …","","","Metadata from Attrs","","Get the current Metrics","","Get the current monospace_width","Create a new FontSystem, that allows access to any …","","Create a new swash cache","","Create a new set of attributes with sane defaults","","Create a new attributes list with a set of default Attrs","Create an iterator to split the input text into paragraphs …","Creates a new transform.","","","Create a new Buffer with the provided FontSystem and …","Create a new line with the given text and attributes list …","","","Create a new cursor","Create a new LayoutCursor","Create a new scroll","Create a new Editor with the provided [Buffer]","Create an iterator of lines in a string slice","","","Panics","Creates a new empty scaled image.","Create an empty Buffer with the provided Metrics. This is …","Shape a word into a set of glyphs, using a scratch buffer.","Shape a span into a set of words, using a scratch buffer.","Shape a line into a set of spans, using a scratch buffer. …","Create a new cursor, specifying the affinity","Create a new FontSystem with a pre-specified set of fonts.","Create a new FontSystem with a pre-specified locale and …","","","","The bitwise negation (!) of the bits in a flags value, …","","","","","","","","","","","","","","Offset and size of the image.","Returns a new transform that represents a rotation …","Returns a new transform that represents a scale followed …","Returns a new transform that represents a translation …","Get the red component","Get the Buffer redraw flag","Get the Buffer redraw flag","True if a redraw is needed","The intersection of a source flags value with the …","Reset shaping, layout, and metadata caches","Reset only layout cache","Reset shaping and layout caches","","","Create new color with red, green, and blue components","Create new color with red, green, blue, and alpha …","Creates a rotation transform.","Creates a rotation transform around a point.","True if the original paragraph direction is RTL","","","","Creates a scale transform.","","","Get the current scroll location","Get the current selection position","","Get the bounds of the current selection","Get the bounds of the current selection","Call insert when value is true or remove when value is …","Set the text alignment","Set attributes list","Enable or disable automatic indentation","","Set the current cursor","","Set line ending","Set line metadata. This is stored until the next line reset","Set the current Metrics","Set the current Metrics","Set the current Metrics and buffer dimensions at the same …","Set the current Metrics and buffer dimensions at the same …","Set monospace width monospace glyphs should be resized to …","Set the Buffer redraw flag","Set the Buffer redraw flag","Set redraw needed flag","Set text of buffer, using an iterator of styled spans …","Set text of buffer, using an iterator of styled spans …","Set the current scroll location","Set the current selection position","","Set the current buffer dimensions","Set the current buffer dimensions","Set the current tab width. A tab_width of 0 is not …","","Set text of buffer, using provided attributes for each …","Set text and attributes list","Set text of buffer, using provided attributes for each …","Set the current Wrap","Set the current Wrap","Shape line, will cache results","Shape lines until scroll, after adjusting scroll if the …","","Shape lines until scroll, after adjusting scroll if the …","Shape a line using a pre-existing shape buffer, will cache …","Get line shaping cache","Shape lines until cursor, also scrolling to include cursor …","Shape lines until cursor, also scrolling to include cursor …","Shape lines until scroll","Shape lines until scroll","Get the current buffer dimensions (width, height)","","Creates a skew transform.","Source of the image.","Get the current attribute spans","","Split attributes list at an offset","Split off new line at index","Cursor indicating start of change","Start index of cluster in original line","","Start collecting change","","Set Stretch","","","Set Style","","","The intersection of a source flags value with the …","The intersection of a source flags value with the …","The bitwise exclusive-or (^) of the bits in two flags …","Get the current tab width","","Get current text","The original text line","Text to be inserted or deleted","","Returns a new transform that represents the application of …","Returns a new transform that represents this transform …","Returns a new transform that represents this transform …","Returns a new transform that represents this transform …","Returns the angle in degrees.","Returns a numeric representation of a width.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the angle in radians.","","","","The bitwise exclusive-or (^) of the bits in two flags …","Vertical offset with respect to the origin specified when …","Returns the result of a transformation matrix applied to …","Returns the result of applying this transform to a point.","Returns the result of applying this transform to a vector.","Creates a translation transform.","Remove anything in the cache with an age older than …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bitwise or (|) of the bits in two flags values.","Returns the associated verb for the command.","Get the number of lines that can be viewed in the buffer","Width of hitbox","Width of the line","Set Weight","","","Width in pixels.","Get the internal Buffer","Get the internal Buffer","Get the internal Buffer, mutably","Get the internal Buffer, mutably","Get the internal Buffer, mutably","Enumerate pixels in an Image, use with_image for better …","","Get the current Wrap","","X offset of hitbox","Integer component of X offset in line","","","Binning of fractional X offset","X offset in line","","","","","Y offset of hitbox","Integer component of Y offset in line","","","Binning of fractional Y offset","Y offset in line","","","","","","","","","","","",""],"i":[0,55,0,13,0,0,33,0,0,0,35,35,5,55,13,0,33,0,0,46,0,0,46,0,0,16,0,0,5,37,0,63,0,62,27,27,22,21,0,37,5,5,46,5,35,35,0,0,46,16,5,5,62,62,62,18,0,0,22,21,0,0,0,0,54,46,46,40,5,5,36,16,35,0,46,0,0,0,0,46,16,46,27,27,49,0,0,37,35,63,0,22,21,0,5,37,35,22,21,46,46,49,54,27,36,49,62,36,23,33,46,46,46,46,0,0,46,46,37,46,16,46,35,22,21,0,5,0,62,62,22,21,0,0,0,0,0,0,0,0,46,0,0,0,63,0,0,0,35,23,0,5,23,62,62,5,46,46,0,49,54,54,0,39,23,1,3,7,8,9,44,13,15,18,15,3,7,20,21,23,1,1,27,29,56,15,60,3,7,1,13,18,18,18,18,18,18,18,18,57,22,35,36,4,29,74,1,21,37,12,38,20,39,9,82,40,83,84,41,42,32,15,18,43,23,44,13,45,46,47,7,5,33,48,19,49,50,8,51,52,53,54,16,27,86,55,73,56,57,58,59,60,61,62,63,34,22,35,36,4,29,74,1,21,37,12,38,20,39,9,82,40,83,84,41,42,32,15,18,43,23,44,13,45,46,47,7,5,33,48,19,49,50,8,51,52,53,54,16,27,86,55,73,56,57,58,59,60,61,62,63,34,3,3,32,3,7,3,7,52,12,12,20,51,56,34,9,22,35,36,1,21,37,12,38,20,39,9,40,41,42,32,15,18,43,23,44,13,45,46,47,5,48,19,49,50,51,52,53,54,16,27,55,56,57,58,59,60,61,62,63,34,22,35,36,1,21,37,12,38,20,39,9,40,41,42,32,15,18,43,23,44,13,45,46,47,5,48,19,49,50,51,52,53,54,16,27,55,56,57,58,59,60,61,62,63,34,35,1,18,43,23,44,13,45,50,62,12,12,20,51,56,12,18,42,18,34,3,7,3,7,32,8,29,34,4,4,35,36,39,40,41,42,44,13,47,19,27,73,61,62,63,34,60,9,3,7,3,7,8,8,56,40,18,32,7,8,8,18,48,51,56,15,22,35,36,1,21,37,12,38,20,39,9,41,18,43,23,44,13,45,46,47,5,49,50,54,16,27,55,60,62,63,18,12,12,20,3,7,43,22,35,36,4,29,74,1,21,37,12,38,20,39,9,82,40,83,84,41,41,42,32,15,18,18,18,18,18,43,23,44,13,45,46,47,7,5,33,48,19,49,50,8,51,52,53,54,54,16,16,27,86,55,73,56,57,58,59,60,61,62,63,43,51,56,56,41,51,43,0,22,35,36,4,29,74,1,21,37,12,38,38,20,39,9,82,40,83,84,41,42,32,15,18,43,23,44,13,45,46,47,7,5,33,33,33,33,48,19,49,50,8,51,52,53,54,16,27,86,55,73,56,57,58,59,60,61,62,63,34,13,13,18,18,18,18,39,39,18,18,39,39,1,61,4,4,4,74,74,4,74,9,45,43,51,56,83,53,57,22,35,36,1,21,12,38,20,18,43,23,55,60,62,42,83,32,47,29,74,44,18,61,48,3,7,3,3,18,18,22,35,36,4,29,74,1,21,37,12,38,20,39,9,82,40,83,84,41,42,32,15,18,43,23,44,13,45,46,47,7,5,33,48,19,49,50,8,51,52,53,54,16,27,86,55,73,56,57,58,59,60,61,62,63,34,82,84,18,86,4,15,40,18,18,4,19,18,18,15,59,45,47,32,15,15,32,59,42,51,58,44,45,47,41,83,32,8,32,8,83,83,83,32,4,12,53,53,12,15,12,20,51,56,32,29,32,4,29,74,21,12,20,9,82,40,84,41,32,15,43,23,44,45,47,7,86,57,58,59,34,32,57,58,59,44,4,4,82,84,86,18,74,35,1,18,43,23,44,13,45,47,50,62,51,34,40,40,40,1,3,3,32,18,15,15,15,48,19,1,1,40,40,83,59,0,29,40,41,29,32,3,7,3,3,18,15,15,3,7,3,7,15,15,32,8,32,8,32,3,3,32,32,8,32,3,7,32,8,3,7,32,15,8,32,8,15,3,7,8,15,15,32,8,32,8,32,84,40,34,9,59,9,15,48,51,56,3,7,12,12,20,12,12,20,18,18,18,3,7,15,83,48,60,40,40,40,40,39,62,22,35,36,1,21,37,12,38,20,39,9,40,41,42,32,15,18,43,23,44,13,45,46,47,5,48,19,49,50,51,52,53,54,16,27,55,56,57,58,59,60,61,62,63,34,39,41,54,16,18,42,37,40,40,40,61,22,35,36,4,29,74,1,21,37,12,38,20,39,9,82,40,83,84,41,42,32,15,18,43,23,44,13,45,46,47,7,5,33,48,19,49,50,8,51,52,53,54,16,27,86,55,73,56,57,58,59,60,61,62,63,34,22,35,36,4,29,74,1,21,37,12,38,20,39,9,82,40,83,84,41,42,32,15,18,43,23,44,13,45,46,47,7,5,33,48,19,49,50,8,51,52,53,54,16,27,86,55,73,56,57,58,59,60,61,62,63,34,22,35,36,4,29,74,1,21,37,12,38,20,39,9,82,40,83,84,41,42,32,15,18,43,23,44,13,45,46,47,7,5,33,48,19,49,50,8,51,52,53,54,16,27,86,55,73,56,57,58,59,60,61,62,63,34,29,18,37,32,51,53,12,12,20,42,3,3,3,3,8,74,58,32,40,51,52,56,57,43,51,56,40,40,40,51,52,56,57,43,51,56,40,40,105,106,107,108,109,106,107,108,109],"f":"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{bd}{{fhj}l}{{nhj}l}{{{A`{c}}j}lf}{{Ab{Af{Ad}}Ah}l}`{AjAl}{An{{Bb{B`}}}}{{}Bd}{{AnAn}l}{{fBf}Al}{{nBf}Al}{BhAh}{BjBl}{BnC`}{b{{Cb{d}}}}{b{{Cd{dddd}}}}{CfCh}{CjCl}`{AnAb}`{fAl}{nAl}{bd}{AjAl}{{BdBd}Bd}{{BdBd}l}10{BdCn}021`{ce{}{}}000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000{{fh}{{A`{f}}}}0{{D`h}{{A`{D`}}}}{fDb}{nDb}10`{{AhBd}Ah}````{Ddl}{Abl}{BlBl}{DfDf}{DhDh}{bb}{BjBj}{DjDj}{AhAh}{DlDl}{BhBh}{DnDn}{AbAb}{E`E`}{EbEb}{EdEd}{D`D`}{AnAn}{BdBd}{EfEf}{BnBn}{EhEh}{AjAj}{EjEj}{ElEl}{EnEn}{jj}{F`F`}{BfBf}{FbFb}{FdFd}{FfFf}{FhFh}{FjFj}{FlFl}{B`B`}{CfCf}{FnFn}{G`G`}{GbGb}{GdGd}{GfGf}{GhGh}{GjGj}{GlGl}{GnGn}{DdDd}{{ce}l{}{}}00000000000000000000000000000000000000000000{{DfDf}H`}{{bb}H`}{{BdBd}H`}{{EfEf}H`}{{BnBn}H`}{{EhEh}H`}{{AjAj}H`}{{EjEj}H`}{{FdFd}H`}{{GlGl}H`}{{Ahb}Ah}````{{AhAh}Al}{BdBd}{{HbcHd}{{Cd{HfEd}}}{{Hh{Hf}}}}{{BdBd}Al}`{f{{Bb{Hj}}}}{n{{Bb{Hj}}}}{fEh}{nEh}{{D`hEh{Bb{Hl}}El}{{Bb{{Cd{Eh{Bb{Hl}}}}}}}}{{{A`{D`}}Eh{Bb{Hl}}El}{{Bb{{Cd{Eh{Bb{Hl}}}}}}}}{Cj{{Hn{d}}}}`{hI`}0{{}Df}{{}Dh}{{}Dn}{{}E`}{{}Eb}{{}Ed}{{}Eh}{{}Aj}{{}En}{{}Bf}{{}Cf}{{}Ib}{{}Gj}{{}Gl}{{}Gn}{{}Dd}`{AbAh}{{fEhEh}l}{{nEhEh}l}{fAl}{nAl}{{{A`{c}}}e{}{}}0`{E`C`}{{BdBd}Bd}{{D`hIdbc}l{{If{HlHlCnCnb}}}}{{nhIdbbbc}l{{If{HlHlCnCnb}}}}{{{A`{n}}Idbbbc}l{{If{HlHlCnCnb}}}}{{{A`{D`}}Idbc}l{{If{HlHlCnCnb}}}}{{}Bd}```{AnCf}{{BlBl}Al}{{DfDf}Al}{{DhDh}Al}{{bb}Al}{{BjBj}Al}{{DjDj}Al}{{AhAh}Al}{{DlDl}Al}{{BhBh}Al}{{DnDn}Al}{{AbAb}Al}{{EbEb}Al}{{BdBd}Al}{{EfEf}Al}{{BnBn}Al}{{EhEh}Al}{{AjAj}Al}{{EjEj}Al}{{ElEl}Al}{{EnEn}Al}{{jj}Al}{{FbFb}Al}{{FdFd}Al}{{FlFl}Al}{{B`B`}Al}{{CfCf}Al}{{FnFn}Al}{{GhGh}Al}{{GlGl}Al}{{GnGn}Al}{{Bdc}l{{Ij{}{{Ih{Bd}}}}}}{{AhBl}Ah}``{f{{Bb{Bf}}}}{n{{Bb{Bf}}}}`{{BlIl}{{J`{lIn}}}}{{DfIl}{{J`{lIn}}}}{{DhIl}{{J`{lIn}}}}{{hIl}Jb}{{CjIl}Jb}{{IdIl}Jb}{{bIl}Jb}{{BjIl}Jb}{{DjIl}{{J`{lIn}}}}{{AhIl}Jb}{{DlIl}Jb}{{BhIl}Jb}{{DnIl}{{J`{lIn}}}}{{AbIl}Jb}{{JdIl}Jb}{{E`Il}{{J`{lIn}}}}{{JfIl}Jb}{{JhIl}Jb}{{EbIl}Jb}0{{EdIl}{{J`{lIn}}}}{{D`Il}Jb}{{AnIl}Jb}{{BdIl}Jb}0000{{EfIl}Jb}{{BnIl}Jb}{{EhIl}Jb}{{AjIl}Jb}{{EjIl}Jb}{{ElIl}Jb}{{EnIl}Jb}{{nIl}Jb}{{jIl}Jb}{{DbIl}Jb}{{F`Il}Jb}{{BfIl}Jb}{{FbIl}Jb}{{FdIl}Jb}{{{A`{c}}Il}JbJj}{{FfIl}Jb}{{FhIl}Jb}{{FjIl}Jb}{{FlIl}Jb}0{{B`Il}Jb}0{{CfIl}Jb}{{JlIl}Jb}{{FnIl}Jb}{{IbIl}Jb}{{G`Il}Jb}{{GbIl}Jb}{{GdIl}Jb}{{GfIl}Jb}{{GhIl}Jb}{{GjIl}Jb}{{GlIl}{{J`{lIn}}}}{{GnIl}{{J`{lIn}}}}````````{cc{}}000000000{AhDl}1111111111111111111111{{{Jn{D`}}}Db}2{D`Db}033333333333333333333333{AlAj}0{Cn{{Bb{Bd}}}}{CnBd}00{C`Dn}0{cBd{{Ij{}{{Ih{Bd}}}}}}{Ch{{Bb{Bd}}}}22{bd}{{GjGh}{{Bb{{K`{G`}}}}}}{{hKb}{{Bb{{Jn{Cj}}}}}}{{hAh}{{Jn{{K`{Fd}}}}}}{{hKbCh}{{Bb{Ad}}}}{{IdhEf}{{Bb{Dd}}}}0{{hc}{{K`{Kb}}}{{Kd{}{{Ih{{Cb{d}}}}}}}}{{IdhEf}{{Bb{{Hn{Dj}}}}}}{{AbAd}Ah}```````{{Blc}lKf}{{Dfc}lKf}{{Dhc}lKf}{{bc}lKf}{{Bjc}lKf}{{Ahc}lKf}{{Dlc}lKf}{{Bhc}lKf}{{Bdc}lKf}{{Efc}lKf}{{Bnc}lKf}{{Fnc}lKf}{{Ghc}lKf}{{Glc}lKf}`{{JfEhEh}{{Bb{{Cd{C`C`}}}}}}{{D`C`C`}{{Bb{Eh}}}}`{CjKb}``{{BdBd}l}{{GjGh{K`{G`}}}l}`{{fEhCh{Bb{Ab}}}Eh}{{nEhCh{Bb{Ab}}}Eh}{{fCh{Bb{Ab}}}l}0{{BdBd}Bd}{{BdBd}Al}{ce{}{}}000000000000000000000000000000000000000000000000000000000{Bdc{}}1{h{{Cd{HjI`}}}}{AnHj}{E`{{Bb{E`}}}}{BdAl}0{{hKb}Al}`{Bd{{Kh{Bd}}}}{Bd{{Kj{Bd}}}}{{AnhC`C`Fl{Bb{C`}}}{{Hn{Fj}}}}{{GfC`C`Fl{Bb{B`}}{Bb{C`}}}{{K`{Fj}}}}``{{D`hEh}{{Bb{Ej}}}}{{AnIbhC`C`Fl{Bb{C`}}}{{Hn{Fj}}}}{An{{Bb{{K`{Fj}}}}}}{D`Jh}{{GfIbC`C`Fl{Bb{B`}}{K`{Fj}}{Bb{C`}}}l}````````{{D`hAd}{{Bb{{Hn{Fj}}}}}}{{{A`{D`}}Ad}{{Bb{{Hn{Fj}}}}}}{{D`hAd}{{Bb{Gf}}}}{{{A`{D`}}Ad}{{Bb{Gf}}}}````{hCh}{{AhKl}Al}``{{AhAd}Ah}{An{{Bb{Ad}}}}````{D`Eb}{Cj{{Bb{C`}}}}{D`{{Bb{C`}}}}{{}h}{{I`Kb}{{Bb{Cj}}}}{{}Id}{BlBj}{{}Ah}{AhBh}{AhAb}{ChJd}{{C`C`C`C`C`C`}E`}{D`Jh}{{C`C`}Eb}{{hEb}D`}{{cCfAbFn}An{{Hh{Hj}}}}{{KbKnC`{Cd{C`C`}}Bd}{{Cd{EfHlHl}}}}{C`{{Cd{HlBn}}}}{{AdAd}Eh}{{AdAdAd}Ej}{{AdHlC`}En}{cn{{Hh{Db}}}}{ChJl}{{hChAb{Af{Ad}}L`AlFn}Gb}{{hChAb{Af{Ad}}AlL`Fn}Gd}{{hChAbFn}Gf}{{}Dd}{EbD`}{{IbhChAb{Af{Ad}}L`AlFn}Gb}{{IbhChAb{Af{Ad}}AlL`Fn}Gd}{{IbhChAbFn}Gf}{{AdAdAj}Eh}{ch{{Ij{}{{Ih{Lb}}}}}}{{HjI`}h}{Jd{{Bb{c}}}{}}{Jh{{Bb{c}}}{}}{Jl{{Bb{c}}}{}}{BdBd}`{{DfDf}{{Bb{H`}}}}{{bb}{{Bb{H`}}}}{{BdBd}{{Bb{H`}}}}{{EfEf}{{Bb{H`}}}}{{BnBn}{{Bb{H`}}}}{{EhEh}{{Bb{H`}}}}{{AjAj}{{Bb{H`}}}}{{EjEj}{{Bb{H`}}}}{{EnEn}{{Bb{H`}}}}{{FdFd}{{Bb{H`}}}}{{GlGl}{{Bb{H`}}}}{{Ff{Cd{C`C`}}C`}Fh}`{{E`Dn}E`}{{E`C`C`}E`}0{bd}{fAl}0{D`Al}{{BdBd}l}{Anl}00{F`l}{Bfl}{{ddd}b}{{dddd}b}{DnE`}{{cDn}E`{{Hh{Hf}}}}```{CjLd}{{C`C`}E`}{{EbC`}Eb}{Cj{{Hn{{Cb{d}}}}}}{D`En}{fFb}{nFb}{f{{Bb{{Cd{EhEh}}}}}}0{{BdBdAl}l}{{An{Bb{B`}}}Al}{{AnAb}Al}{{fAl}l}{{nAl}l}{{fEh}l}{{nEh}l}{{AnCf}Al}{{AnAd}l}{{D`hEb}l}{{{A`{D`}}Eb}l}{{D`hEbC`C`}l}{{{A`{D`}}EbC`C`}l}{{D`h{Bb{C`}}}l}::{{D`Al}l}{{D`hcAhFn}l{{Ij{}{{Ih{{Cd{ChAh}}}}}}}}{{{A`{D`}}cAhFn}l{{Ij{}{{Ih{{Cd{ChAh}}}}}}}}{{D`En}l}{{fFb}l}{{nFb}l}{{D`hC`C`}l}{{{A`{D`}}C`C`}l}{{fKn}l}{{nKn}l}{{D`hChAhFn}l}{{AncCfAb}Al{{Lf{Ch}}}}{{{A`{D`}}ChAhFn}l}{{D`hFl}l}{{{A`{D`}}Fl}l}{{Anh}Gf}{{fhAl}l}{{nhAl}l}{{{A`{c}}Al}lf}{{AnIbh}Gf}{An{{Bb{Gf}}}}{{D`hEhAl}l}{{{A`{D`}}EhAl}l}{{D`hAl}l}{{{A`{D`}}Al}l}{D`{{Cd{C`C`}}}}{Jh{{Cd{Ad{Bb{Ad}}}}}}{{DnDn}E`}`{Ab{{K`{{Cd{{Af{Ad}}Bh}}}}}}`{{AbAd}Ab}{{AnAd}An}```{fl}{nl}{{AhGl}Ah}``{{AhDh}Ah}``{{BdBd}Bd}{{BdBd}l}1{fKn}{nKn}{AnCh}```{{E`E`}E`}{{E`Dn}E`}{{E`C`C`}E`}0{DnC`}{GlKn}{ce{}{}}000000000000000000000000000000000000000000002{cHj{}}00:`{{DjE`}Dj}{{E`Hf}Hf}0{{C`C`}E`}{{GjLh}l}{c{{J`{e}}}{}{}}000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000{cLj{}}0000000000000000000000000000000000000000000000000000000{Cj{{Hn{Cn}}}}{{BdBd}Bd}{DjLl}{D`Hl}``{{AhDf}Ah}```{{fe}c{}{{M`{D`}{{Ln{c}}}}}}000{{{A`{c}}g}ef{}{{M`{{A`{D`}}}{{Ln{e}}}}}}{{IdhEfbc}l{{If{HlHlb}}}}`{D`Fl}`````````````````````````````","c":[],"p":[[5,"Color",0],[1,"u8"],[10,"Edit",0],[5,"FontSystem",0],[6,"Action",0],[1,"unit"],[5,"Editor",0],[5,"BorrowedWithFontSystem",0],[5,"AttrsList",0],[1,"usize"],[5,"Range",1240],[5,"Attrs",0],[6,"Affinity",0],[1,"bool"],[5,"BufferLine",0],[6,"Align",0],[6,"Option",1241],[5,"CacheKeyFlags",0],[5,"Change",0],[5,"AttrsOwned",0],[6,"FamilyOwned",0],[6,"Family",0],[6,"SubpixelBin",0],[1,"f32"],[1,"array"],[1,"tuple"],[6,"LineEnding",0],[1,"str"],[5,"Font",0],[5,"FontRef",1242],[1,"u32"],[5,"Buffer",0],[6,"BufferRef",0],[5,"SwashImage",0],[5,"Weight",0],[6,"Style",0],[6,"Command",0],[5,"FontMatchAttrs",0],[5,"Angle",0],[5,"Transform",0],[5,"Metrics",0],[5,"Placement",0],[5,"CacheKey",0],[5,"Cursor",0],[5,"LayoutCursor",0],[6,"Motion",0],[5,"Scroll",0],[5,"ChangeItem",0],[6,"Selection",0],[5,"FontMatchKey",0],[5,"LayoutGlyph",0],[5,"PhysicalGlyph",0],[5,"LayoutLine",0],[6,"Wrap",0],[6,"Shaping",0],[5,"ShapeGlyph",0],[5,"ShapeWord",0],[5,"ShapeSpan",0],[5,"ShapeLine",0],[5,"ShapeRunKey",0],[5,"ShapeRunCache",0],[6,"Stretch",0],[6,"SwashContent",0],[6,"Ordering",1243],[6,"Origin",1244],[5,"Bounds",1244],[5,"Vector",1244],[10,"Into",1245],[5,"String",1246],[1,"i32"],[1,"slice"],[5,"Database",1247],[5,"ShapeBuffer",0],[5,"SwashCache",0],[10,"FnMut",1248],[17,"Item"],[10,"IntoIterator",1249],[5,"Formatter",1250],[5,"Error",1250],[6,"Result",1251],[8,"Result",1250],[5,"BidiParagraphs",0],[5,"LayoutRun",0],[5,"LayoutRunIter",0],[10,"Debug",1250],[5,"LineIter",0],[5,"Arc",1252],[5,"Vec",1253],[5,"ID",1247],[10,"Iterator",1254],[10,"Hasher",1255],[5,"Iter",1256],[5,"IterNames",1256],[5,"FaceInfo",1247],[1,"u16"],[5,"Level",1257],[6,"Source",1247],[5,"Face",1258],[10,"AsRef",1245],[1,"u64"],[5,"TypeId",1259],[6,"Verb",1260],[17,"Output"],[10,"FnOnce",1248],[15,"Scroll",1231],[15,"Click",1231],[15,"DoubleClick",1231],[15,"TripleClick",1231],[15,"Drag",1231]],"b":[[195,"impl-Flags-for-CacheKeyFlags"],[196,"impl-CacheKeyFlags"],[476,"impl-BorrowedWithFontSystem%3C\'font_system,+Editor%3C\'buffer%3E%3E"],[477,"impl-BorrowedWithFontSystem%3C\'a,+Buffer%3E"],[538,"impl-Debug-for-Metrics"],[539,"impl-Display-for-Metrics"],[543,"impl-LowerHex-for-CacheKeyFlags"],[544,"impl-Binary-for-CacheKeyFlags"],[545,"impl-Octal-for-CacheKeyFlags"],[546,"impl-UpperHex-for-CacheKeyFlags"],[547,"impl-Debug-for-CacheKeyFlags"],[566,"impl-Debug-for-Wrap"],[567,"impl-Display-for-Wrap"],[568,"impl-Display-for-Align"],[569,"impl-Debug-for-Align"],[623,"impl-From%3CArc%3CBuffer%3E%3E-for-BufferRef%3C\'buffer%3E"],[625,"impl-From%3C%26mut+Buffer%3E-for-BufferRef%3C\'buffer%3E"],[626,"impl-From%3CBuffer%3E-for-BufferRef%3C\'buffer%3E"],[653,"impl-Flags-for-CacheKeyFlags"],[654,"impl-CacheKeyFlags"]]}],\ +["cosmic_text",{"doc":"COSMIC Text","t":"GPGPGFPFFFTTPPPFPFFPFGPFFPFFPPFPGPPPPPFPPPPPTTKFPPPPPPPTGGPPFFFFPPPTPPPPTFPFFFFPPPPPPGFPTPFPPGPPTPPPPPPPPPPPPPPPPPFFPPPPPPTPPFPGPPPPFFFFFFFGPGGGPFGFTPFPPPPPPPFPPPGTPNMNNNONNNNMNNNNNNNNONOMNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNMNNONOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNOMNMNNNNONNNNNNNNNNNNNNNNNNONMNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOMNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOONNNNNNNNNNNNNNONNONOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNOONNNNNOOOOOOOONNNNOOOONNOONNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNONNNNNNNNNNNNNNNNNOOENNNNNMNNNNNNMNMNNNNNNNNNNNNNNMNNNMNNNNNNNMNNNNNNNNNNNONONNOOOMNNOONOONNNMNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONOOONNNNNNONOOOOOOOOOOOOOOOOOOOOOOOOOOOOO","n":["Action","Advanced","Affinity","After","Align","Angle","Arc","Attrs","AttrsList","AttrsOwned","BLACK","BOLD","Backspace","Basic","Before","BidiParagraphs","Borrowed","BorrowedWithFontSystem","Buffer","BufferEnd","BufferLine","BufferRef","BufferStart","CacheKey","CacheKeyFlags","Center","Change","ChangeItem","Click","Close","Color","Color","Command","Condensed","Cr","CrLf","Cursive","Cursive","Cursor","CurveTo","Delete","DoubleClick","Down","Drag","EXTRA_BOLD","EXTRA_LIGHT","Edit","Editor","End","End","Enter","Escape","Expanded","ExtraCondensed","ExtraExpanded","FAKE_ITALIC","Family","FamilyOwned","Fantasy","Fantasy","Font","FontMatchAttrs","FontMatchKey","FontSystem","Glyph","GotoLine","Home","IDENTITY","Indent","Insert","Italic","Justified","LIGHT","LayoutCursor","LayoutCursor","LayoutGlyph","LayoutLine","LayoutRun","LayoutRunIter","Left","Left","LeftWord","Lf","LfCr","Line","LineEnding","LineIter","LineTo","MEDIUM","Mask","Metrics","Monospace","Monospace","Motion","Motion","MoveTo","NORMAL","Name","Name","Next","NextWord","None","None","None","Normal","Normal","Normal","Oblique","One","Owned","PageDown","PageUp","ParagraphEnd","ParagraphStart","PhysicalGlyph","Placement","Previous","PreviousWord","QuadTo","Right","Right","RightWord","SEMIBOLD","SansSerif","SansSerif","Scroll","Scroll","Selection","SemiCondensed","SemiExpanded","Serif","Serif","ShapeBuffer","ShapeGlyph","ShapeLine","ShapeRunCache","ShapeRunKey","ShapeSpan","ShapeWord","Shaping","SoftHome","Stretch","Style","SubpixelBin","SubpixelMask","SwashCache","SwashContent","SwashImage","THIN","Three","Transform","TripleClick","Two","UltraCondensed","UltraExpanded","Unindent","Up","Vertical","Weight","Word","Word","WordOrGlyph","Wrap","ZERO","Zero","a","action","action","action","add_span","affinity","after","align","all","append","apply_change","apply_change","as_attrs","as_family","as_float","as_rgba","as_rgba_tuple","as_str","as_swash","ascent","attrs_list","attrs_spans","auto_indent","auto_indent","b","before","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","blank","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_with","borrow_with","borrow_with","buffer_ref","buffer_ref","buffer_ref_mut","buffer_ref_mut","cache_fonts","cache_key","cache_key_flags","cache_key_flags","cache_key_flags","cache_key_flags","cache_key_flags","clear","clear_spans","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","color","color_opt","color_opt","color_opt","color_opt","compatible","complement","compute","contains","content","copy_selection","copy_selection","cursor","cursor","cursor_motion","cursor_motion","data","data","db","db_mut","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default_attrs","defaults","delete_range","delete_range","delete_selection","delete_selection","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","descent","determinant","difference","draw","draw","draw","draw","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","empty","end","end","end","ending","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","extend","family","family","family_owned","finish_change","finish_change","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","font_id","font_id","font_id","font_monospace_em_width","font_size","font_size","font_size_bits","fontdb","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_after","from_before","from_bits","from_bits_retain","from_bits_retain","from_bits_truncate","from_degrees","from_gradians","from_iter","from_name","from_radians","from_turns","g","get","get_font","get_font_matches","get_font_supported_codepoints_in_word","get_image","get_image_uncached","get_monospace_ids_for_scripts","get_outline_commands","get_span","glyph","glyph_id","glyph_id","glyph_id","glyphs","glyphs","glyphs","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","height","highlight","hit","horizontal","id","image_cache","index","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","insert","insert","insert","insert_at","insert_at","insert_string","insert_string","intersection","intersects","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_locale_and_db","into_text","invert","is_all","is_empty","is_monospace","items","iter","iter_names","layout","layout","layout","layout","layout_cursor","layout_in_buffer","layout_opt","layout_runs","layout_to_buffer","left","level","level","line","line","line","line_height","line_i","line_layout","line_layout","line_shape","line_shape","line_top","line_w","line_y","lines","locale","matches","max_ascent","max_descent","metadata","metadata","metadata","metadata","metadata","metadata","metrics","monospace_em_width","monospace_width","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new_empty","new_in_buffer","new_in_buffer","new_in_buffer","new_with_affinity","new_with_fonts","new_with_locale_and_db","next","next","next","not","outline_command_cache","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","physical","placement","pre_rotate","pre_scale","pre_translate","r","redraw","redraw","redraw","remove","reset","reset_layout","reset_shaping","reverse","reverse","rgb","rgba","rotation","rotation_about","rtl","rtl","rustybuzz","rustybuzz","scale","scale","scripts","scroll","selection","selection","selection_bounds","selection_bounds","set","set_align","set_attrs_list","set_auto_indent","set_auto_indent","set_cursor","set_cursor","set_ending","set_metadata","set_metrics","set_metrics","set_metrics_and_size","set_metrics_and_size","set_monospace_width","set_redraw","set_redraw","set_redraw","set_rich_text","set_rich_text","set_scroll","set_selection","set_selection","set_size","set_size","set_tab_width","set_tab_width","set_text","set_text","set_text","set_wrap","set_wrap","shape","shape_as_needed","shape_as_needed","shape_as_needed","shape_in_buffer","shape_opt","shape_until_cursor","shape_until_cursor","shape_until_scroll","shape_until_scroll","size","size_hint","skew","source","spans","spans","split_off","split_off","start","start","start","start_change","start_change","stretch","stretch","stretch","style","style","style","sub","sub_assign","symmetric_difference","tab_width","tab_width","text","text","text","text","then","then_rotate","then_scale","then_translate","to_degrees","to_number","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_radians","to_string","to_string","to_string","toggle","top","transform","transform_point","transform_vector","translation","trim","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unicode_codepoints","union","verb","visible_lines","w","w","weight","weight","weight","width","with_buffer","with_buffer","with_buffer_mut","with_buffer_mut","with_buffer_mut","with_pixels","words","wrap","x","x","x","x_advance","x_advance","x_bin","x_offset","x_offset","xx","xy","y","y","y","y_advance","y_advance","y_bin","y_offset","y_offset","yx","yy","lines","x","x","x","x","y","y","y","y"],"q":[[0,"cosmic_text"],[1456,"cosmic_text::Action"],[1465,"core::ops::range"],[1466,"core::option"],[1467,"swash::font"],[1468,"fontdb"],[1469,"alloc::vec"],[1470,"core::cmp"],[1471,"zeno::geometry"],[1472,"zeno::geometry"],[1473,"alloc::string"],[1474,"fontdb"],[1475,"core::iter::traits::collect"],[1476,"core::fmt"],[1477,"core::fmt"],[1478,"core::fmt"],[1479,"core::iter::traits::iterator"],[1480,"core::hash"],[1481,"bitflags::iter"],[1482,"bitflags::iter"],[1483,"fontdb"],[1484,"core::convert"],[1485,"zeno::command"],[1486,"core::ops::function"]],"d":["An action to perform on an Editor","Advanced text shaping and font fallback.","Whether to associate cursors placed at a boundary between …","","Align or justify","Represents an angle in degrees or radians.","","Text attributes","List of text attributes to apply to a line","An owned version of Attrs","Black weight (900), the thickest value.","Bold weight (700).","Delete text behind cursor","Basic shaping with no font fallback.","","An iterator over the paragraphs in the input text. It is …","","A value borrowed together with an FontSystem","A buffer of text that is shaped and laid out","Move cursor to the end of the document","A line (or paragraph) of text that is shaped and laid out","","Move cursor to the start of the document","Key for building a glyph cache","Flags that change rendering","","A set of change items grouped into one logical change","A unique change to an editor","Mouse click at specified position","Closes a subpath, connecting the final point to the …","Text color","32-bit RGBA bitmap.","Path command.","","Use \\\\r for line ending (many legacy systems)","Use \\\\r\\\\n for line ending (Windows-style)","Glyphs in cursive fonts generally use a more informal …","","Current cursor location","A cubic bezier curve from the previous point to the final …","Delete text in front of cursor","Mouse double click at specified position","Move cursor down","Mouse drag to specified position","Extra-bold weight (800).","Extra light weight (200).","A trait to allow easy replacements of Editor, like …","A wrapper of [Buffer] for easy editing","Move cursor to end of line","","Create new line","Escape, clears selection","","","","Skew by 14 degrees to synthesize italic","A font family.","An owned version of Family","Fantasy fonts are primarily decorative or expressive fonts …","","A font","Font-specific part of Attrs to be used for matching","","Access to the system fonts.","Wraps at a glyph level","Move cursor to specific line","Move cursor to start of line","Identity matrix.","","Insert character at cursor","A form that is generally cursive in nature.","","Light weight (300).","The position of a cursor within a [Buffer].","Apply specific LayoutCursor","A laid out glyph","A line of laid out glyphs","A line of visible text for rendering","An iterator of visible text lines, see LayoutRun","Move cursor left","","Move cursor to next word boundary to the left","Use \\\\n for line ending (POSIX-style)","Use \\\\n\\\\r for line ending (some legacy systems)","Select by lines","Line ending","Iterator over lines terminated by LineEnding","A straight line from the previous point to the specified …","Medium weight (500, higher than normal).","8-bit alpha mask.","Metrics of text","The sole criterion of a monospace font is that all glyphs …","","A motion to perform on a Cursor","Move the cursor with some motion","Begins a new subpath at the specified point.","Normal (400).","The name of a font family of choice.","","Move cursor to next character (Self::Right in LTR, …","Move cursor to next word boundary","No selection","No wrapping","No line ending","A face that is neither italic not obliqued.","Normal selection","","A typically-sloped version of the regular face.","","","Move cursor down one page","Move cursor up one page","Move cursor to end of paragraph","Move cursor to start of paragraph","","Describes the offset and dimensions of a rendered mask.","Move cursor to previous character (Self::Left in LTR, …","Move cursor to previous word boundary","A quadratic curve from the previous point to the final …","Move cursor right","","Move cursor to next word boundary to the right","Semibold weight (600).","Glyphs in sans-serif fonts, as the term is used in CSS, …","","Scroll position in [Buffer]","Scroll specified number of lines","Selection mode","","","Serif fonts represent the formal text style for a script.","","A set of buffers containing allocations for shaped text.","A shaped glyph","A shaped line (or paragraph)","A helper structure for caching shape runs.","Key for caching shape runs.","A shaped span (for bidirectional processing)","A shaped word (for word wrapping)","The shaping strategy of some text.","Move cursor to start of line, skipping whitespace","A face width.","Allows italic or oblique faces to be selected.","Binning of subpixel position for cache optimization","32-bit RGBA subpixel mask.","Cache for rasterizing with the swash scaler","Content of a scaled glyph image.","Scaled glyph image.","Thin weight (100), the thinnest value.","","Two dimensional transformation matrix.","Mouse triple click at specified position","","","","","Move cursor up","Move cursor up or down by a number of pixels","Specifies the weight of glyphs in the font, their degree …","Select by words","Wraps at the word level","Wraps at the word level, or fallback to glyph level if a …","Wrapping mode","Angle of zero degrees.","","Get the alpha component","Perform an Action on the editor","","Perform an Action on the editor","Add an attribute span, removes any previous matching parts …","Whether to associate the cursor with the run before it or …","","Get the Text alignment","Get a flags value with all known bits set.","Append line at end of this line","Apply a change","","","","","Get an array over all of the components, in [r, g, b, a] …","Get a tuple over all of the attributes, in (r, g, b, a) …","Get the line ending as a str","","","Get attributes list","","Get the current automatic indentation setting","","Get the blue component","","The bitwise and (&) of the bits in two flags values.","The bitwise and (&) of the bits in two flags values.","The bitwise or (|) of the bits in two flags values.","The bitwise or (|) of the bits in two flags values.","","Get the underlying bits value.","The bitwise exclusive-or (^) of the bits in two flags …","The bitwise exclusive-or (^) of the bits in two flags …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Mutably borrows self together with an FontSystem for more …","Mutably borrows self together with an FontSystem for more …","Mutably borrows the buffer together with an FontSystem for …","Get the internal BufferRef","","Get the internal BufferRef","","Concurrently cache fonts by id list","Cache key, see CacheKey","Set CacheKeyFlags","","","CacheKeyFlags","","Resets the image to a default state.","Clear the current attribute spans","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Set Color","","","Optional color override","","Check if this set of attributes can be shaped with another","The bitwise negation (!) of the bits in a flags value, …","Given an origin, offset and bounding box, computes the …","Whether all set bits in a source flags value are also set …","Content of the image.","Copy selection","","Get the current cursor","","Apply a Motion to a Cursor","Apply a Motion to a Cursor","","Raw image data.","Get the database.","Get a mutable reference to the database.","","","","","","","","","","","","","","","","","","Get the default Attrs","Delete text starting at start Cursor and ending at end …","","Delete selection, adjusting cursor and returning true if …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the determinant of the transform.","The intersection of a source flags value with the …","Draw the buffer","Draw the editor","","Draw the buffer","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Get a flags value with all bits unset.","Cursor indicating end of change","End index of cluster in original line","","Get line ending","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bitwise or (|) of the bits in each flags value.","Set Family","","","Get completed change","","CacheKeyFlags","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Font ID","Font id of the glyph","","","Font size in pixels","Font size of the glyph","f32 bits of font size","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Convert from a bits value.","","Convert from a bits value exactly.","Convert from a bits value, unsetting any unknown bits.","Creates a new angle from degrees.","Creates a new angle from gradians.","The bitwise or (|) of the bits in each flags value.","Get a flags value with the bits of a flag with the given …","Creates a new angle from radians.","Creates a new angle from turns.","Get the green component","Get cache item, updating age if found","Get a font by its ID.","","","Create a swash Image from a cache key, caching results","Create a swash Image from a cache key, without caching …","","","Get the attribute span for an index","Index of [LayoutGlyph] in [LayoutLine::glyphs]","Glyph ID","Font id of the glyph","","The array of layout glyphs to draw","Glyphs in line","","","","","","","","","","","","","","","","Height in pixels.","Return the pixel span Some((x_left, x_width)) of the …","Convert x, y position to Cursor (hit detection)","The horizontal position of scroll in fractional pixels","","","First-byte-index of glyph at cursor (will insert behind …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bitwise or (|) of the bits in two flags values.","Insert cache item with current age","Insert if true, delete if false","Insert text at specified cursor with specified attrs_list","","Insert a string at the current cursor or replacing the …","Insert a string at the current cursor or replacing the …","The bitwise and (&) of the bits in two flags values.","Whether any set bits in a source flags value are also set …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","Consume this FontSystem and return the locale and database.","Consume this line, returning only its text contents as a …","Returns the inverse of the transform, if any.","Whether all known bits in this flags value are set.","Whether all bits in this flags value are unset.","","Change items grouped into one change","Yield a set of contained flags values.","Yield a set of contained named flags values.","Layout line, will cache results","","Index of [LayoutLine] in [BufferLine::layout]","Index of [LayoutLine] in [BufferLine::layout]. This will …","Convert a Cursor to a LayoutCursor","Layout a line using a pre-existing shape buffer, will …","Get line layout cache","Get the visible layout runs for rendering and other tasks","","Horizontal offset with respect to the origin specified …","Unicode BiDi embedding level, character is left-to-right …","","Index of [BufferLine] in [Buffer::lines]","Index of [BufferLine] in [Buffer::lines]","Index of [BufferLine] in [Buffer::lines]. This will be …","Line height in pixels","The index of the original text line","Lay out the provided line index and return the result","Lay out the provided line index and return the result","Shape the provided line index and return the result","Shape the provided line index and return the result","Y offset to top of line","Width of line","Y offset to baseline of line","BufferLines (or paragraphs) of text in the buffer","Get the locale.","Check if font matches","Maximum ascent of the glyphs in line","Maximum descent of the glyphs in line","Set metadata","Get line metadata. This will be None if …","","","Metadata from Attrs","","Get the current Metrics","","Get the current monospace_width","Create a new FontSystem, that allows access to any …","","Create a new swash cache","","Create a new set of attributes with sane defaults","","Create a new attributes list with a set of default Attrs","Creates a new transform.","Create an iterator to split the input text into paragraphs …","","","Create a new Buffer with the provided FontSystem and …","Create a new line with the given text and attributes list …","","","Create a new cursor","Create a new LayoutCursor","Create a new scroll","Create a new Editor with the provided [Buffer]","Create an iterator of lines in a string slice","","","Panics","Creates a new empty scaled image.","Create an empty Buffer with the provided Metrics. This is …","Shape a word into a set of glyphs, using a scratch buffer.","Shape a span into a set of words, using a scratch buffer.","Shape a line into a set of spans, using a scratch buffer. …","Create a new cursor, specifying the affinity","Create a new FontSystem with a pre-specified set of fonts.","Create a new FontSystem with a pre-specified locale and …","","","","The bitwise negation (!) of the bits in a flags value, …","","","","","","","","","","","","","","Offset and size of the image.","Returns a new transform that represents a rotation …","Returns a new transform that represents a scale followed …","Returns a new transform that represents a translation …","Get the red component","Get the Buffer redraw flag","Get the Buffer redraw flag","True if a redraw is needed","The intersection of a source flags value with the …","Reset shaping, layout, and metadata caches","Reset only layout cache","Reset shaping and layout caches","","","Create new color with red, green, and blue components","Create new color with red, green, blue, and alpha …","Creates a rotation transform.","Creates a rotation transform around a point.","True if the original paragraph direction is RTL","","","","Creates a scale transform.","","","Get the current scroll location","Get the current selection position","","Get the bounds of the current selection","Get the bounds of the current selection","Call insert when value is true or remove when value is …","Set the text alignment","Set attributes list","Enable or disable automatic indentation","","Set the current cursor","","Set line ending","Set line metadata. This is stored until the next line reset","Set the current Metrics","Set the current Metrics","Set the current Metrics and buffer dimensions at the same …","Set the current Metrics and buffer dimensions at the same …","Set monospace width monospace glyphs should be resized to …","Set the Buffer redraw flag","Set the Buffer redraw flag","Set redraw needed flag","Set text of buffer, using an iterator of styled spans …","Set text of buffer, using an iterator of styled spans …","Set the current scroll location","Set the current selection position","","Set the current buffer dimensions","Set the current buffer dimensions","Set the current tab width. A tab_width of 0 is not …","","Set text of buffer, using provided attributes for each …","Set text and attributes list","Set text of buffer, using provided attributes for each …","Set the current Wrap","Set the current Wrap","Shape line, will cache results","Shape lines until scroll, after adjusting scroll if the …","","Shape lines until scroll, after adjusting scroll if the …","Shape a line using a pre-existing shape buffer, will cache …","Get line shaping cache","Shape lines until cursor, also scrolling to include cursor …","Shape lines until cursor, also scrolling to include cursor …","Shape lines until scroll","Shape lines until scroll","Get the current buffer dimensions (width, height)","","Creates a skew transform.","Source of the image.","Get the current attribute spans","","Split attributes list at an offset","Split off new line at index","Cursor indicating start of change","Start index of cluster in original line","","Start collecting change","","Set Stretch","","","Set Style","","","The intersection of a source flags value with the …","The intersection of a source flags value with the …","The bitwise exclusive-or (^) of the bits in two flags …","Get the current tab width","","Get current text","The original text line","Text to be inserted or deleted","","Returns a new transform that represents the application of …","Returns a new transform that represents this transform …","Returns a new transform that represents this transform …","Returns a new transform that represents this transform …","Returns the angle in degrees.","Returns a numeric representation of a width.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the angle in radians.","","","","The bitwise exclusive-or (^) of the bits in two flags …","Vertical offset with respect to the origin specified when …","Returns the result of a transformation matrix applied to …","Returns the result of applying this transform to a point.","Returns the result of applying this transform to a vector.","Creates a translation transform.","Remove anything in the cache with an age older than …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bitwise or (|) of the bits in two flags values.","Returns the associated verb for the command.","Get the number of lines that can be viewed in the buffer","Width of hitbox","Width of the line","Set Weight","","","Width in pixels.","Get the internal Buffer","Get the internal Buffer","Get the internal Buffer, mutably","Get the internal Buffer, mutably","Get the internal Buffer, mutably","Enumerate pixels in an Image, use with_image for better …","","Get the current Wrap","","X offset of hitbox","Integer component of X offset in line","","","Binning of fractional X offset","X offset in line","","","","","Y offset of hitbox","Integer component of Y offset in line","","","Binning of fractional Y offset","Y offset in line","","","","","","","","","","","",""],"i":[0,57,0,13,0,0,33,0,0,0,37,37,5,57,13,0,33,0,0,48,0,0,48,0,0,16,0,0,5,39,0,65,0,64,27,27,22,21,0,39,5,5,48,5,37,37,0,0,48,16,5,5,64,64,64,18,0,0,22,21,0,0,0,0,56,48,48,42,5,5,38,16,37,0,48,0,0,0,0,48,16,48,27,27,51,0,0,39,37,65,0,22,21,0,5,39,37,22,21,48,48,51,56,27,38,51,64,38,23,33,48,48,48,48,0,0,48,48,39,48,16,48,37,22,21,0,5,0,64,64,22,21,0,0,0,0,0,0,0,0,48,0,0,0,65,0,0,0,37,23,0,5,23,64,64,5,48,48,0,51,56,56,0,41,23,1,3,7,8,9,46,13,15,18,15,3,7,20,21,23,1,1,27,29,58,15,62,3,7,1,13,18,18,18,18,18,18,18,18,59,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,3,3,32,3,7,3,7,4,54,12,12,20,53,58,36,9,22,37,38,1,21,39,12,40,20,41,9,42,43,44,32,15,18,45,23,46,13,47,48,49,5,50,19,51,52,53,54,55,56,16,27,57,58,59,60,61,62,63,64,65,36,22,37,38,1,21,39,12,40,20,41,9,42,43,44,32,15,18,45,23,46,13,47,48,49,5,50,19,51,52,53,54,55,56,16,27,57,58,59,60,61,62,63,64,65,36,37,1,18,45,23,46,13,47,52,64,12,12,20,53,58,12,18,43,18,36,3,7,3,7,32,8,29,36,4,4,37,38,41,42,43,44,46,13,49,19,27,75,63,64,65,36,62,9,3,7,3,7,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,58,42,18,32,7,8,8,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,18,50,53,58,15,22,37,38,1,21,39,12,40,20,41,9,44,18,45,23,46,13,47,48,49,5,51,52,56,16,27,57,62,64,65,18,12,12,20,3,7,45,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,44,32,15,18,18,18,18,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,56,16,16,27,88,57,75,58,59,60,61,62,63,64,65,45,53,58,58,44,53,45,0,22,37,38,4,29,76,1,21,39,12,40,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,33,33,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,13,13,18,18,18,18,41,41,18,18,41,41,1,63,4,4,4,76,76,4,76,9,47,45,53,58,85,55,59,22,37,38,1,21,12,40,20,18,45,23,57,62,64,43,85,32,49,29,76,46,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,18,63,50,3,7,3,3,18,18,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,84,86,18,88,4,15,42,18,18,4,19,18,18,15,61,47,49,32,15,15,32,61,43,53,60,46,47,49,44,85,32,8,32,8,85,85,85,32,4,12,55,55,12,15,12,20,53,58,32,29,32,4,29,76,21,12,20,9,42,84,86,44,32,15,45,23,46,47,49,7,88,59,60,61,36,32,59,60,61,46,4,4,84,86,88,18,76,37,1,18,45,23,46,13,47,49,52,64,53,36,42,42,42,1,3,3,32,18,15,15,15,50,19,1,1,42,42,85,61,0,29,42,44,29,32,3,7,3,3,18,15,15,3,7,3,7,15,15,32,8,32,8,32,3,3,32,32,8,32,3,7,32,8,3,7,32,15,8,32,8,15,3,7,8,15,15,32,8,32,8,32,86,42,36,9,61,9,15,50,53,58,3,7,12,12,20,12,12,20,18,18,18,3,7,15,85,50,62,42,42,42,42,41,64,22,37,38,1,21,39,12,40,20,41,9,42,43,44,32,15,18,45,23,46,13,47,48,49,5,50,19,51,52,53,54,55,56,16,27,57,58,59,60,61,62,63,64,65,36,41,44,56,16,18,43,39,42,42,42,63,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,22,37,38,4,29,76,1,21,39,12,40,20,41,9,42,84,85,86,43,44,32,15,18,45,23,46,13,47,48,49,7,5,33,50,19,51,52,8,53,54,55,56,16,27,88,57,75,58,59,60,61,62,63,64,65,36,29,18,39,32,53,55,12,12,20,43,3,3,3,3,8,76,60,32,42,53,54,58,59,45,53,58,42,42,42,53,54,58,59,45,53,58,42,42,105,106,107,108,109,106,107,108,109],"f":"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{bd}{{fhj}l}{{nhj}l}{{{A`{c}}j}lf}{{Ab{Af{Ad}}Ah}l}`{AjAl}{An{{Bb{B`}}}}{{}Bd}{{AnAn}l}{{fBf}Al}{{nBf}Al}{BhAh}{BjBl}{BnC`}{b{{Cb{d}}}}{b{{Cd{dddd}}}}{CfCh}{CjCl}`{AnAb}`{fAl}{nAl}{bd}{AjAl}{{BdBd}Bd}{{BdBd}l}10{BdCn}021`{ce{}{}}000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000{{fh}{{A`{f}}}}0{{D`h}{{A`{D`}}}}{fDb}{nDb}10{{h{Df{Dd}}}l}`{{AhBd}Ah}````{Dhl}{Abl}{BlBl}{DjDj}{DlDl}{bb}{BjBj}{DnDn}{AhAh}{E`E`}{BhBh}{EbEb}{AbAb}{EdEd}{EfEf}{EhEh}{D`D`}{AnAn}{BdBd}{EjEj}{BnBn}{ElEl}{AjAj}{EnEn}{F`F`}{FbFb}{jj}{FdFd}{BfBf}{FfFf}{FhFh}{FjFj}{FlFl}{FnFn}{G`G`}{B`B`}{CfCf}{GbGb}{GdGd}{GfGf}{GhGh}{GjGj}{GlGl}{GnGn}{H`H`}{HbHb}{DhDh}{{ce}l{}{}}00000000000000000000000000000000000000000000{{DjDj}Hd}{{bb}Hd}{{BdBd}Hd}{{EjEj}Hd}{{BnBn}Hd}{{ElEl}Hd}{{AjAj}Hd}{{EnEn}Hd}{{FhFh}Hd}{{H`H`}Hd}{{Ahb}Ah}````{{AhAh}Al}{BdBd}{{HfcHh}{{Cd{HjEf}}}{{Hl{Hj}}}}{{BdBd}Al}`{f{{Bb{Hn}}}}{n{{Bb{Hn}}}}{fEl}{nEl}{{D`hEl{Bb{I`}}F`}{{Bb{{Cd{El{Bb{I`}}}}}}}}{{{A`{D`}}El{Bb{I`}}F`}{{Bb{{Cd{El{Bb{I`}}}}}}}}{Cj{{Ib{d}}}}`{hId}0{{}Dj}{{}Dl}{{}Eb}{{}Ed}{{}Ef}{{}Eh}{{}El}{{}Aj}{{}Fb}{{}Bf}{{}Cf}{{}If}{{}Gn}{{}H`}{{}Hb}{{}Dh}`{AbAh}{{fElEl}l}{{nElEl}l}{fAl}{nAl}{Adc{}}000000000000000000000000000000000000{{{A`{c}}}e{}{}}1111111111111111111111111111111111111111111111111111111110111111111111111111`{EdC`}{{BdBd}Bd}{{D`hIhbc}l{{Ij{I`I`CnCnb}}}}{{nhIhbbbc}l{{Ij{I`I`CnCnb}}}}{{{A`{n}}Ihbbbc}l{{Ij{I`I`CnCnb}}}}{{{A`{D`}}Ihbc}l{{Ij{I`I`CnCnb}}}}{Adl}0000000000000000000000000000000000000000000000000000000{{}Bd}```{AnCf}{{BlBl}Al}{{DjDj}Al}{{DlDl}Al}{{bb}Al}{{BjBj}Al}{{DnDn}Al}{{AhAh}Al}{{E`E`}Al}{{BhBh}Al}{{EbEb}Al}{{AbAb}Al}{{EhEh}Al}{{BdBd}Al}{{EjEj}Al}{{BnBn}Al}{{ElEl}Al}{{AjAj}Al}{{EnEn}Al}{{F`F`}Al}{{FbFb}Al}{{jj}Al}{{FfFf}Al}{{FhFh}Al}{{G`G`}Al}{{B`B`}Al}{{CfCf}Al}{{GbGb}Al}{{GlGl}Al}{{H`H`}Al}{{HbHb}Al}{{Bdc}l{{In{}{{Il{Bd}}}}}}{{AhBl}Ah}``{f{{Bb{Bf}}}}{n{{Bb{Bf}}}}`{{BlJ`}{{Jd{lJb}}}}{{DjJ`}{{Jd{lJb}}}}{{DlJ`}{{Jd{lJb}}}}{{hJ`}Jf}{{CjJ`}Jf}{{IhJ`}Jf}{{bJ`}Jf}{{BjJ`}Jf}{{DnJ`}{{Jd{lJb}}}}{{AhJ`}Jf}{{E`J`}Jf}{{BhJ`}Jf}{{EbJ`}{{Jd{lJb}}}}{{AbJ`}Jf}{{EdJ`}{{Jd{lJb}}}}{{JhJ`}Jf}{{JjJ`}Jf}{{JlJ`}Jf}{{EfJ`}{{Jd{lJb}}}}{{EhJ`}Jf}0{{D`J`}Jf}{{AnJ`}Jf}{{BdJ`}Jf}0000{{EjJ`}Jf}{{BnJ`}Jf}{{ElJ`}Jf}{{AjJ`}Jf}{{EnJ`}Jf}{{F`J`}Jf}{{FbJ`}Jf}{{nJ`}Jf}{{jJ`}Jf}{{DbJ`}Jf}{{FdJ`}Jf}{{BfJ`}Jf}{{FfJ`}Jf}{{FhJ`}Jf}{{{A`{c}}J`}JfJn}{{FjJ`}Jf}{{FlJ`}Jf}{{FnJ`}Jf}{{G`J`}Jf}0{{B`J`}Jf}0{{CfJ`}Jf}{{K`J`}Jf}{{GbJ`}Jf}{{IfJ`}Jf}{{GdJ`}Jf}{{GfJ`}Jf}{{GhJ`}Jf}{{GjJ`}Jf}{{GlJ`}Jf}{{GnJ`}Jf}{{H`J`}{{Jd{lJb}}}}{{HbJ`}{{Jd{lJb}}}}````````{cc{}}0000000000{AhE`}1111111111111111111111{{{Kb{D`}}}Db}{D`Db}033333333333333333333333{AlAj}0{Cn{{Bb{Bd}}}}{CnBd}00{C`Eb}0{cBd{{In{}{{Il{Bd}}}}}}{Ch{{Bb{Bd}}}}22{bd}{{GnGl}{{Bb{{Df{Gd}}}}}}{{hDd}{{Bb{{Kb{Cj}}}}}}{{hAh}{{Kb{{Df{Fh}}}}}}{{hDdCh}{{Bb{Ad}}}}{{IhhEj}{{Bb{Dh}}}}0{{hc}{{Df{Dd}}}{{Kd{}{{Il{{Cb{d}}}}}}}}{{IhhEj}{{Bb{{Ib{Dn}}}}}}{{AbAd}Ah}```````{{Blc}lKf}{{Djc}lKf}{{Dlc}lKf}{{bc}lKf}{{Bjc}lKf}{{Ahc}lKf}{{E`c}lKf}{{Bhc}lKf}{{Bdc}lKf}{{Ejc}lKf}{{Bnc}lKf}{{Gbc}lKf}{{Glc}lKf}{{H`c}lKf}`{{JjElEl}{{Bb{{Cd{C`C`}}}}}}{{D`C`C`}{{Bb{El}}}}`{CjDd}``{{}Ad}0000000000000000000000000000000000000000000000000000000{{BdBd}l}{{GnGl{Df{Gd}}}l}`{{fElCh{Bb{Ab}}}El}{{nElCh{Bb{Ab}}}El}{{fCh{Bb{Ab}}}l}0{{BdBd}Bd}{{BdBd}Al}{ce{}{}}000000000000000000000000000000000000000000000000000000000{Bdc{}}1{h{{Cd{HnId}}}}{AnHn}{Ed{{Bb{Ed}}}}{BdAl}0{{hDd}Al}`{Bd{{Kh{Bd}}}}{Bd{{Kj{Bd}}}}{{AnhC`C`G`{Bb{C`}}}{{Ib{Fn}}}}{{GjC`C`G`{Bb{B`}}{Bb{C`}}}{{Df{Fn}}}}``{{D`hEl}{{Bb{En}}}}{{AnIfhC`C`G`{Bb{C`}}}{{Ib{Fn}}}}{An{{Bb{{Df{Fn}}}}}}{D`Jl}{{GjIfC`C`G`{Bb{B`}}{Df{Fn}}{Bb{C`}}}l}````````{{D`hAd}{{Bb{{Ib{Fn}}}}}}{{{A`{D`}}Ad}{{Bb{{Ib{Fn}}}}}}{{D`hAd}{{Bb{Gj}}}}{{{A`{D`}}Ad}{{Bb{Gj}}}}````{hCh}{{AhKl}Al}``{{AhAd}Ah}{An{{Bb{Ad}}}}````{D`Eh}{Cj{{Bb{C`}}}}{D`{{Bb{C`}}}}{{}h}{{IdDd}{{Bb{Cj}}}}{{}Ih}{BlBj}{{}Ah}{AhBh}{AhAb}{{C`C`C`C`C`C`}Ed}{ChJh}{D`Jl}{{C`C`}Eh}{{hEh}D`}{{cCfAbGb}An{{Hl{Hn}}}}{{DdKnC`{Cd{C`C`}}Bd}{{Cd{EjI`I`}}}}{C`{{Cd{I`Bn}}}}{{AdAd}El}{{AdAdAd}En}{{AdI`C`}Fb}{cn{{Hl{Db}}}}{ChK`}{{hChAb{Af{Ad}}L`AlGb}Gf}{{hChAb{Af{Ad}}AlL`Gb}Gh}{{hChAbGb}Gj}{{}Dh}{EhD`}{{IfhChAb{Af{Ad}}L`AlGb}Gf}{{IfhChAb{Af{Ad}}AlL`Gb}Gh}{{IfhChAbGb}Gj}{{AdAdAj}El}{ch{{In{}{{Il{Lb}}}}}}{{HnId}h}{Jh{{Bb{c}}}{}}{Jl{{Bb{c}}}{}}{K`{{Bb{c}}}{}}{BdBd}`{{DjDj}{{Bb{Hd}}}}{{bb}{{Bb{Hd}}}}{{BdBd}{{Bb{Hd}}}}{{EjEj}{{Bb{Hd}}}}{{BnBn}{{Bb{Hd}}}}{{ElEl}{{Bb{Hd}}}}{{AjAj}{{Bb{Hd}}}}{{EnEn}{{Bb{Hd}}}}{{FbFb}{{Bb{Hd}}}}{{FhFh}{{Bb{Hd}}}}{{H`H`}{{Bb{Hd}}}}{{Fj{Cd{C`C`}}C`}Fl}`{{EdEb}Ed}{{EdC`C`}Ed}0{bd}{fAl}0{D`Al}{{BdBd}l}{Anl}00{Fdl}{Bfl}{{ddd}b}{{dddd}b}{EbEd}{{cEb}Ed{{Hl{Hj}}}}```{CjLd}{{C`C`}Ed}{{EhC`}Eh}{Cj{{Ib{{Cb{d}}}}}}{D`Fb}{fFf}{nFf}{f{{Bb{{Cd{ElEl}}}}}}0{{BdBdAl}l}{{An{Bb{B`}}}Al}{{AnAb}Al}{{fAl}l}{{nAl}l}{{fEl}l}{{nEl}l}{{AnCf}Al}{{AnAd}l}{{D`hEh}l}{{{A`{D`}}Eh}l}{{D`hEhC`C`}l}{{{A`{D`}}EhC`C`}l}{{D`h{Bb{C`}}}l}::{{D`Al}l}{{D`hcAhGb}l{{In{}{{Il{{Cd{ChAh}}}}}}}}{{{A`{D`}}cAhGb}l{{In{}{{Il{{Cd{ChAh}}}}}}}}{{D`Fb}l}{{fFf}l}{{nFf}l}{{D`hC`C`}l}{{{A`{D`}}C`C`}l}{{fKn}l}{{nKn}l}{{D`hChAhGb}l}{{AncCfAb}Al{{Lf{Ch}}}}{{{A`{D`}}ChAhGb}l}{{D`hG`}l}{{{A`{D`}}G`}l}{{Anh}Gj}{{fhAl}l}{{nhAl}l}{{{A`{c}}Al}lf}{{AnIfh}Gj}{An{{Bb{Gj}}}}{{D`hElAl}l}{{{A`{D`}}ElAl}l}{{D`hAl}l}{{{A`{D`}}Al}l}{D`{{Cd{C`C`}}}}{Jl{{Cd{Ad{Bb{Ad}}}}}}{{EbEb}Ed}`{Ab{{Df{{Cd{{Af{Ad}}Bh}}}}}}`{{AbAd}Ab}{{AnAd}An}```{fl}{nl}{{AhH`}Ah}``{{AhDl}Ah}``{{BdBd}Bd}{{BdBd}l}1{fKn}{nKn}{AnCh}```{{EdEd}Ed}{{EdEb}Ed}{{EdC`C`}Ed}0{EbC`}{H`Kn}{ce{}{}}000000000000000000000000000000000000000000002{cHn{}}00:`{{DnEd}Dn}{{EdHj}Hj}0{{C`C`}Ed}{{GnLh}l}{c{{Jd{e}}}{}{}}000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000{cLj{}}0000000000000000000000000000000000000000000000000000000{Cj{{Ib{Cn}}}}{{BdBd}Bd}{DnLl}{D`I`}``{{AhDj}Ah}```{{fe}c{}{{M`{D`}{{Ln{c}}}}}}000{{{A`{c}}g}ef{}{{M`{{A`{D`}}}{{Ln{e}}}}}}{{IhhEjbc}l{{Ij{I`I`b}}}}`{D`G`}`````````````````````````````","c":[],"p":[[5,"Color",0],[1,"u8"],[10,"Edit",0],[5,"FontSystem",0],[6,"Action",0],[1,"unit"],[5,"Editor",0],[5,"BorrowedWithFontSystem",0],[5,"AttrsList",0],[1,"usize"],[5,"Range",1465],[5,"Attrs",0],[6,"Affinity",0],[1,"bool"],[5,"BufferLine",0],[6,"Align",0],[6,"Option",1466],[5,"CacheKeyFlags",0],[5,"Change",0],[5,"AttrsOwned",0],[6,"FamilyOwned",0],[6,"Family",0],[6,"SubpixelBin",0],[1,"f32"],[1,"array"],[1,"tuple"],[6,"LineEnding",0],[1,"str"],[5,"Font",0],[5,"FontRef",1467],[1,"u32"],[5,"Buffer",0],[6,"BufferRef",0],[5,"ID",1468],[5,"Vec",1469],[5,"SwashImage",0],[5,"Weight",0],[6,"Style",0],[6,"Command",0],[5,"FontMatchAttrs",0],[5,"Angle",0],[5,"Transform",0],[5,"Placement",0],[5,"Metrics",0],[5,"CacheKey",0],[5,"Cursor",0],[5,"LayoutCursor",0],[6,"Motion",0],[5,"Scroll",0],[5,"ChangeItem",0],[6,"Selection",0],[5,"FontMatchKey",0],[5,"LayoutGlyph",0],[5,"PhysicalGlyph",0],[5,"LayoutLine",0],[6,"Wrap",0],[6,"Shaping",0],[5,"ShapeGlyph",0],[5,"ShapeWord",0],[5,"ShapeSpan",0],[5,"ShapeLine",0],[5,"ShapeRunKey",0],[5,"ShapeRunCache",0],[6,"Stretch",0],[6,"SwashContent",0],[6,"Ordering",1470],[6,"Origin",1471],[5,"Bounds",1471],[5,"Vector",1471],[10,"Into",1472],[5,"String",1473],[1,"i32"],[1,"slice"],[5,"Database",1468],[5,"ShapeBuffer",0],[5,"SwashCache",0],[10,"FnMut",1474],[17,"Item"],[10,"IntoIterator",1475],[5,"Formatter",1476],[5,"Error",1476],[6,"Result",1477],[8,"Result",1476],[5,"BidiParagraphs",0],[5,"LayoutRun",0],[5,"LayoutRunIter",0],[10,"Debug",1476],[5,"LineIter",0],[5,"Arc",1478],[10,"Iterator",1479],[10,"Hasher",1480],[5,"Iter",1481],[5,"IterNames",1481],[5,"FaceInfo",1468],[1,"u16"],[5,"Level",1482],[6,"Source",1468],[5,"Face",1483],[10,"AsRef",1472],[1,"u64"],[5,"TypeId",1484],[6,"Verb",1485],[17,"Output"],[10,"FnOnce",1474],[15,"Scroll",1456],[15,"Click",1456],[15,"DoubleClick",1456],[15,"TripleClick",1456],[15,"Drag",1456]],"b":[[195,"impl-Flags-for-CacheKeyFlags"],[196,"impl-CacheKeyFlags"],[589,"impl-BorrowedWithFontSystem%3C\'font_system,+Editor%3C\'buffer%3E%3E"],[590,"impl-BorrowedWithFontSystem%3C\'a,+Buffer%3E"],[708,"impl-Debug-for-Metrics"],[709,"impl-Display-for-Metrics"],[712,"impl-Binary-for-CacheKeyFlags"],[713,"impl-LowerHex-for-CacheKeyFlags"],[714,"impl-Octal-for-CacheKeyFlags"],[715,"impl-Debug-for-CacheKeyFlags"],[716,"impl-UpperHex-for-CacheKeyFlags"],[735,"impl-Display-for-Wrap"],[736,"impl-Debug-for-Wrap"],[737,"impl-Display-for-Align"],[738,"impl-Debug-for-Align"],[793,"impl-From%3CArc%3CBuffer%3E%3E-for-BufferRef%3C\'buffer%3E"],[794,"impl-From%3C%26mut+Buffer%3E-for-BufferRef%3C\'buffer%3E"],[795,"impl-From%3CBuffer%3E-for-BufferRef%3C\'buffer%3E"],[822,"impl-Flags-for-CacheKeyFlags"],[823,"impl-CacheKeyFlags"]]}],\ +["crossbeam_deque",{"doc":"Concurrent work-stealing deques.","t":"PFPGFPFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["Empty","Injector","Retry","Steal","Stealer","Success","Worker","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","default","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","drop","drop","drop","drop","drop","eq","fmt","fmt","fmt","fmt","from","from","from","from","from_iter","init","init","init","init","into","into","into","into","is_empty","is_empty","is_empty","is_empty","is_retry","is_success","len","len","len","new","new_fifo","new_lifo","or_else","pop","push","push","steal","steal","steal_batch","steal_batch","steal_batch_and_pop","steal_batch_and_pop","steal_batch_with_limit","steal_batch_with_limit","steal_batch_with_limit_and_pop","steal_batch_with_limit_and_pop","stealer","success","to_owned","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id"],"q":[[0,"crossbeam_deque"],[93,"core::clone"],[94,"core::cmp"],[95,"core::fmt"],[96,"core::fmt"],[97,"core::ops::function"],[98,"core::option"],[99,"core::result"],[100,"core::any"]],"d":["The queue was empty at the time of stealing.","An injector queue.","The steal operation needs to be retried.","Possible outcomes of a steal operation.","A stealer handle of a worker queue.","At least one task was successfully stolen.","A worker queue.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Consumes items until a Success is found and returns it.","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if the queue is empty.","Returns true if the queue is empty.","Returns true if the queue is empty.","Returns true if the queue was empty at the time of …","Returns true if the steal operation needs to be retried.","Returns true if at least one task was stolen.","Returns the number of tasks in the deque.","Returns the number of tasks in the deque.","Returns the number of tasks in the queue.","Creates a new injector queue.","Creates a FIFO worker queue.","Creates a LIFO worker queue.","If no task was stolen, attempts another steal operation.","Pops a task from the queue.","Pushes a task into the queue.","Pushes a task into the queue.","Steals a task from the queue.","Steals a task from the queue.","Steals a batch of tasks and pushes them into another …","Steals a batch of tasks and pushes them into a worker.","Steals a batch of tasks, pushes them into another worker, …","Steals a batch of tasks, pushes them into a worker, and …","Steals no more than limit of tasks and pushes them into …","Steals no more than of tasks and pushes them into a worker.","Steals no more than limit of tasks, pushes them into …","Steals no more than limit of tasks, pushes them into a …","Creates a stealer for this queue.","Returns the result of the operation, if successful.","","","","","","","","","","","","","",""],"i":[2,0,2,0,0,2,0,9,1,5,2,9,1,5,2,1,2,1,2,5,9,1,5,2,9,1,5,2,9,1,5,5,2,2,9,1,5,2,9,1,5,2,2,9,1,5,2,9,1,5,2,9,1,5,2,2,2,9,1,5,5,9,9,2,9,9,5,1,5,1,5,1,5,1,5,1,5,9,2,1,2,9,1,5,2,9,1,5,2,9,1,5,2],"f":"```````{ce{}{}}0000000{{{b{c}}}{{b{c}}}{}}{{{d{c}}}{{d{c}}}f}{{ce}h{}{}}0{{}{{j{c}}}{}}{lc{}}0000000{lh}00{{{j{c}}}h{}}1{{{d{c}}{d{c}}}nA`}{{{Ab{c}}Ad}Af{}}{{{b{c}}Ad}Af{}}{{{j{c}}Ad}Af{}}{{{d{c}}Ad}Af{}}{cc{}}000{e{{d{c}}}{}{{Aj{}{{Ah{{d{c}}}}}}}}{{}l}000????{{{Ab{c}}}n{}}{{{b{c}}}n{}}{{{j{c}}}n{}}{{{d{c}}}n{}}00{{{Ab{c}}}l{}}{{{b{c}}}l{}}{{{j{c}}}l{}}{{}{{j{c}}}{}}{{}{{Ab{c}}}{}}0{{{d{c}}e}{{d{c}}}{}{{An{}{{Al{{d{c}}}}}}}}{{{Ab{c}}}{{B`{c}}}{}}{{{Ab{c}}c}h{}}{{{j{c}}c}h{}}{{{b{c}}}{{d{c}}}{}}{{{j{c}}}{{d{c}}}{}}{{{b{c}}{Ab{c}}}{{d{h}}}{}}{{{j{c}}{Ab{c}}}{{d{h}}}{}}{{{b{c}}{Ab{c}}}{{d{c}}}{}}{{{j{c}}{Ab{c}}}{{d{c}}}{}}{{{b{c}}{Ab{c}}l}{{d{h}}}{}}{{{j{c}}{Ab{c}}l}{{d{h}}}{}}{{{b{c}}{Ab{c}}l}{{d{c}}}{}}{{{j{c}}{Ab{c}}l}{{d{c}}}{}}{{{Ab{c}}}{{b{c}}}{}}{{{d{c}}}{{B`{c}}}{}}{ce{}{}}0{c{{Bb{e}}}{}{}}0000000{cBd{}}000","c":[],"p":[[5,"Stealer",0],[6,"Steal",0],[10,"Clone",93],[1,"unit"],[5,"Injector",0],[1,"usize"],[1,"bool"],[10,"PartialEq",94],[5,"Worker",0],[5,"Formatter",95],[8,"Result",95],[17,"Item"],[10,"IntoIterator",96],[17,"Output"],[10,"FnOnce",97],[6,"Option",98],[6,"Result",99],[5,"TypeId",100]],"b":[]}],\ +["crossbeam_epoch",{"doc":"Epoch-based memory reclamation.","t":"TFFIKFFRFFKKFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNHNNNMNNNNNNNNNMNNNNNNNNNMNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNMNNNNNNNNNNNNNNNNNNNNMNNNHNNNNNNOONNNHNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNN","n":["ALIGN","Atomic","Collector","CompareAndSetError","CompareAndSetOrdering","CompareExchangeError","Guard","Init","LocalHandle","Owned","Pointable","Pointer","Shared","as_mut","as_raw","as_ref","as_ref","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","cmp","collector","collector","compare_and_set","compare_and_set_weak","compare_exchange","compare_exchange_weak","current","current","default","default","default","default_collector","defer","defer_destroy","defer_unchecked","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","eq","eq","failure","fetch_and","fetch_or","fetch_update","fetch_xor","flush","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_raw","from_usize","from_usize","from_usize","init","init","init","init","init","init","init","init","init","init","into","into","into","into","into","into","into","into_box","into_owned","into_owned","into_shared","into_usize","into_usize","into_usize","is_null","is_pinned","is_pinned","load","load_consume","new","new","new","new","new","null","null","partial_cmp","pin","pin","register","repin","repin_after","store","success","swap","tag","tag","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into_owned","try_into_owned","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unprotected","with_tag","with_tag"],"q":[[0,"crossbeam_epoch"],[203,"core::marker"],[204,"core::option"],[205,"core::clone"],[206,"core::cmp"],[207,"core::result"],[208,"core::sync::atomic"],[209,"core::ops::function"],[210,"core::marker"],[211,"core::fmt"],[212,"core::any"]],"d":["The alignment of pointer.","An atomic pointer that can be safely shared between …","An epoch-based garbage collector.","The error returned on failed compare-and-set operation.","Memory orderings for compare-and-set operations.","The error returned on failed compare-and-swap operation.","A guard that keeps the current thread pinned.","The type for initializers.","A handle to a garbage collector.","An owned heap-allocated object.","Types that are pointed to by a single word.","A trait for either Owned or Shared pointers.","A pointer to an object protected by the epoch GC.","","Converts the pointer to a raw pointer (without the tag).","","Converts the pointer to a reference.","","","","","","","","","","","","","","","","","Returns a copy of the atomic value.","","","Creates another reference to the same garbage collector.","","","","","","Returns the Collector associated with this handle.","Returns the Collector associated with this guard.","Stores the pointer new (either Shared or Owned) into the …","Stores the pointer new (either Shared or Owned) into the …","Stores the pointer new (either Shared or Owned) into the …","Stores the pointer new (either Shared or Owned) into the …","The value in the atomic pointer at the time of the failed …","The value in the atomic pointer at the time of the failed …","","","","Returns the default global collector.","Stores a function so that it can be executed at some point …","Stores a destructor for an object so that it can be …","Stores a function so that it can be executed at some point …","Dereferences the given pointer.","","","","","","Dereferences the pointer.","","","","Mutably dereferences the given pointer.","","","","","Dereferences the pointer.","","","","","Drops the object pointed to by the given pointer.","","","","","","","","","","","","Checks if both handles point to the same collector.","The ordering of the operation when it fails.","Bitwise “and” with the current tag.","Bitwise “or” with the current tag.","Fetches the pointer, and then applies a function to it …","Bitwise “xor” with the current tag.","Clears up the thread-local cache of deferred functions by …","","","","","","","","","","Returns the argument unchanged.","","Returns a new atomic pointer pointing to owned.","Returns a new atomic pointer pointing to raw.","Returns a new atomic pointer pointing to ptr.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns a new owned pointer pointing to b.","","","Returns a new pointer pointing to raw.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns a new owned pointer pointing to raw.","Returns a new pointer pointing to the tagged pointer data.","Returns a new pointer pointing to the tagged pointer data.","","Initializes a with the given initializer.","","Allocates value on the heap and returns a new atomic …","","","Allocates value on the heap and returns a new owned …","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Converts the owned pointer into a Box.","Takes ownership of the pointee.","Takes ownership of the pointee.","Converts the owned pointer into a Shared.","Returns the machine representation of the pointer.","","","Returns true if the pointer is null.","Returns true if the current thread is pinned.","Returns true if the handle is pinned.","Loads a Shared from the atomic pointer.","Loads a Shared from the atomic pointer using a “consume…","Allocates value on the heap and returns a new atomic …","Allocates value on the heap and returns a new owned …","Creates a new collector.","The new value, which the operation failed to store.","The new value, which the operation failed to store.","Returns a new null atomic pointer.","Returns a new null pointer.","","Pins the current thread.","Pins the handle.","Registers a new handle for the collector.","Unpins and then immediately re-pins the thread.","Temporarily unpins the thread, executes the given function …","Stores a Shared or Owned pointer into the atomic pointer.","The ordering of the operation when it succeeds.","Stores a Shared or Owned pointer into the atomic pointer, …","Returns the tag stored within the pointer.","Returns the tag stored within the pointer.","","","","","","","","","","","","","","","","","","","Takes ownership of the pointee if it is non-null.","Takes ownership of the pointee if it is not null.","","","","","","","","Returns a reference to a dummy guard that allows …","Returns the same pointer, but tagged with tag. tag is …","Returns the same pointer, but tagged with tag. tag is …"],"i":[3,0,0,0,0,0,0,3,0,0,0,0,0,1,4,1,4,18,6,1,1,4,8,11,12,18,6,1,1,4,8,11,12,6,1,4,8,6,1,4,8,4,11,12,6,6,6,6,13,18,6,4,8,0,12,12,12,3,18,6,1,1,4,4,8,11,12,3,18,6,1,1,4,4,8,11,12,3,18,6,1,1,4,8,11,11,12,12,4,8,16,6,6,6,6,12,18,6,6,1,4,4,8,11,12,18,6,6,6,6,6,6,6,1,1,1,1,4,4,8,11,12,1,15,1,4,3,18,6,6,1,1,4,8,11,12,18,6,1,4,8,11,12,1,6,4,1,15,1,4,4,0,11,6,6,6,1,8,13,18,6,4,4,0,11,8,12,12,6,16,6,1,4,6,1,4,8,18,6,1,4,8,11,12,18,6,1,4,8,11,12,6,4,18,6,1,4,8,11,12,0,1,4],"f":"`````````````{{{b{c}}}c{df}}{{{h{c}}}{}{}}1{{{h{c}}}{{j{c}}}{df}}{ce{}{}}030000000300000{{{l{c}}}{{l{c}}}{df}}{{{b{c}}}{{b{c}}}n}{{{h{c}}}{{h{c}}}{df}}{A`A`}{{ce}Ab{}{}}000{{{h{c}}{h{c}}}Ad{df}}{AfA`}{Ah{{j{A`}}}}{{{l{c}}{h{c}}egAh}{{Al{{h{c}}{Aj{ce}}}}}{df}{{An{c}}}B`}0{{{l{c}}{h{c}}eBbBbAh}{{Al{{h{c}}{Bd{ce}}}}}{df}{{An{c}}}}0``{{}{{l{c}}}{df}}{{}{{h{c}}}{df}}{{}A`}0{{Ahe}Ab{}{{Bh{}{{Bf{c}}}}Bj}}{{Ah{h{c}}}Ab{}}{{Ahe}Ab{}{{Bh{}{{Bf{c}}}}}}{Bl{{f{}{{Bn{c}}}}}{}}{Blc{}}0{{{b{c}}}c{df}}11{{{h{c}}}c{df}}2223221202222{BlAb}000{{{b{c}}}Ab{df}}11{AfAb}2{AhAb}3{{{h{c}}{h{c}}}C`{df}}{{A`A`}C`}{B`Bb}{{{l{c}}BlBbAh}{{h{c}}}{df}}0{{{l{c}}BbBbAhe}{{Al{{h{c}}{h{c}}}}}{df}{{Cb{{h{c}}}{{Bf{{j{{h{c}}}}}}}}}}15{{{Bd{ce}}Cd}Cf{}{{An{c}}Ch}}{{{l{c}}Cd}Cf{df}}0{{{b{c}}Cd}Cf{df}}{{{h{c}}Cd}Cf{df}}0{{A`Cd}Cf}{{AfCd}Cf}{{AhCd}Cf}{cc{}}{Cjc{}}{{{b{c}}}{{l{c}}}{df}}{{}{{l{c}}}{}}{{{h{c}}}{{l{c}}}{df}}{c{{l{c}}}{}}{{{Cl{c}}}{{l{c}}}{}}66{{{Cl{c}}}{{b{c}}}{}}6{c{{b{c}}}{}}{{}{{h{c}}}{}}9999{{}{{b{c}}}{}}{BlAn}{Bl{{b{c}}}{df}}{Bl{{h{c}}}{df}}{cBl{}}{{}Bl}{{}{{l{c}}}{df}}11{{}{{b{c}}}{df}}2222{ce{}{}}000000{{{b{c}}}{{Cl{c}}}{}}{{{l{c}}}{{b{c}}}{df}}{{{h{c}}}{{b{c}}}{df}}{{{b{c}}Ah}{{h{c}}}{df}}{AnBl}{{{b{c}}}Bl{df}}{{{h{c}}}Bl{df}}{{{h{c}}}C`{df}}{{}C`}{AfC`}{{{l{c}}BbAh}{{h{c}}}{df}}{{{l{c}}Ah}{{h{c}}}{df}}{c{{l{c}}}{}}{c{{b{c}}}{}}{{}A`}``{{}{{l{c}}}{df}}{{}{{h{c}}}{df}}{{{h{c}}{h{c}}}{{j{Ad}}}{df}}{{}Ah}{AfAh}{A`Af}{AhAb}{{Ahe}c{}{{Bh{}{{Bf{c}}}}}}{{{l{c}}eBb}Ab{df}{{An{c}}}}{B`Bb}{{{l{c}}eBbAh}{{h{c}}}{df}{{An{c}}}}{{{b{c}}}Bl{df}}{{{h{c}}}Bl{df}}{ce{}{}}000{c{{Al{e}}}{}{}}0000000000000{{{l{c}}}{{j{{b{c}}}}}{df}}{{{h{c}}}{{j{{b{c}}}}}{df}}{cCn{}}000000>{{{b{c}}Bl}{{b{c}}}{df}}{{{h{c}}Bl}{{h{c}}}{df}}","c":[3,4,44,45,90,169],"p":[[5,"Owned",0],[10,"Sized",203],[10,"Pointable",0],[5,"Shared",0],[6,"Option",204],[5,"Atomic",0],[10,"Clone",205],[5,"Collector",0],[1,"unit"],[6,"Ordering",206],[5,"LocalHandle",0],[5,"Guard",0],[8,"CompareAndSetError",0],[6,"Result",207],[10,"Pointer",0],[10,"CompareAndSetOrdering",0],[6,"Ordering",208],[5,"CompareExchangeError",0],[17,"Output"],[10,"FnOnce",209],[10,"Send",203],[1,"usize"],[17,"Init"],[1,"bool"],[10,"FnMut",209],[5,"Formatter",210],[8,"Result",210],[10,"Debug",210],[1,"never"],[5,"Box",211],[5,"TypeId",212]],"b":[[97,"impl-Pointer-for-Atomic%3CT%3E"],[98,"impl-Debug-for-Atomic%3CT%3E"],[100,"impl-Pointer-for-Shared%3C\'_,+T%3E"],[101,"impl-Debug-for-Shared%3C\'_,+T%3E"],[107,"impl-From%3COwned%3CT%3E%3E-for-Atomic%3CT%3E"],[108,"impl-From%3C*const+T%3E-for-Atomic%3CT%3E"],[109,"impl-From%3CShared%3C\'g,+T%3E%3E-for-Atomic%3CT%3E"],[110,"impl-From%3CT%3E-for-Atomic%3CT%3E"],[111,"impl-From%3CBox%3CT%3E%3E-for-Atomic%3CT%3E"],[114,"impl-From%3CBox%3CT%3E%3E-for-Owned%3CT%3E"],[116,"impl-From%3CT%3E-for-Owned%3CT%3E"]]}],\ +["crossbeam_utils",{"doc":"Miscellaneous tools for concurrent programming.","t":"FFCNNNNNNNNNNNNNNNNNNNNNNNNNNNNCCNNNNNNNNFKRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNFFFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNN","n":["Backoff","CachePadded","atomic","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","default","default","deref","deref_mut","eq","fmt","fmt","fmt","from","from","from","from","hash","into","into","into_inner","is_completed","new","new","reset","snooze","spin","sync","thread","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","AtomicCell","AtomicConsume","Val","as_ptr","borrow","borrow_mut","compare_and_swap","compare_exchange","default","drop","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_add","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_and","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_max","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_min","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_nand","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_or","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_sub","fetch_update","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fetch_xor","fmt","from","from","from","into","into_inner","is_lock_free","load","load_consume","new","store","swap","take","try_from","try_into","type_id","Parker","ShardedLock","ShardedLockReadGuard","ShardedLockWriteGuard","Unparker","WaitGroup","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","default","default","default","deref","deref","deref_mut","drop","drop","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from_raw","from_raw","get_mut","into","into","into","into","into","into","into_inner","into_raw","into_raw","is_poisoned","new","new","new","park","park_deadline","park_timeout","read","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_read","try_write","type_id","type_id","type_id","type_id","type_id","type_id","unpark","unparker","wait","write","Scope","ScopedJoinHandle","ScopedThreadBuilder","as_pthread_t","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","builder","fmt","fmt","fmt","from","from","from","into","into","into","into_pthread_t","join","name","scope","spawn","spawn","stack_size","thread","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":[[0,"crossbeam_utils"],[41,"crossbeam_utils::atomic"],[168,"crossbeam_utils::sync"],[262,"crossbeam_utils::thread"],[299,"core::clone"],[300,"core::default"],[301,"core::cmp"],[302,"core::fmt"],[303,"core::fmt"],[304,"core::hash"],[305,"core::result"],[306,"core::any"],[307,"core::marker"],[308,"core::cmp"],[309,"core::ops::function"],[310,"core::marker"],[311,"std::time"],[312,"core::time"],[313,"std::sync::poison"],[314,"std::thread"],[315,"core::ops::function"],[316,"std::thread"]],"d":["Performs exponential backoff in spin loops.","Pads and aligns a value to the length of a cache line.","Atomic types.","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","Returns the inner value.","Returns true if exponential backoff has completed and …","Creates a new Backoff.","Pads and aligns a value to the length of a cache line.","Resets the Backoff.","Backs off in a blocking loop.","Backs off in a lock-free loop.","Thread synchronization primitives.","Threads that can borrow variables from the stack.","","","","","","","","","A thread-safe mutable memory location.","Trait which allows reading from primitive atomic types …","Type returned by load_consume.","Returns a raw pointer to the underlying data in this …","","","If the current value equals current, stores new into the …","If the current value equals current, stores new into the …","","","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Increments the current value by val and returns the …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies logical “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Applies bitwise “and” to the current value and returns …","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the maximum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Compares and sets the minimum of the current value and val,","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies logical “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “nand” to the current value and …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies logical “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Applies bitwise “or” to the current value and returns …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Decrements the current value by val and returns the …","Fetches the value, and applies a function to it that …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies bitwise “xor” to the current value and returns …","Applies logical “xor” to the current value and returns …","","","Returns the argument unchanged.","","Calls U::from(self).","Consumes the atomic and returns the contained value.","Returns true if operations on values of this type are …","Loads a value from the atomic cell.","Loads a value from the atomic using a “consume” memory …","Creates a new atomic cell initialized with val.","Stores val into the atomic cell.","Stores val into the atomic cell and returns the previous …","Takes the value of the atomic cell, leaving …","","","","A thread parking primitive.","A sharded reader-writer lock.","A guard used to release the shared read access of a …","A guard used to release the exclusive write access of a …","Unparks a thread parked by the associated Parker.","Enables threads to synchronize the beginning or end of …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Converts a raw pointer into a Parker.","Converts a raw pointer into an Unparker.","Returns a mutable reference to the underlying data.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Consumes this lock, returning the underlying data.","Converts a Parker into a raw pointer.","Converts an Unparker into a raw pointer.","Returns true if the lock is poisoned.","Creates a new Parker.","Creates a new sharded reader-writer lock.","Creates a new wait group and returns the single reference …","Blocks the current thread until the token is made …","Blocks the current thread until the token is made …","Blocks the current thread until the token is made …","Locks with shared read access, blocking the current thread …","","","","","","","","","","","","","","","","","Attempts to acquire this lock with shared read access.","Attempts to acquire this lock with exclusive write access.","","","","","","","Atomically makes the token available if it is not already.","Returns a reference to an associated Unparker.","Drops this reference and waits until all other references …","Locks with exclusive write access, blocking the current …","A scope for spawning threads.","A handle that can be used to join its scoped thread.","Configures the properties of a new thread.","","","","","","","","Creates a builder that can configure a thread before …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Waits for the thread to finish and returns its result.","Sets the name for the new thread.","Creates a new scope for spawning threads.","Spawns a scoped thread.","Spawns a scoped thread with this configuration.","Sets the size of the stack for the new thread.","Returns a handle to the underlying thread.","","","","","","","","",""],"i":[0,0,0,4,1,4,1,1,1,4,1,1,1,1,4,1,1,4,1,1,1,1,4,1,1,4,4,1,4,4,4,0,0,1,1,4,1,4,1,4,1,0,0,37,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,37,18,18,18,18,18,18,18,0,0,0,0,0,0,40,38,41,39,42,44,40,38,41,39,42,44,38,39,38,39,40,41,39,42,44,44,39,44,40,38,41,39,42,42,44,44,40,38,41,41,41,39,42,44,40,38,41,40,38,41,39,42,44,41,40,38,41,40,41,39,40,40,40,41,38,39,42,44,40,38,41,39,42,44,40,38,41,39,42,44,41,41,40,38,41,39,42,44,38,40,39,41,0,0,0,49,51,49,52,51,49,52,51,51,49,52,51,49,52,51,49,52,49,49,52,0,51,52,52,49,51,49,52,51,49,52,51,49,52],"f":"```{ce{}{}}000{{{b{c}}}{{b{c}}}d}{{ce}f{}{}}{{}h}{{}{{b{c}}}j}{{{b{c}}}c{}}0{{{b{c}}{b{c}}}ln}{{hA`}Ab}{{{b{c}}A`}AbAd}{{{b{c}}A`}AbAf}{cc{}}{c{{b{c}}}{}}{Ahc{}}2{{{b{c}}e}fAjAl}==8{hl};3{hf}00``?{cAn{}}{c{{B`{e}}}{}{}}000{cBb{}}0```{{{Bd{c}}}{}{}}{ce{}{}}0{{{Bd{c}}cc}c{BfBh}}{{{Bd{c}}cc}{{B`{cc}}}{BfBh}}{{}{{Bd{c}}}j}{{{Bd{c}}}f{}}{{{Bd{Bj}}Bj}Bj}{{{Bd{Bl}}Bl}Bl}{{{Bd{Bn}}Bn}Bn}{{{Bd{C`}}C`}C`}{{{Bd{Cb}}Cb}Cb}{{{Bd{Cd}}Cd}Cd}{{{Bd{Cf}}Cf}Cf}{{{Bd{Ch}}Ch}Ch}{{{Bd{Cj}}Cj}Cj}{{{Bd{Cl}}Cl}Cl}{{{Bd{Cn}}Cn}Cn}{{{Bd{D`}}D`}D`}5974281:6{{{Bd{l}}l}l}41<57;93:128<4685724963<:1;65<1;4:970823:503482<;7619875<439;12:6{{{Bd{c}}e}{{B`{cc}}}{BfBh}{{Df{c}{{Db{{Dd{c}}}}}}}}<:587=69;3241{{{Bd{c}}A`}Ab{BfAf}}{Ahc{}}{cc{}}{c{{Bd{c}}}{}}{ce{}{}}{{{Bd{c}}}c{}}{{}l}{{{Bd{c}}}cBf}{{{Dj{}{{Dh{c}}}}}c{}}5{{{Bd{c}}c}f{}}{{{Bd{c}}c}c{}}{{{Bd{c}}}cj}{c{{B`{e}}}{}{}}0{cBb{}}``````999999999999{DlDl}{DnDn}{{ce}f{}{}}0{{}E`}{{}{{Eb{c}}}j}{{}Dn}{{{Ed{c}}}cEf}{{{Eh{c}}}cEf}0{Dnf}{{{Eh{c}}}fEf}{{E`A`}Ab}{{DlA`}Ab}{{{Eb{c}}A`}Ab{EfAf}}{{DnA`}Ab}{{{Ed{c}}A`}Ab{EfAd}}{{{Ed{c}}A`}AbAf}{{{Eh{c}}A`}Ab{EfAd}}{{{Eh{c}}A`}AbAf}{cc{}}0{Ahc{}}1{c{{Eb{c}}}{}}222{fE`}{fDl}{{{Eb{c}}}{{Ej{c}}}Ef}{ce{}{}}00000{{{Eb{c}}}{{Ej{c}}}{}}{E`f}{Dlf}{{{Eb{c}}}lEf}{{}E`}9{{}Dn}4{{E`El}f}{{E`En}f}{{{Eb{c}}}{{Ej{{Ed{c}}}}}Ef}99{cAn{}}0{c{{B`{e}}}{}{}}00000000000{{{Eb{c}}}{{F`{{Ed{c}}}}}Ef}{{{Eb{c}}}{{F`{{Eh{c}}}}}Ef}{cBb{}}00000;{E`Dl}{Dnf}{{{Eb{c}}}{{Ej{{Eh{c}}}}}Ef}```{{{Fb{c}}}Fd{}}{ce{}{}}00000{FfFh}{{FfA`}Ab}{{{Fb{c}}A`}Ab{}}{{FhA`}Ab}{cc{}}005556{{{Fb{c}}}{{Fj{c}}}{}}{{FhAn}Fh}{e{{Fj{c}}}{}{{Fl{Ff}{{Db{c}}}}}}{{Ffe}{{Fb{c}}}Fn{{Fl{Ff}{{Db{c}}}}Fn}}{{Fhe}{{G`{{Fb{c}}}}}Fn{{Fl{Ff}{{Db{c}}}}Fn}}{{FhD`}Fh}{{{Fb{c}}}Gb{}}{c{{B`{e}}}{}{}}00000{cBb{}}00","c":[47],"p":[[5,"CachePadded",0],[10,"Clone",299],[1,"unit"],[5,"Backoff",0],[10,"Default",300],[1,"bool"],[10,"PartialEq",301],[5,"Formatter",302],[8,"Result",302],[10,"Display",302],[10,"Debug",302],[1,"never"],[10,"Hash",303],[10,"Hasher",303],[5,"String",304],[6,"Result",305],[5,"TypeId",306],[5,"AtomicCell",41],[10,"Copy",307],[10,"Eq",301],[1,"i128"],[1,"i32"],[1,"u16"],[1,"i16"],[1,"i8"],[1,"u32"],[1,"u8"],[1,"isize"],[1,"u128"],[1,"u64"],[1,"i64"],[1,"usize"],[17,"Output"],[6,"Option",308],[10,"FnMut",309],[17,"Val"],[10,"AtomicConsume",41],[5,"Unparker",168],[5,"WaitGroup",168],[5,"Parker",168],[5,"ShardedLock",168],[5,"ShardedLockReadGuard",168],[10,"Sized",307],[5,"ShardedLockWriteGuard",168],[8,"LockResult",310],[5,"Instant",311],[5,"Duration",312],[8,"TryLockResult",310],[5,"ScopedJoinHandle",262],[8,"RawPthread",313],[5,"Scope",262],[5,"ScopedThreadBuilder",262],[8,"Result",314],[10,"FnOnce",309],[10,"Send",307],[8,"Result",315],[5,"Thread",314]],"b":[[15,"impl-Display-for-CachePadded%3CT%3E"],[16,"impl-Debug-for-CachePadded%3CT%3E"],[51,"impl-AtomicCell%3Ci128%3E"],[52,"impl-AtomicCell%3Ci32%3E"],[53,"impl-AtomicCell%3Cu16%3E"],[54,"impl-AtomicCell%3Ci16%3E"],[55,"impl-AtomicCell%3Ci8%3E"],[56,"impl-AtomicCell%3Cu32%3E"],[57,"impl-AtomicCell%3Cu8%3E"],[58,"impl-AtomicCell%3Cisize%3E"],[59,"impl-AtomicCell%3Cu128%3E"],[60,"impl-AtomicCell%3Cu64%3E"],[61,"impl-AtomicCell%3Ci64%3E"],[62,"impl-AtomicCell%3Cusize%3E"],[63,"impl-AtomicCell%3Cu8%3E"],[64,"impl-AtomicCell%3Cu16%3E"],[65,"impl-AtomicCell%3Ci8%3E"],[66,"impl-AtomicCell%3Cisize%3E"],[67,"impl-AtomicCell%3Cu64%3E"],[68,"impl-AtomicCell%3Ci16%3E"],[69,"impl-AtomicCell%3Ci64%3E"],[70,"impl-AtomicCell%3Ci32%3E"],[71,"impl-AtomicCell%3Cu32%3E"],[72,"impl-AtomicCell%3Cbool%3E"],[73,"impl-AtomicCell%3Cu128%3E"],[74,"impl-AtomicCell%3Cusize%3E"],[75,"impl-AtomicCell%3Ci128%3E"],[76,"impl-AtomicCell%3Cisize%3E"],[77,"impl-AtomicCell%3Cu32%3E"],[78,"impl-AtomicCell%3Ci32%3E"],[79,"impl-AtomicCell%3Ci16%3E"],[80,"impl-AtomicCell%3Cu64%3E"],[81,"impl-AtomicCell%3Cu16%3E"],[82,"impl-AtomicCell%3Cusize%3E"],[83,"impl-AtomicCell%3Ci64%3E"],[84,"impl-AtomicCell%3Ci8%3E"],[85,"impl-AtomicCell%3Ci128%3E"],[86,"impl-AtomicCell%3Cu128%3E"],[87,"impl-AtomicCell%3Cu8%3E"],[88,"impl-AtomicCell%3Ci8%3E"],[89,"impl-AtomicCell%3Cisize%3E"],[90,"impl-AtomicCell%3Cu32%3E"],[91,"impl-AtomicCell%3Ci64%3E"],[92,"impl-AtomicCell%3Cu128%3E"],[93,"impl-AtomicCell%3Ci16%3E"],[94,"impl-AtomicCell%3Cu8%3E"],[95,"impl-AtomicCell%3Cu64%3E"],[96,"impl-AtomicCell%3Ci128%3E"],[97,"impl-AtomicCell%3Cu16%3E"],[98,"impl-AtomicCell%3Cusize%3E"],[99,"impl-AtomicCell%3Ci32%3E"],[100,"impl-AtomicCell%3Cu8%3E"],[101,"impl-AtomicCell%3Cisize%3E"],[102,"impl-AtomicCell%3Ci128%3E"],[103,"impl-AtomicCell%3Cusize%3E"],[104,"impl-AtomicCell%3Ci32%3E"],[105,"impl-AtomicCell%3Cu128%3E"],[106,"impl-AtomicCell%3Cu16%3E"],[107,"impl-AtomicCell%3Ci16%3E"],[108,"impl-AtomicCell%3Cu32%3E"],[109,"impl-AtomicCell%3Cbool%3E"],[110,"impl-AtomicCell%3Ci8%3E"],[111,"impl-AtomicCell%3Ci64%3E"],[112,"impl-AtomicCell%3Cu64%3E"],[113,"impl-AtomicCell%3Cu16%3E"],[114,"impl-AtomicCell%3Cisize%3E"],[115,"impl-AtomicCell%3Cbool%3E"],[116,"impl-AtomicCell%3Cu64%3E"],[117,"impl-AtomicCell%3Cu128%3E"],[118,"impl-AtomicCell%3Ci8%3E"],[119,"impl-AtomicCell%3Ci64%3E"],[120,"impl-AtomicCell%3Ci128%3E"],[121,"impl-AtomicCell%3Ci32%3E"],[122,"impl-AtomicCell%3Cu32%3E"],[123,"impl-AtomicCell%3Cu8%3E"],[124,"impl-AtomicCell%3Cusize%3E"],[125,"impl-AtomicCell%3Ci16%3E"],[126,"impl-AtomicCell%3Ci8%3E"],[127,"impl-AtomicCell%3Cu32%3E"],[128,"impl-AtomicCell%3Cisize%3E"],[129,"impl-AtomicCell%3Ci128%3E"],[130,"impl-AtomicCell%3Cu128%3E"],[131,"impl-AtomicCell%3Cu64%3E"],[132,"impl-AtomicCell%3Ci16%3E"],[133,"impl-AtomicCell%3Ci32%3E"],[134,"impl-AtomicCell%3Cusize%3E"],[135,"impl-AtomicCell%3Ci64%3E"],[136,"impl-AtomicCell%3Cu16%3E"],[137,"impl-AtomicCell%3Cu8%3E"],[139,"impl-AtomicCell%3Ci32%3E"],[140,"impl-AtomicCell%3Ci16%3E"],[141,"impl-AtomicCell%3Cu128%3E"],[142,"impl-AtomicCell%3Cu32%3E"],[143,"impl-AtomicCell%3Cu8%3E"],[144,"impl-AtomicCell%3Ci128%3E"],[145,"impl-AtomicCell%3Cisize%3E"],[146,"impl-AtomicCell%3Ci8%3E"],[147,"impl-AtomicCell%3Cu16%3E"],[148,"impl-AtomicCell%3Ci64%3E"],[149,"impl-AtomicCell%3Cusize%3E"],[150,"impl-AtomicCell%3Cu64%3E"],[151,"impl-AtomicCell%3Cbool%3E"],[202,"impl-Display-for-ShardedLockReadGuard%3C\'_,+T%3E"],[203,"impl-Debug-for-ShardedLockReadGuard%3C\'_,+T%3E"],[204,"impl-Display-for-ShardedLockWriteGuard%3C\'_,+T%3E"],[205,"impl-Debug-for-ShardedLockWriteGuard%3C\'_,+T%3E"]]}],\ +["either",{"doc":"The enum Either with variants Left and Right is a general …","t":"GKFEPEPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNQNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNQQNNNN","n":["Either","IntoEither","IterEither","Left","Left","Right","Right","all","all","any","any","as_mut","as_mut","as_mut","as_mut","as_pin_mut","as_pin_ref","as_ref","as_ref","as_ref","as_ref","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_from","cmp","collect","collect","count","count","deref","deref_mut","either","either_into","either_with","eq","expect_left","expect_right","extend","factor_err","factor_first","factor_into_iter","factor_iter","factor_iter_mut","factor_none","factor_ok","factor_second","find","find","find_map","find_map","flip","fmt","fmt","fmt","fold","fold","for_both","for_each","for_each","from","from","from","hash","into","into","into","into_either","into_either","into_either_with","into_either_with","into_future","into_inner","into_iter","into_iter","into_iter","is_left","is_right","iter","iter_mut","last","last","left","left_and_then","left_or","left_or_default","left_or_else","len","len","map","map_either","map_either_with","map_left","map_right","next","next","next_back","next_back","nth","nth","nth_back","nth_back","partial_cmp","partition","partition","poll","position","position","rfind","rfind","rfold","rfold","right","right_and_then","right_or","right_or_default","right_or_else","size_hint","size_hint","try_from","try_from","try_into","try_into","try_left","try_right","type_id","type_id","unwrap_left","unwrap_right"],"q":[[0,"either"],[132,"core::iter::traits::iterator"],[133,"core::ops::function"],[134,"core::convert"],[135,"core::pin"],[136,"core::convert"],[137,"core::cmp"],[138,"core::cmp"],[139,"core::ops::deref"],[140,"core::ops::deref"],[141,"core::iter::traits::collect"],[142,"core::option"],[143,"core::fmt"],[144,"core::hash"],[145,"core::iter::traits::exact_size"],[146,"core::iter::traits::double_ended"],[147,"core::cmp"],[148,"core::task::poll"],[149,"core::future::future"],[150,"core::any"]],"d":["The enum Either with variants Left and Right is a general …","Provides methods for converting a type Self into either a …","Iterator that maps left or right iterators to …","","A value of type L.","","A value of type R.","","","","","","","","Convert &mut Either<L, R> to Either<&mut L, &mut R>.","Convert Pin<&mut Either<L, R>> to …","Convert Pin<&Either<L, R>> to Either<Pin<&L>, Pin<&R>>, …","","Convert &Either<L, R> to Either<&L, &R>.","","","","","","","","","","","","","","","","","Apply one of two functions depending on contents, unifying …","Convert the contained value into T","Like either, but provide some context to whichever of the …","","Returns the left value","Returns the right value","","Factors out a homogenous type from an Either of Result.","Factor out a homogeneous type from an either of pairs.","Converts an Either of Iterators to be an Iterator of Either…","Borrows an Either of Iterators to be an Iterator of Eithers","Mutably borrows an Either of Iterators to be an Iterator …","Factors out None from an Either of Option.","Factors out a homogenous type from an Either of Result.","Factor out a homogeneous type from an either of pairs.","","","","","Convert Either<L, R> to Either<R, L>.","","","","","","Evaluate the provided expression for both Either::Left and …","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","","Calls U::from(self).","Converts self into a Left variant of Either<Self, Self> if …","Converts self into a Left variant of Either<Self, Self> if …","Converts self into a Left variant of Either<Self, Self> if …","Converts self into a Left variant of Either<Self, Self> if …","","Extract the value of an either over two equivalent types.","","Convert the inner value to an iterator.","","Return true if the value is the Left variant.","Return true if the value is the Right variant.","Borrow the inner value as an iterator.","Mutably borrow the inner value as an iterator.","","","Convert the left side of Either<L, R> to an Option<L>.","Apply the function f on the value in the Left variant if …","Return left value or given value","Return left or a default","Returns left value or computes it from a closure","","","Map f over the contained value and return the result in the","Apply the functions f and g to the Left and Right variants …","Similar to map_either, with an added context ctx …","Apply the function f on the value in the Left variant if …","Apply the function f on the value in the Right variant if …","","","","","","","","","","","","","","","","","","","Convert the right side of Either<L, R> to an Option<R>.","Apply the function f on the value in the Right variant if …","Return right value or given value","Return right or a default","Returns right value or computes it from a closure","","","","","","","Macro for unwrapping the left side of an Either, which …","Dual to try_left!, see its documentation for more …","","","Returns the left value","Returns the right value"],"i":[0,0,0,0,1,0,1,1,7,1,7,1,1,1,1,1,1,1,1,1,1,1,7,1,7,1,7,1,1,1,7,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,1,7,1,1,1,7,1,7,0,1,7,1,1,7,1,1,1,7,36,36,36,36,1,1,1,1,7,1,1,1,1,1,7,1,1,1,1,1,1,7,1,1,1,1,1,1,7,1,7,1,7,1,7,1,1,7,1,1,7,1,7,1,7,1,1,1,1,1,1,7,1,7,1,7,0,0,1,7,1,1],"f":"```````{{{b{ce}}i}df{{f{}{{h{}}}}}{}{{l{g}{{j{d}}}}}}{{{n{ce}}i}dff{}{{l{g}{{j{d}}}}}}10{{{b{eg}}}c{}{{A`{c}}}{{A`{c}}}}{{{b{ce}}}Ab{{A`{Ab}}}{{A`{Ab}}}}{{{b{eg}}}{{Ad{c}}}{}{{A`{{Ad{c}}}}}{{A`{{Ad{c}}}}}}{{{b{ce}}}{{b{ce}}}{}{}}{{{Af{{b{ce}}}}}{{b{{Af{c}}{Af{e}}}}}{}{}}0{{{b{eg}}}c{}{{Ah{c}}}{{Ah{c}}}}2{{{b{eg}}}{{Ad{c}}}{}{{Ah{{Ad{c}}}}}{{Ah{{Ad{c}}}}}}{{{b{ce}}}Ab{{Ah{Ab}}}{{Ah{Ab}}}}{ce{}{}}000{{{b{ce}}}{{b{ce}}}AjAj}{{{n{ce}}}{{n{ce}}}AjAj}{{{b{ce}}{b{ce}}}AlAjAj}{{{b{ce}}{b{ce}}}AnB`B`}{{{b{ce}}}if{{f{}{{h{}}}}}{}{{Bb{g}}}}{{{n{ce}}}iff{}{{Bb{g}}}}{{{b{ce}}}Bdf{{f{}{{h{}}}}}}{{{n{ce}}}Bdff}{{{b{ce}}}gBf{{Bf{}{{Bh{}}}}}{}}{{{b{ce}}}gBj{{Bj{}{{Bh{}}}}}{}}{{{b{ce}}ik}g{}{}{}{{Bl{c}{{j{g}}}}}{{Bl{e}{{j{g}}}}}}{{{b{eg}}}c{}{{Bn{c}}}{{Bn{c}}}}{{{b{ce}}gkm}i{}{}{}{}{{Bl{gc}{{j{i}}}}}{{Bl{ge}{{j{i}}}}}}{{{b{ce}}{b{ce}}}dC`C`}{{{b{ce}}Ab}c{}Cb}{{{b{ce}}Ab}eCb{}}{{{b{eg}}i}Al{}{{Cd{c}}}{{Cd{c}}}{{Cf{}{{h{c}}}}}}{{{b{{Ch{ce}}{Ch{ge}}}}}{{Ch{{b{cg}}e}}}{}{}{}}{{{b{{Cj{ce}}{Cj{cg}}}}}{{Cj{c{b{eg}}}}}{}{}{}}{{{b{ce}}}nCfCf}{{{b{ce}}}n{}{}}0{{{b{{Cl{c}}{Cl{e}}}}}{{Cl{{b{ce}}}}}{}{}}{{{b{{Ch{ce}}{Ch{cg}}}}}{{Ch{c{b{eg}}}}}{}{}{}}{{{b{{Cj{ce}}{Cj{ge}}}}}{{Cj{{b{cg}}e}}}{}{}{}}{{{b{ce}}i}{{Cl{g}}}f{{f{}{{h{}}}}}{}{{l{g}{{j{d}}}}}}{{{n{ce}}i}{{Cl{g}}}ff{}{{l{g}{{j{d}}}}}}{{{b{ce}}k}{{Cl{i}}}f{{f{}{{h{}}}}}{}{}{{l{g}{{j{{Cl{i}}}}}}}}{{{n{ce}}k}{{Cl{i}}}ff{}{}{{l{g}{{j{{Cl{i}}}}}}}}{{{b{ce}}}{{b{ec}}}{}{}}{{{b{ce}}Cn}D`CbCb}{{{b{ce}}Cn}D`DbDb}{{{n{ce}}Cn}D`CbCb}{{{b{ce}}gk}gf{{f{}{{h{}}}}}{}{}{{l{gi}{{j{g}}}}}}{{{n{ce}}gk}gff{}{}{{l{gi}{{j{g}}}}}}`{{{b{ce}}i}Alf{{f{}{{h{}}}}}{}{{l{g}}}}{{{n{ce}}i}Alff{}{{l{g}}}}{{{Ch{ce}}}{{b{ec}}}{}{}}{cc{}}0{{{b{ce}}g}AlDdDdDf}{ce{}{}}{{{b{ce}}}{{Ch{ec}}}{}{}}1{{Dhd}{{b{DhDh}}}}0{{Dhc}{{b{DhDh}}}{{Bl{Dh}{{j{d}}}}}}0{c{}{}}{{{b{cc}}}c{}}5{{{b{ce}}}bCf{{Cf{}{{h{}}}}}}6{{{b{ce}}}d{}{}}0{{{b{ce}}}b{}{}}0{{{b{ce}}}{{Cl{g}}}f{{f{}{{h{}}}}}{}}{{{n{ce}}}{{Cl{g}}}ff{}}{{{b{ce}}}{{Cl{c}}}{}{}}{{{b{ce}}i}{{b{ge}}}{}{}{}{{Bl{c}{{j{{b{ge}}}}}}}}{{{b{ce}}c}c{}{}}{{{b{ce}}}cDj{}}{{{b{ce}}g}c{}{}{{Bl{e}{{j{c}}}}}}{{{b{ce}}}BdDl{{Dl{}{{h{}}}}}}{{{n{ce}}}BdDlDl}{{{b{cc}}g}{{b{ee}}}{}{}{{Bl{c}{{j{e}}}}}}{{{b{ce}}im}{{b{gk}}}{}{}{}{{Bl{c}{{j{g}}}}}{}{{Bl{e}{{j{k}}}}}}{{{b{ce}}gko}{{b{im}}}{}{}{}{}{{Bl{gc}{{j{i}}}}}{}{{Bl{ge}{{j{m}}}}}}{{{b{ce}}i}{{b{ge}}}{}{}{}{{Bl{c}{{j{g}}}}}}{{{b{ce}}i}{{b{cg}}}{}{}{}{{Bl{e}{{j{g}}}}}}=<{{{b{ce}}}{{Cl{g}}}Dn{{Dn{}{{h{}}}}}{}}{{{n{ce}}}{{Cl{g}}}DnDn{}}{{{b{ce}}Bd}{{Cl{g}}}f{{f{}{{h{}}}}}{}}{{{n{ce}}Bd}{{Cl{g}}}ff{}}{{{b{ce}}Bd}{{Cl{g}}}Dn{{Dn{}{{h{}}}}}{}}{{{n{ce}}Bd}{{Cl{g}}}DnDn{}}{{{b{ce}}{b{ce}}}{{Cl{An}}}E`E`}{{{b{ce}}i}{{Cj{kk}}}f{{f{}{{h{}}}}}{}{{l{g}{{j{d}}}}}{Dj{Cd{g}}}}{{{n{ce}}i}{{Cj{kk}}}ff{}{{l{g}{{j{d}}}}}{Dj{Cd{g}}}}{{{Af{{b{ce}}}}Eb}{{Ed{g}}}Ef{{Ef{}{{j{}}}}}{}}{{{b{ce}}i}{{Cl{Bd}}}f{{f{}{{h{}}}}}{}{{l{g}{{j{d}}}}}}{{{n{ce}}i}{{Cl{Bd}}}ff{}{{l{g}{{j{d}}}}}}{{{b{ce}}i}{{Cl{g}}}Dn{{Dn{}{{h{}}}}}{}{{l{g}{{j{d}}}}}}{{{n{ce}}i}{{Cl{g}}}DnDn{}{{l{g}{{j{d}}}}}}{{{b{ce}}gk}gDn{{Dn{}{{h{}}}}}{}{}{{l{gi}{{j{g}}}}}}{{{n{ce}}gk}gDnDn{}{}{{l{gi}{{j{g}}}}}}{{{b{ce}}}{{Cl{e}}}{}{}}{{{b{ce}}i}{{b{cg}}}{}{}{}{{Bl{e}{{j{{b{cg}}}}}}}}{{{b{ce}}e}e{}{}}{{{b{ce}}}e{}Dj}{{{b{ce}}g}e{}{}{{Bl{c}{{j{e}}}}}}{{{b{ce}}}{{Cj{Bd{Cl{Bd}}}}}f{{f{}{{h{}}}}}}{{{n{ce}}}{{Cj{Bd{Cl{Bd}}}}}ff}{c{{Ch{e}}}{}{}}000``{cEh{}}0{{{b{ce}}}c{}Cb}{{{b{ce}}}eCb{}}","c":[],"p":[[6,"Either",0],[1,"bool"],[10,"Iterator",132],[17,"Item"],[17,"Output"],[10,"FnMut",133],[5,"IterEither",0],[10,"AsMut",134],[1,"str"],[1,"slice"],[5,"Pin",135],[10,"AsRef",134],[10,"Clone",136],[1,"unit"],[6,"Ordering",137],[10,"Ord",137],[10,"FromIterator",138],[1,"usize"],[10,"Deref",139],[17,"Target"],[10,"DerefMut",139],[10,"FnOnce",133],[10,"Into",134],[10,"PartialEq",137],[10,"Debug",140],[10,"Extend",138],[10,"IntoIterator",138],[6,"Result",141],[1,"tuple"],[6,"Option",142],[5,"Formatter",140],[8,"Result",140],[10,"Display",140],[10,"Hash",143],[10,"Hasher",143],[10,"IntoEither",0],[10,"Default",144],[10,"ExactSizeIterator",145],[10,"DoubleEndedIterator",146],[10,"PartialOrd",137],[5,"Context",147],[6,"Poll",148],[10,"Future",149],[5,"TypeId",150]],"b":[[11,"impl-AsMut%3CTarget%3E-for-Either%3CL,+R%3E"],[12,"impl-AsMut%3Cstr%3E-for-Either%3CL,+R%3E"],[13,"impl-AsMut%3C%5BTarget%5D%3E-for-Either%3CL,+R%3E"],[14,"impl-Either%3CL,+R%3E"],[17,"impl-AsRef%3CTarget%3E-for-Either%3CL,+R%3E"],[18,"impl-Either%3CL,+R%3E"],[19,"impl-AsRef%3C%5BTarget%5D%3E-for-Either%3CL,+R%3E"],[20,"impl-AsRef%3Cstr%3E-for-Either%3CL,+R%3E"],[55,"impl-Debug-for-Either%3CL,+R%3E"],[56,"impl-Display-for-Either%3CL,+R%3E"]]}],\ ["font_types",{"doc":"Common scalar data types used in font files","t":"FFPSTTPKPTTTTTTTFFTTFFKFPPGTTTPFTTTTTTTTTFPTFFTTTFFFTTKGFPTRTTKTSSTTFTFFTTTTTTTTTTTTTTFTTTTTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNMNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMONOMNNNNNNNNNNNNNNNNNNNNNNNNNNNNQNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOO","n":["BigEndian","BoundingBox","ByteAfterSpace","CFF_SFTN_VERSION","COMPATIBLE_FULL_NAME","COPYRIGHT_NOTICE","Close","Compatible","CurveTo","DARK_BACKGROUND_PALETTE","DESCRIPTION","DESIGNER","DESIGNER_URL","EPSILON","EPSILON","EPSILON","F26Dot6","F2Dot14","FAMILY_NAME","FULL_NAME","FWord","Fixed","FixedSize","GlyphId","InvalidByte","InvalidLength","InvalidTag","LICENSE_DESCRIPTION","LICENSE_URL","LIGHT_BACKGROUND_PALETTE","LineTo","LongDateTime","MANUFACTURER","MAX","MAX","MAX","MAX","MIN","MIN","MIN","MIN","MajorMinor","MoveTo","NOTDEF","NameId","Nullable","ONE","ONE","ONE","Offset16","Offset24","Offset32","POSTSCRIPT_CID_NAME","POSTSCRIPT_NAME","Pen","PenCommand","Point","QuadTo","RAW_BYTE_LEN","Raw","SAMPLE_TEXT","SUBFAMILY_NAME","Scalar","TRADEMARK","TTC_HEADER_TAG","TT_SFNT_VERSION","TYPOGRAPHIC_FAMILY_NAME","TYPOGRAPHIC_SUBFAMILY_NAME","Tag","UNIQUE_ID","UfWord","Uint24","VARIATIONS_POSTSCRIPT_NAME_PREFIX","VENDOR_URL","VERSION_0_5","VERSION_1_0","VERSION_1_0","VERSION_1_1","VERSION_1_1","VERSION_1_2","VERSION_1_3","VERSION_2_0","VERSION_2_0","VERSION_2_5","VERSION_3_0","VERSION_STRING","Version16Dot16","WWS_FAMILY_NAME","WWS_SUBFAMILY_NAME","ZERO","ZERO","ZERO","abs","abs","abs","add","add","add","add","add_assign","add_assign","add_assign","add_assign","apply_to","as_ref","as_secs","be_bytes","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","broadcast","checked_new","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","close","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","compatible","compatible","compatible","compatible","compatible","curve_to","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","div","div","div","div","div_assign","div_assign","div_assign","div_assign","end_point","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","floor","floor","floor","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fract","fract","fract","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_be_bytes","from_be_bytes","from_bits","from_bits","from_bits","from_f32","from_f64","from_f64","from_i32","from_i32","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_raw","from_slice","from_str","from_u32","get","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","hash","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_bytes","is_null","is_null","is_null","is_null","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","line_to","major","map","minor","move_to","mul","mul","mul","mul","mul_assign","mul_assign","mul_assign","mul_assign","mul_div","mul_div","neg","neg","neg","new","new","new","new","new","new","new","new","new","new","new","new","new","new","new_checked","newtype_scalar","offset","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","predefined","quad_to","read","read","round","round","round","saturating_add","saturating_add","saturating_add","saturating_sub","saturating_sub","saturating_sub","scale","set","sub","sub","sub","sub","sub_assign","sub_assign","sub_assign","sub_assign","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_be_bytes","to_bits","to_bits","to_bits","to_f26dot6","to_f2dot14","to_f32","to_f32","to_f32","to_f64","to_f64","to_fixed","to_fixed","to_fixed","to_i16","to_i32","to_i32","to_major_minor","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_raw","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_string","to_u16","to_u16","to_u16","to_u32","to_u32","to_u32","to_u32","to_u32","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","validate","wrapping_add","wrapping_add","wrapping_add","wrapping_sub","wrapping_sub","wrapping_sub","x","x_max","x_min","y","y_max","y_min","byte","pos","pos","cx0","cx0","cx1","cy0","cy0","cy1","x","x","x","x","y","y","y","y"],"q":[[0,"font_types"],[663,"font_types::InvalidTag"],[666,"font_types::PenCommand"],[680,"core::ops::arith"],[681,"core::ops::arith"],[682,"core::option"],[683,"core::clone"],[684,"core::cmp"],[685,"core::cmp"],[686,"core::ops::arith"],[687,"core::fmt"],[688,"core::hash"],[689,"core::hash"],[690,"core::ops::arith"],[691,"core::ops::arith"],[692,"core::any"]],"d":["A wrapper around raw big-endian bytes for some type.","Minimum and maximum extents of a rectangular region.","","The SFNT version for fonts containing CFF outlines.","Compatible full (Macintosh only).","Copyright notice.","","A trait for determining whether versions are compatible.","","Dark background palette.","Description of the typeface.","Name of the designer of the typeface.","URL of typeface designer (with protocol, e.g., http://, …","This type’s smallest representable value","This type’s smallest representable value","This type’s smallest representable value","32-bit signed fixed point number with 6 bits of fraction.","16-bit signed fixed point number with 14 bits of fraction.","Font family name.","Full font name that reflects all family and relevant …","16-bit signed quantity in font design units.","32-bit signed fixed point number with 16 bits of fraction.","A trait for types that have a known, constant size.","A 16-bit glyph identifier.","","","An error representing an invalid tag.","License description.","URL where additional licensing information can be found.","Light background palette.","","A simple datetime type.","Manufacturer name.","Maximum value.","Maximum value.","Maximum value.","The largest value that can be represented by this integer …","Minimum value.","Minimum value.","Minimum value.","The smallest value that can be represented by this integer …","A type representing a major, minor version pair.","","The identifier reserved for unknown glyphs","Identifier for an informational string (or name).","An offset of a given width for which NULL (zero) is a …","Representation of 1.0.","Representation of 1.0.","Representation of 1.0.","A16-bit offset to a table.","A24-bit offset to a table.","A32-bit offset to a table.","PostScript CID findfont name.","PostScript name for the font.","Interface for accepting a sequence of path commands.","Captures commands to Pen to facilitate implementations …","Two dimensional point with a generic coordinate type.","","The raw size of this type, in bytes.","The raw byte representation of this type.","Sample text.","Font subfamily name.","A trait for font scalars.","Trademark; this is used to save any trademark …","The header tag for a font collection file.","The SFNT version for fonts containing TrueType outlines.","Typographic family name.","Typographic subfamily name.","An OpenType tag.","Unique font identifier.","16-bit unsigned quantity in font design units.","24-bit unsigned integer.","Variations PostScript name prefix.","URL of font vendor (with protocol, e.g., http://, ftp://).","Version 0.5","Version 1.0","Version 1.0","Version 1.1","Version 1.1","Version 1.2","Version 1.3","Version 2.0","Version 2.0","Version 2.5","Version 3.0","Version string.","A legacy 16/16 version encoding Packed 32-bit value with …","WWS family name.","WWS subfamily name.","Representation of 0.0.","Representation of 0.0.","Representation of 0.0.","Returns the absolute value of the number.","Returns the absolute value of the number.","Returns the absolute value of the number.","","","","","","","","","","","The number of seconds since 00:00 1904-01-01, UTC.","Get the raw big-endian bytes.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Creates a new point from a single value assigned to both …","Create from a u32, returning None if the value overflows.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Emit a command to close the current subpath.","","","","","","","","","","","","","","","","","return true if this version is field-compatible with other.","","","","","Emit a cubic bezier segment from the current point with …","","","","","","","","","","","","","","","","","","","","","","","","","The directly stated - not implied - end point of the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the largest integer less than or equal to the …","Returns the largest integer less than or equal to the …","Returns the largest integer less than or equal to the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the fractional part of the number.","Returns the fractional part of the number.","Returns the fractional part of the number.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Create a tag from raw big-endian bytes.","","Creates a new fixed point value from the underlying bit …","Creates a new fixed point value from the underlying bit …","Creates a new fixed point value from the underlying bit …","Creates a fixed point value from af32.","Creates a fixed point value from af64.","Creates a fixed point value from af64.","Creates a 16.16 fixed point value from a 32 bit integer.","Creates a 26.6 fixed point value from a 32 bit integer.","Create an instance of this type from raw big-endian bytes","","","","","","","","","","","","","","","","Attempt to construct a new raw value from this slice.","","Construct a new Tag from a big-endian u32, without …","Convert this raw type to its native representation.","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Return the raw byte array representing this tag.","","Return true if this offset is null.","Return true if this offset is null.","Return true if this offset is null.","","","","","","","","","","","","","","","","","","","Emit a line segment from the current point to (x, y).","The major version number","Maps Point<T> to Point<U> by applying a function to each …","The minor version number","Emit a command to begin a new subpath at (x, y).","","","","","","","","","Multiplies self by a and divides the product by b.","Multiplies self by a and divides the product by b.","","","","","","Construct a new GlyphId.","Create with a number of seconds relative to 1904-01-01 …","Create a new identifier from a raw u16 value.","Create a new offset.","Create a new offset.","Create a new offset.","Creates a new point with the given x and y coordinates.","construct a new BigEndian<T> from raw bytes","Construct a Tag from raw bytes.","Create from a u32. Saturates on overflow.","Create a new version with the provided major and minor …","Create a new version with major and minor parts.","Attempt to create a Tag from raw bytes.","An internal macro for implementing the RawType trait.","Return a reference to the inner offset","","","","","","","","","","","","","","","","","Returns an iterator over the set of predefined identifiers …","Emit a quadratic bezier segment from the current point …","Attempt to read a scalar from a slice.","Attempt to read a scalar from a slice.","Returns the nearest integer value.","Returns the nearest integer value.","Returns the nearest integer value.","Saturating addition.","Saturating addition.","Saturating addition.","Saturating substitution.","Saturating substitution.","Saturating substitution.","","Set the value, overwriting the bytes.","","","","","","","","","The representation of this number as a big-endian byte …","The representation of this number as a big-endian byte …","The representation of this number as a big-endian byte …","The representation of this number as a big-endian byte …","The representation of this number as a big-endian byte …","","The representation of this datetime as a big-endian byte …","Return the memory representation of this identifier as a …","Return the memory representation of this tag.","","The representation of this version as a big-endian byte …","The representation of this version as a big-endian byte …","Returns the underlying bit representation of the value.","Returns the underlying bit representation of the value.","Returns the underlying bit representation of the value.","Converts a 16.16 to 26.6 fixed point value.","Converts a 16.16 to 2.14 fixed point value.","Returns the value as an f32.","Converts a 16.16 fixed point value to a single precision …","Converts a 26.6 fixed point value to a single precision …","Returns the value as an f64.","Returns the value as an f64.","Converts a 2.14 to 16.16 fixed point value.","Converts this number to a 16.16 fixed point value.","Converts this number to a 16.16 fixed point value.","","Converts a 16.16 fixed point value to a 32 bit integer, …","Converts a 26.6 fixed point value to a 32 bit integer, …","Return the separate major & minor version numbers.","","","","","","","","","","","","","","","","","","","","","","Encode this type as raw big-endian bytes","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The identifier as a u16.","Return the identifier as a u16.","The identifier as a u32.","","","","Returns this value as an unsigned 32-bit integer.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Check that the tag conforms with the spec.","Wrapping addition.","Wrapping addition.","Wrapping addition.","Wrapping substitution.","Wrapping substitution.","Wrapping substitution.","X coordinate.","Maximum extent in the x direction– the right side of a …","Minimum extent in the x direction– the left side of a …","Y coordinate.","Maximum extend in the y direction. In a Y-up coordinate …","Minimum extent in the y direction. In a Y-up coordinate …","","","","","","","","","","","","","","","","",""],"i":[0,0,33,0,28,28,9,0,9,28,28,28,28,1,2,3,0,0,28,28,0,0,0,0,33,33,0,28,28,28,9,0,28,1,2,3,21,1,2,3,21,0,9,27,0,0,1,2,3,0,0,0,28,28,0,0,0,9,72,17,28,28,0,28,0,0,28,28,0,28,0,0,28,28,34,34,35,34,35,35,35,34,35,34,34,28,0,28,28,1,2,3,1,2,3,1,2,3,4,1,2,3,4,9,11,14,16,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,11,33,21,34,35,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,4,21,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,10,1,2,3,25,26,27,14,28,30,31,32,16,11,21,34,35,39,34,34,35,35,10,23,1,2,3,25,26,27,14,28,29,4,16,11,21,34,35,2,3,4,4,2,3,4,4,9,23,1,2,3,25,26,27,14,28,29,29,30,30,31,31,32,32,9,4,16,16,11,11,11,11,11,33,21,34,35,1,2,3,23,1,1,2,2,3,3,25,25,26,26,27,27,14,28,28,29,30,31,32,9,4,16,16,11,11,33,33,21,21,34,34,35,35,1,2,3,23,1,2,2,3,25,25,26,26,27,27,14,28,28,29,30,31,32,9,4,16,16,11,33,21,34,35,11,21,1,2,3,1,2,3,2,3,17,1,2,25,26,27,14,28,29,30,31,32,11,21,34,35,16,11,11,16,1,2,3,25,26,27,14,28,16,11,21,34,35,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,11,29,30,31,32,1,2,3,25,26,27,14,28,29,30,31,32,4,16,11,21,34,35,10,35,4,35,10,2,3,4,4,2,3,4,4,2,3,2,3,4,25,26,27,14,28,30,31,32,4,16,11,21,34,35,11,0,29,1,2,3,25,26,27,14,28,30,31,32,16,11,21,34,35,28,10,17,17,1,2,3,1,2,3,1,2,3,23,16,1,2,3,4,1,2,3,4,1,2,3,25,26,27,14,28,11,21,34,35,1,2,3,2,2,1,2,3,2,3,1,25,26,25,2,3,34,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,17,1,2,25,26,27,14,28,29,30,31,32,11,21,34,35,1,2,3,25,26,27,28,16,11,33,21,34,35,26,27,28,27,30,31,32,21,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,23,1,2,3,25,26,27,14,28,29,30,31,32,9,4,16,11,33,21,34,35,11,1,2,3,1,2,3,4,23,23,4,23,23,73,73,74,75,76,76,75,76,76,77,78,75,76,77,78,75,76],"f":"````````````````````````````````````````````````````````````````````````````````````````````{bb}{dd}{ff}{{bb}b}{{dd}d}{{ff}f}{{{h{c}}{h{c}}}e{{l{}{{j{}}}}}{}}{{bb}n}{{dd}n}{{ff}n}{{{h{c}}{h{c}}}nA`}{{Abc}nAd}{Af{{Aj{Ah}}}}{AlAn}{{{B`{c}}}{{Aj{Ah}}}Bb}{ce{}{}}0000000000000000{Af{{Bd{Ah}}}}1111111111111111111111111{c{{h{c}}}Bf}{Bh{{Bl{Bj}}}}{{{Bn{c}}}{{Bn{c}}}C`}{bb}{dd}{ff}{CbCb}{CdCd}{CfCf}{AlAl}{ChCh}{{{Cj{c}}}{{Cj{c}}}C`}{ClCl}{CnCn}{D`D`}{AbAb}{{{h{c}}}{{h{c}}}C`}{{{B`{c}}}{{B`{c}}}{C`Bb}}{AfAf}{DbDb}{BjBj}{DdDd}{DfDf}{{ce}n{}{}}00000000000000000000{Adn}{{bb}Dh}{{dd}Dh}{{ff}Dh}{{CbCb}Dh}{{CdCd}Dh}{{CfCf}Dh}{{AlAl}Dh}{{ChCh}Dh}{{ClCl}Dh}{{CnCn}Dh}{{D`D`}Dh}{{{B`{c}}{B`{c}}}Dh{BbBfDjDl}}{{AfAf}Dh}{{BjBj}Dh}{{DdDd}Dh}{{DfDf}Dh}{{Dnc}E`{}}{{DdDd}E`}{{Dd{Ed{EbEb}}}E`}{{DfDf}E`}{{Df{Ed{EbEb}}}E`}{{AdEfEfEfEfEfEf}n}{{}{{Bn{c}}}Eh}{{}b}{{}d}{{}f}{{}Cb}{{}Cd}{{}Cf}{{}Al}{{}Ch}{{}{{Cj{c}}}`}{{}{{h{c}}}Eh}{{}{{B`{c}}}{BbEh}}{{}Af}{{}Bj}{{}Dd}{{}Df}{{dd}c{}}{{ff}c{}}{{{h{c}}c}e{{Ej{}{{j{}}}}Bf}{}}{{{h{c}}{h{c}}}e{{Ej{}{{j{}}}}}{}}{{dd}n}{{ff}n}{{{h{c}}{h{c}}}nEl}{{{h{c}}c}n{ElBf}}{Ab{{Bl{{Ed{EfEf}}}}}}{{{Bn{c}}{Bn{c}}}E`En}{{bb}E`}{{dd}E`}{{ff}E`}{{CbCb}E`}{{CdCd}E`}{{CfCf}E`}{{AlAl}E`}{{ChCh}E`}{{{Cj{c}}{Cj{c}}}E`En}{{{Cj{c}}Bh}E`{{En{Bh}}}}{{ClCl}E`}{{ClBh}E`}{{CnBh}E`}{{CnCn}E`}{{D`D`}E`}{{D`Bh}E`}{{AbAb}E`}{{{h{c}}{h{c}}}E`En}{{{B`{c}}{B`{c}}}E`{EnBb}}{{{B`{c}}c}E`{BbBfEn}}{{AfAf}E`}{{AfF`}E`}{{Af{Aj{Ah}}}E`}1{{Af{Bd{Ah}}}E`}{{DbDb}E`}{{BjBj}E`}{{DdDd}E`}{{DfDf}E`}{bb}{dd}{ff}{{{Bn{c}}Fb}FdFf}{{bFb}Fd}0{{dFb}Fd}0{{fFb}Fd}0{{CbFb}Fd}0{{CdFb}Fd}0{{CfFb}Fd}0{{AlFb}Fd}{{ChFb}Fd}0{{{Cj{c}}Fb}FdFf}{{ClFb}Fd}{{CnFb}Fd}{{D`Fb}Fd}{{AbFb}Fd}{{{h{c}}Fb}FdFf}{{{B`{c}}Fb}Fd{FfBbBf}}{{{B`{c}}Fb}Fd{FhBbBf}}{{AfFb}{{Fl{nFj}}}}0{{DbFb}Fd}0{{BjFb}Fd}0{{DdFb}Fd}0{{DfFb}Fd}0{bb}{dd}{ff}{cc{}}0{Fnd}11{G`Cb}22{EbCd}3{EbCf}44{EbCh}5555555{c{{B`{c}}}Bb}66666{{{Bd{Ah}}}Af}{{{Bd{Ah}}}Bj}{G`b}8{Fnf}{Efb}{Gbd}{Gbf}<3{c{{Bb{}{{Gd{c}}}}}`}{{{Bd{Ah}}}b}{{{Bd{Ah}}}d}{{{Bd{Ah}}}Cb}{{{Bd{Ah}}}Cd}{{{Bd{Ah}}}Cf}{{{Bd{Ah}}}Al}{{{Bd{Ah}}}Ch}{c{{Cj{e}}}{}Bb}{cCl{}}{cCn{}}{cD`{}}{cAf{}}{{{Bd{Ah}}}Bj}{{{Bd{Ah}}}Dd}{cDf{}}{{{Aj{Ah}}}{{Bl{{B`{c}}}}}Bb}{F`{{Fl{Afc}}}{}}{BhAf}{{{B`{c}}}cBb}{{bc}nGf}{{dc}nGf}{{fc}nGf}{{Cbc}nGf}{{Cdc}nGf}{{Cfc}nGf}{{Alc}nGf}{{Chc}nGf}{{{B`{c}}e}n{GhBb}Gf}{{Afc}nGf}{{Bjc}nGf}{{Ddc}nGf}{{Dfc}nGf}{ce{}{}}00000000000000000000{Af{{Bd{Ah}}}}{{{Cj{c}}}E`{{En{Bh}}}}{ClE`}{CnE`}{D`E`}{cE`{}}00000000000000000{{AdEfEf}n}`{{{h{c}}g}{{h{e}}}{}{}{{Gj{c}{{j{e}}}}}}`1{{dd}c{}}{{ff}c{}}{{{h{c}}c}e{{Gl{}{{j{}}}}Bf}{}}{{{h{c}}{h{c}}}e{{Gl{}{{j{}}}}}{}}{{dd}n}{{ff}n}{{{h{c}}c}n{GnBf}}{{{h{c}}{h{c}}}nGn}{{ddd}d}{{fff}f}{dd}{ff}{{{h{c}}}e{{H`{}{{j{}}}}}{}}{G`Cb}{EbCd}{EbCf}{AnAl}{EbCh}{EbCl}{BjCn}{BhD`}{{cc}{{h{c}}}{}}{{}{{B`{c}}}Bb}{{{Bd{Ah}}}Af}{BhBj}{{EbEb}Dd}{{EbEb}Df}{{{Aj{Ah}}}{{Fl{AfDb}}}}`{{{Cj{c}}}c{}}{{bb}{{Bl{Dh}}}}{{dd}{{Bl{Dh}}}}{{ff}{{Bl{Dh}}}}{{CbCb}{{Bl{Dh}}}}{{CdCd}{{Bl{Dh}}}}{{CfCf}{{Bl{Dh}}}}{{AlAl}{{Bl{Dh}}}}{{ChCh}{{Bl{Dh}}}}{{ClCl}{{Bl{Dh}}}}{{CnCn}{{Bl{Dh}}}}{{D`D`}{{Bl{Dh}}}}{{{B`{c}}{B`{c}}}{{Bl{Dh}}}{BbBfHbEn}}{{AfAf}{{Bl{Dh}}}}{{BjBj}{{Bl{Dh}}}}{{DdDd}{{Bl{Dh}}}}{{DfDf}{{Bl{Dh}}}}{{}{{`{{Hf{}{{Hd{Ch}}}}C`}}}}{{AdEfEfEfEf}n}{{{Aj{Ah}}}{{Bl{{Bb{}{{Gd{c}}}}}}}`}0{bb}{dd}{ff}{{bb}b}{{dd}d}{{ff}f}210{{{Bn{c}}c}{{Bn{c}}}{{Gl{}{{j{}}}}Bf}}{{{B`{c}}c}nBb}432{{{h{c}}{h{c}}}e{{Hh{}{{j{}}}}}{}}{{bb}n}{{dd}n}{{ff}n}{{{h{c}}{h{c}}}nHj}{b{{Bd{Ah}}}}{d{{Bd{Ah}}}}{f{{Bd{Ah}}}}{Cb{{Bd{Ah}}}}{Cd{{Bd{Ah}}}}{Cf{{Bd{Ah}}}}{Al{{Bd{Ah}}}}{Ch{{Bd{Ah}}}}{Af{{Bd{Ah}}}}{Bj{{Bd{Ah}}}}{Dd{{Bd{Ah}}}}{Df{{Bd{Ah}}}}{bG`}{dFn}{fFn}{df}{db}{bEf}{dEf}{fEf}{dGb}{fGb}{bd}{Cbd}{Cdd}{CbG`}<;{Dd{{Ed{EbEb}}}}{ce{}{}}00000000000000000000{{{Bb{}{{Gd{c}}}}}c`}{b{{Bd{Ah}}}}{d{{Bd{Ah}}}}{Cb{{Bd{Ah}}}}{Cd{{Bd{Ah}}}}{Cf{{Bd{Ah}}}}{Al{{Bd{Ah}}}}{Ch{{Bd{Ah}}}}{{{Cj{c}}}eBb{}}{Clc{}}{Cnc{}}{D`c{}}{Afc{}}{Bj{{Bd{Ah}}}}{Dd{{Bd{Ah}}}}{Dfc{}}{cHl{}}000000000000{CdEb}{CfEb}{ChEb}{CfBh}{ClBh}{CnBh}{D`Bh}{BjBh}{c{{Fl{e}}}{}{}}00000000000000000000000000000000000000000{cHn{}}00000000000000000000{Af{{Fl{nDb}}}}{{bb}b}{{dd}d}{{ff}f}210```````````````````````","c":[],"p":[[5,"F2Dot14",0],[5,"Fixed",0],[5,"F26Dot6",0],[5,"Point",0],[17,"Output"],[10,"Add",680],[1,"unit"],[10,"AddAssign",680],[6,"PenCommand",0],[10,"Pen",0],[5,"Tag",0],[1,"u8"],[1,"slice"],[5,"LongDateTime",0],[1,"i64"],[5,"BigEndian",0],[10,"Scalar",0],[1,"array"],[10,"Copy",681],[1,"u32"],[5,"Uint24",0],[6,"Option",682],[5,"BoundingBox",0],[10,"Clone",683],[5,"FWord",0],[5,"UfWord",0],[5,"GlyphId",0],[5,"NameId",0],[5,"Nullable",0],[5,"Offset16",0],[5,"Offset24",0],[5,"Offset32",0],[6,"InvalidTag",0],[5,"Version16Dot16",0],[5,"MajorMinor",0],[6,"Ordering",684],[10,"Ord",684],[10,"Eq",684],[10,"Compatible",0],[1,"bool"],[1,"u16"],[1,"tuple"],[1,"f32"],[10,"Default",685],[10,"Div",680],[10,"DivAssign",680],[10,"PartialEq",684],[1,"str"],[5,"Formatter",686],[8,"Result",686],[10,"Debug",686],[10,"Display",686],[5,"Error",686],[6,"Result",687],[1,"i32"],[1,"i16"],[1,"f64"],[17,"Raw"],[10,"Hasher",688],[10,"Hash",688],[10,"FnMut",689],[10,"Mul",680],[10,"MulAssign",680],[10,"Neg",680],[10,"PartialOrd",684],[17,"Item"],[10,"Iterator",690],[10,"Sub",680],[10,"SubAssign",680],[5,"String",691],[5,"TypeId",692],[10,"FixedSize",0],[15,"InvalidByte",663],[15,"ByteAfterSpace",663],[15,"QuadTo",666],[15,"CurveTo",666],[15,"MoveTo",666],[15,"LineTo",666]],"b":[[212,"impl-Compatible-for-Version16Dot16"],[213,"impl-Compatible%3C(u16,+u16)%3E-for-Version16Dot16"],[214,"impl-Compatible-for-MajorMinor"],[215,"impl-Compatible%3C(u16,+u16)%3E-for-MajorMinor"],[235,"impl-Div%3CT%3E-for-Point%3CT%3E"],[236,"impl-Div-for-Point%3CT%3E"],[239,"impl-DivAssign-for-Point%3CT%3E"],[240,"impl-DivAssign%3CT%3E-for-Point%3CT%3E"],[251,"impl-PartialEq-for-Nullable%3CT%3E"],[252,"impl-PartialEq%3Cu32%3E-for-Nullable%3CT%3E"],[253,"impl-PartialEq-for-Offset16"],[254,"impl-PartialEq%3Cu32%3E-for-Offset16"],[255,"impl-PartialEq%3Cu32%3E-for-Offset24"],[256,"impl-PartialEq-for-Offset24"],[257,"impl-PartialEq-for-Offset32"],[258,"impl-PartialEq%3Cu32%3E-for-Offset32"],[261,"impl-PartialEq-for-BigEndian%3CT%3E"],[262,"impl-PartialEq%3CT%3E-for-BigEndian%3CT%3E"],[263,"impl-PartialEq-for-Tag"],[264,"impl-PartialEq%3C%26str%3E-for-Tag"],[265,"impl-PartialEq%3C%26%5Bu8%5D%3E-for-Tag"],[266,"impl-PartialEq%3Cstr%3E-for-Tag"],[267,"impl-PartialEq%3C%5Bu8;+4%5D%3E-for-Tag"],[276,"impl-Display-for-F2Dot14"],[277,"impl-Debug-for-F2Dot14"],[278,"impl-Debug-for-Fixed"],[279,"impl-Display-for-Fixed"],[280,"impl-Debug-for-F26Dot6"],[281,"impl-Display-for-F26Dot6"],[282,"impl-Debug-for-FWord"],[283,"impl-Display-for-FWord"],[284,"impl-Display-for-UfWord"],[285,"impl-Debug-for-UfWord"],[286,"impl-Debug-for-GlyphId"],[287,"impl-Display-for-GlyphId"],[289,"impl-Display-for-NameId"],[290,"impl-Debug-for-NameId"],[297,"impl-Debug-for-BigEndian%3CT%3E"],[298,"impl-Display-for-BigEndian%3CT%3E"],[299,"impl-Display-for-Tag"],[300,"impl-Debug-for-Tag"],[301,"impl-Display-for-InvalidTag"],[302,"impl-Debug-for-InvalidTag"],[303,"impl-Debug-for-Uint24"],[304,"impl-Display-for-Uint24"],[305,"impl-Display-for-Version16Dot16"],[306,"impl-Debug-for-Version16Dot16"],[307,"impl-Display-for-MajorMinor"],[308,"impl-Debug-for-MajorMinor"],[433,"impl-Mul%3CT%3E-for-Point%3CT%3E"],[434,"impl-Mul-for-Point%3CT%3E"],[437,"impl-MulAssign%3CT%3E-for-Point%3CT%3E"],[438,"impl-MulAssign-for-Point%3CT%3E"]]}],\ ["fontconfig_parser",{"doc":"This crate provide parsing fontconfig file but not yet …","t":"FPPPPPPPPPPPPPPPPGPPPIPFPPPPIPPPPPPPFPPGGPPPPPPPPPPPPPPPFPFGPIPPPPPPFGGPPPPPPPGPGPPPPPPPPPPPPPPFGPPPPPPPPPPPPPPPPPPPPPPPPPPPFPPPIPPGPPPPPPPPPPPPPPPPPPGFPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPPGPGGPPPPPPPPFPFPIPPPPPPPPPPPPPPFPPPPPPPPPPPPPPPPPPPGFGGGPPPPPPPGPGPPPPPPPPPTTTTTTTTPPPOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONOHOOOOOOOOOOOOOOOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOO","n":["Alias","Alias","All","And","Antialias","Antialias","Any","Append","AppendLast","Aspect","Aspect","Assign","AssignReplace","AutoHint","AutoHint","Bgr","Binary","BinaryOp","Black","Bold","Book","Bool","Bool","CacheDir","CacheDir","Capability","Capability","Cecil","CharSet","CharSet","Charcell","Charset","Charset","Color","Color","Condensed","Config","Config","Config","ConfigPart","Constant","Constant","Contains","Contains","Cwd","Cwd","Decorative","Decorative","Default","Default","Default","Delete","DeleteAll","Demibold","Demilight","Description","Dir","Dir","DirData","DirPrefix","Divide","Double","Double","Dpi","Dpi","Dual","Dynamic","Dynamic","Edit","EditBinding","EditMode","Embeddedbitmap","Embeddedbitmap","Embolden","Embolden","Eq","Eq","Err","Error","Expanded","Expression","Extrabold","Extracondensed","Extraexpanded","Extralight","Family","Family","FamilyLang","FamilyLang","File","File","Floor","Font","Font","Font","FontConfig","FontMatch","Fontfeatures","Fontfeatures","Fontformat","Fontformat","Fonthashint","Fonthashint","Fontversion","Fontversion","Foundry","Foundry","FullName","FullName","FullNameLang","FullNameLang","Glob","GlobalAdvance","GlobalAdvance","Heavy","HintStyle","HintStyle","Hintfull","Hinting","Hinting","Hintmedium","Hintnone","Hintslight","If","Include","Include","Index","Index","Int","Int","Int","IntOrRange","InvalidFormat","IoError","Italic","Lang","Lang","LangSet","Lcddefault","Lcdfilter","Lcdfilter","Lcdlegacy","Lcdlight","Lcdnone","Less","Less","LessEq","LessEq","Light","List","ListOp","Match","Match","MatchTarget","Matrix","Matrix","Matrix","Medium","Minspace","Minspace","Minus","Mono","More","More","MoreEq","MoreEq","Namelang","Namelang","NoFontconfig","None","Normal","Not","NotContains","NotContains","NotEq","NotEq","Oblique","Ok","Or","Order","Order","Outline","Outline","ParseBoolError","ParseEnumError","ParseFloatError","ParseIntError","Pattern","Pattern","Pattern","Pattern","PixelSize","PixelSize","PixelSizeFixupFactor","PixelSizeFixupFactor","Plus","Postscriptname","Postscriptname","PrefixBehavior","Prepend","PrependFirst","Prgname","Prgname","Property","Property","PropertyKind","PropertyTarget","Proportional","Range","Range","Rasterizer","Rasterizer","Regular","Relative","Relative","RemapDir","RemapDir","RemapDirData","ResetDirs","Result","Rgb","Rgba","Rgba","Roman","Round","Same","Scalable","Scalable","Scale","Scale","ScalingNotNeeded","ScalingNotNeeded","Scan","Scan","SelectFont","SelectFont","Semibold","Semicondensed","Semiexpanded","Semilight","Simple","Size","Size","Slant","Slant","Spacing","Spacing","String","Strong","Style","Style","StyleLang","StyleLang","Ternary","TernaryOp","Test","TestCompare","TestQual","TestTarget","Thin","Times","Trunc","Ultracondensed","Ultraexpanded","Ultralight","Unary","UnaryOp","Unknown","Value","Vbgr","VerticalLayout","VerticalLayout","Vrgb","Weak","Weight","Weight","Width","Width","XDG_ENV","XDG_ENV","XDG_ENV","XDG_ENV","XDG_FALLBACK_PATH","XDG_FALLBACK_PATH","XDG_FALLBACK_PATH","XDG_FALLBACK_PATH","Xdg","Xdg","Xml","accept","accepts","alias","aliases","as_path","as_path","binding","blanks","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cache_dirs","calculate_path","calculate_path","calculate_path","calculate_path","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","compare","config","config_files","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","dirs","edits","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_str","from_str","from_str","from_str","from_str","from_str","from_str","from_str","from_str","from_str","from_str","from_str","from_str","from_str","get_value","ignore_missing","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","kind","make_property","matches","merge_config","mode","parse_config_parts","path","path","path","path","path","path","prefer","prefix","prefix","prefix","prefix","qual","rejects","remap_dirs","rescans","salt","salt","salt","salt","select_fonts","target","target","tests","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","value","value"],"q":[[0,"fontconfig_parser"],[813,"std::path"],[814,"std::path"],[815,"core::marker"],[816,"core::fmt"],[817,"core::fmt"],[818,"core::num::dec2flt"],[819,"core::str::error"],[820,"core::num::error"],[821,"roxmltree::parse"],[822,"alloc::string"],[823,"core::option"],[824,"alloc::vec"],[825,"core::result"],[826,"core::any"]],"d":["Alias elements provide a shorthand notation for the set of …","","","","Whether glyphs can be antialiased","Whether glyphs can be antialiased","","","","Stretches glyphs horizontally before hinting","Stretches glyphs horizontally before hinting","","","Use autohinter instead of normal hinter","Use autohinter instead of normal hinter","","","","","","","","<bool>false</bool>","","","List of layout capabilities in the font","List of layout capabilities in the font","","","This element holds at least one Value::Int element of an …","","Unicode chars encoded by the font","Unicode chars encoded by the font","Whether any glyphs have color","Whether any glyphs have color","","","","","","","<const>hintslight</const>","","","","","Whether the style is a decorative variant","Whether the style is a decorative variant","","","","","","","","","","","Final dir data","","","","<double>1.5</double>","Target dots per inch","Target dots per inch","","","","","","","Use the embedded bitmap instead of the outline","Use the embedded bitmap instead of the outline","Rasterizer should synthetically embolden the font","Rasterizer should synthetically embolden the font","","","Contains the error value","","","","","","","","Font family names","Font family names","Languages corresponding to each family","Languages corresponding to each family","The filename holding the font","The filename holding the font","","","","","","","List of the feature tags in OpenType to be enabled","List of the feature tags in OpenType to be enabled","String name of the font format","String name of the font format","Whether the font has hinting","Whether the font has hinting","Version number of the font","Version number of the font","Font foundry name","Font foundry name","Font full names (often includes style)","Font full names (often includes style)","Languages corresponding to each fullname","Languages corresponding to each fullname","","Use font global advance data (deprecated)","Use font global advance data (deprecated)","","Automatic hinting style","Automatic hinting style","","Whether the rasterizer should use hinting","Whether the rasterizer should use hinting","","","","","","","The index of the font within the file","The index of the font within the file","","<int>0</int>","","","","","","List of RFC-3066-style languages this font supports","List of RFC-3066-style languages this font supports","This element holds at least one Value::String element of a …","","Type of LCD filter","Type of LCD filter","","","","","","","","","","","","","","","","","","Eliminate leading from line spacing","Eliminate leading from line spacing","","","","","","","Language name to be used for the default value of …","Language name to be used for the default value of …","","","","","","","","","","Contains the success value","","Order number of the font","Order number of the font","Whether the glyphs are outlines","Whether the glyphs are outlines","","","","","","","","","Pixel size","Pixel size","","","","Font family name in PostScript","Font family name in PostScript","","","","String Name of the running program","String Name of the running program","","<name target="font">pixelsize</name>","","","","This element holds the two Value::Int elements of a range …","","Which rasterizer is in use (deprecated)","Which rasterizer is in use (deprecated)","","","","This element contains a directory name where will be …","","Final remap-dirs data","","","","unknown, rgb, bgr, vrgb, vbgr, none - subpixel geometry","unknown, rgb, bgr, vrgb, vbgr, none - subpixel geometry","","","","Whether glyphs can be scaled","Whether glyphs can be scaled","Scale factor for point->pixel conversions (deprecated)","Scale factor for point->pixel conversions (deprecated)","","","","","","","","","","","","Point size","Point size","Italic, oblique or roman","Italic, oblique or roman","Proportional, dual-width, monospace or charcell","Proportional, dual-width, monospace or charcell","<string>str</string>","","Font style. Overrides weight and slant","Font style. Overrides weight and slant","Languages corresponding to each style","Languages corresponding to each style","","","This element contains a single value which is compared …","","","","","","","","","","","","","Runtime typed fontconfig value","","Automatic hinting style","Automatic hinting style","","","Light, medium, demibold, bold or black","Light, medium, demibold, bold or black","Condensed, normal or expanded","Condensed, normal or expanded","Environment variable name which used xdg prefix","Environment variable name which used xdg prefix","Environment variable name which used xdg prefix","Environment variable name which used xdg prefix","Fallback path when XDG_ENV is not exists","Fallback path when XDG_ENV is not exists","Fallback path when XDG_ENV is not exists","Fallback path when XDG_ENV is not exists","","","","<accept>","","alias name","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Calculate actual path","Calculate actual path","Calculate actual path","Calculate actual path","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","<default>","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Returns the argument unchanged.","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","Parse as raw config parts use this when you want custom …","","","","","dir path","dir path will be mapped as the path as-path in cached …","<prefer>","","","","","","","","","","","‘salt’ property affects to determine cache filename. …","‘salt’ property affects to determine cache filename. …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,13,23,30,26,27,23,19,19,26,27,19,19,26,27,11,34,0,11,11,11,0,36,0,13,26,27,31,0,36,11,26,27,26,27,11,0,61,13,0,0,36,22,32,61,12,26,27,12,21,35,19,19,11,11,13,0,13,0,0,30,0,36,26,27,11,26,27,0,0,0,26,27,26,27,22,32,55,0,11,0,11,11,11,11,26,27,26,27,26,27,31,21,25,35,0,0,26,27,26,27,26,27,26,27,26,27,26,27,26,27,29,26,27,11,26,27,11,26,27,11,11,11,33,0,13,26,27,0,36,37,0,40,40,11,26,27,36,11,26,27,11,11,11,22,32,22,32,11,34,0,0,13,0,26,27,34,11,26,27,30,11,22,32,22,32,26,27,40,11,11,31,22,32,22,32,11,55,30,26,27,26,27,40,40,40,40,21,25,29,35,26,27,26,27,30,26,27,0,19,19,26,27,0,36,0,0,11,36,37,26,27,11,61,12,0,13,0,13,0,11,26,27,11,31,18,26,27,26,27,26,27,21,25,0,13,11,11,11,11,34,26,27,26,27,26,27,36,18,26,27,26,27,34,0,0,0,0,0,11,30,31,11,11,11,34,0,11,0,11,26,27,11,18,26,27,26,27,1,6,7,8,1,6,7,8,61,12,40,9,28,9,14,8,16,17,10,61,40,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,61,40,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,14,1,6,7,8,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,20,14,14,9,10,1,6,7,8,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,35,9,14,24,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,40,40,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,61,40,40,40,40,40,40,9,10,11,1,6,7,8,12,13,13,13,13,13,13,13,13,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,34,35,36,36,36,36,36,36,36,36,36,37,11,12,18,19,21,22,23,25,27,30,31,32,33,35,11,7,61,40,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,26,27,14,14,17,0,1,6,7,8,15,16,9,1,6,7,8,20,28,14,10,1,8,15,16,14,20,24,24,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,40,61,40,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,61,40,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,61,40,9,10,11,1,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,17,20],"f":"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{ce{}{}}000000000000000000000000000000000000000000000000000000000000000000000`{{bc}d{{h{f}}j}}{{lc}d{{h{f}}j}}{{nc}d{{h{f}}j}}{{A`c}d{{h{f}}j}}{AbAb}{AdAd}{AfAf}{bb}{ll}{nn}{A`A`}{AhAh}{AjAj}{AlAl}{AnAn}{B`B`}{BbBb}{BdBd}{BfBf}{BhBh}{BjBj}{BlBl}{BnBn}{C`C`}{CbCb}{CdCd}{CfCf}{ChCh}{CjCj}{ClCl}{CnCn}{D`D`}{DbDb}{DdDd}{DfDf}{DhDh}{DjDj}{{ce}Dl{}{}}00000000000000000000000000000000```{{}Ab}{{}Ad}{{}b}{{}l}{{}n}{{}A`}{{}Ah}{{}Al}{{}An}{{}B`}{{}Bb}{{}Bd}{{}Bf}{{}Bh}{{}Bj}{{}Bl}{{}Bn}{{}C`}{{}Cb}{{}Cd}{{}Cf}{{}Ch}{{}Df}```{{AbAb}Dn}{{AdAd}Dn}{{AfAf}Dn}{{bb}Dn}{{ll}Dn}{{nn}Dn}{{A`A`}Dn}{{AhAh}Dn}{{AjAj}Dn}{{AlAl}Dn}{{AnAn}Dn}{{B`B`}Dn}{{BbBb}Dn}{{BdBd}Dn}{{BfBf}Dn}{{BhBh}Dn}{{BjBj}Dn}{{BlBl}Dn}{{BnBn}Dn}{{C`C`}Dn}{{CbCb}Dn}{{CdCd}Dn}{{CfCf}Dn}{{ChCh}Dn}{{CjCj}Dn}{{ClCl}Dn}{{CnCn}Dn}{{D`D`}Dn}{{DbDb}Dn}{{DdDd}Dn}{{DfDf}Dn}{{DhDh}Dn}{{DjDj}Dn}{{E`Eb}Ed}0{{AbEb}Ed}{{AdEb}Ed}{{AfEb}Ed}{{bEb}Ed}{{lEb}Ed}{{nEb}Ed}{{A`Eb}Ed}{{AhEb}Ed}{{AjEb}Ed}{{AlEb}Ed}{{AnEb}Ed}{{B`Eb}Ed}{{BbEb}Ed}{{BdEb}Ed}{{BfEb}Ed}{{BhEb}Ed}{{BjEb}Ed}{{BlEb}Ed}{{BnEb}Ed}{{C`Eb}Ed}{{CbEb}Ed}{{CdEb}Ed}{{CfEb}Ed}{{ChEb}Ed}{{CjEb}Ed}{{ClEb}Ed}{{CnEb}Ed}{{D`Eb}Ed}{{DbEb}Ed}{{DdEb}Ed}{{DfEb}Ed}{{DhEb}Ed}{{DjEb}Ed}{cc{}}0{EfE`}{EhE`}{EjE`}{ElE`}{EnE`}55555555{C`Aj}{AbAj}{bAj}{lAj}9{AdAj}{nAj}{A`Aj}{ChAj}====================={cDd{}}>{F`Dh}{FbDh}{{{Fd{DfCf}}}Dh}{FfDh}{FhDh}{FjDh}{cc{}}{AfDh}{FlDh}2{Fb{{Fn{Af}}}}{Fb{{Fn{Ah}}}}{Fb{{Fn{Bd}}}}{Fb{{Fn{Bf}}}}{Fb{{Fn{Bj}}}}{Fb{{Fn{Bl}}}}{Fb{{Fn{Bn}}}}{Fb{{Fn{Cb}}}}{Fb{{Fn{Cf}}}}{Fb{{Fn{Cl}}}}{Fb{{Fn{Cn}}}}{Fb{{Fn{D`}}}}{Fb{{Fn{Db}}}}{Fb{{Fn{Df}}}}{{AfCf}{{Gb{G`}}}}`{ce{}{}}0000000000000000000000000000000000{CdCf}{{CfDd}Cd}`{{Alc}{{Fn{Dl}}}{{h{f}}j}}`{Fb{{Fn{{Gd{Aj}}}}}}```````````````````````444444444444444444444444444444444{cFl{}}{c{{Gf{e}}}{}{}}000000000000000000000000000000000000000000000000000000000000000000000{cGh{}}0000000000000000000000000000000000``","c":[],"p":[[5,"Dir",0],[5,"PathBuf",813],[5,"Path",813],[10,"AsRef",814],[10,"Sized",815],[5,"CacheDir",0],[5,"Include",0],[5,"RemapDir",0],[5,"Alias",0],[5,"Config",0],[6,"Constant",0],[6,"DirPrefix",0],[6,"ConfigPart",0],[5,"FontConfig",0],[5,"DirData",0],[5,"RemapDirData",0],[5,"Edit",0],[6,"EditBinding",0],[6,"EditMode",0],[5,"Test",0],[6,"TestTarget",0],[6,"TestCompare",0],[6,"TestQual",0],[5,"Match",0],[6,"MatchTarget",0],[6,"Property",0],[6,"PropertyKind",0],[5,"SelectFont",0],[6,"FontMatch",0],[6,"ListOp",0],[6,"UnaryOp",0],[6,"BinaryOp",0],[6,"TernaryOp",0],[6,"Expression",0],[6,"PropertyTarget",0],[6,"Value",0],[6,"IntOrRange",0],[1,"unit"],[1,"bool"],[6,"Error",0],[5,"Formatter",816],[8,"Result",816],[5,"Error",817],[5,"ParseFloatError",818],[5,"ParseBoolError",819],[5,"ParseIntError",820],[6,"Error",821],[8,"Double",0],[1,"str"],[1,"tuple"],[8,"CharSet",0],[8,"Bool",0],[8,"Int",0],[5,"String",822],[8,"Result",0],[1,"u32"],[6,"Option",823],[5,"Vec",824],[6,"Result",825],[5,"TypeId",826],[6,"PrefixBehavior",0]],"b":[[500,"impl-Debug-for-Error"],[501,"impl-Display-for-Error"],[537,"impl-From%3CError%3E-for-Error"],[538,"impl-From%3CParseFloatError%3E-for-Error"],[539,"impl-From%3CParseBoolError%3E-for-Error"],[540,"impl-From%3CParseIntError%3E-for-Error"],[541,"impl-From%3CError%3E-for-Error"],[550,"impl-From%3CMatch%3E-for-ConfigPart"],[551,"impl-From%3CAlias%3E-for-ConfigPart"],[552,"impl-From%3CDir%3E-for-ConfigPart"],[553,"impl-From%3CCacheDir%3E-for-ConfigPart"],[555,"impl-From%3CConfig%3E-for-ConfigPart"],[556,"impl-From%3CInclude%3E-for-ConfigPart"],[557,"impl-From%3CRemapDir%3E-for-ConfigPart"],[558,"impl-From%3CSelectFont%3E-for-ConfigPart"],[582,"impl-From%3Cf64%3E-for-Value"],[583,"impl-From%3C%26str%3E-for-Value"],[584,"impl-From%3C(PropertyTarget,+PropertyKind)%3E-for-Value"],[585,"impl-From%3CVec%3CIntOrRange%3E%3E-for-Value"],[586,"impl-From%3Cbool%3E-for-Value"],[587,"impl-From%3Cu32%3E-for-Value"],[589,"impl-From%3CConstant%3E-for-Value"],[590,"impl-From%3CString%3E-for-Value"]]}],\ ["fontdb",{"doc":"fontdb is a simple, in-memory font database with CSS-like …","t":"PPPPPPPPPPPPPPPPPPPPPPPPTTPPPPPPPPPPPPPPPPPPPPPPPPFPPPTTPPPPPPPPPPPPPPPPPPPPFGPPPPPPPPPPPPPPPPPPPPPPPPPPFPPPPPPPPPPPPPPPPPPPTGPPPPPTPPPPPPPPPPPPTPPPPPPPPPPPPPPPPPFPPPTPPPPPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPPPPPPPPPPPGGPPPTPPPPPPPPPPPPPPPPPPPFPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNPPNNNNNNNNONNNNONNNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOON","n":["Afrikaans_SouthAfrica","Albanian_Albania","Alsatian_France","Amharic_Ethiopia","Arabic_Algeria","Arabic_Bahrain","Arabic_Egypt","Arabic_Iraq","Arabic_Jordan","Arabic_Kuwait","Arabic_Lebanon","Arabic_Libya","Arabic_Morocco","Arabic_Oman","Arabic_Qatar","Arabic_SaudiArabia","Arabic_Syria","Arabic_Tunisia","Arabic_UAE","Arabic_Yemen","Armenian_Armenia","Assamese_India","Azeri_Cyrillic_Azerbaijan","Azeri_Latin_Azerbaijan","BLACK","BOLD","Bashkir_Russia","Basque_Basque","Belarusian_Belarus","Bengali_Bangladesh","Bengali_India","Binary","Bosnian_Cyrillic_BosniaAndHerzegovina","Bosnian_Latin_BosniaAndHerzegovina","Breton_France","Bulgarian_Bulgaria","Catalan_Catalan","Chinese_HongKongSAR","Chinese_MacaoSAR","Chinese_PeoplesRepublicOfChina","Chinese_Singapore","Chinese_Taiwan","Condensed","Corsican_France","Croatian_Croatia","Croatian_Latin_BosniaAndHerzegovina","Cursive","Czech_CzechRepublic","Danish_Denmark","Dari_Afghanistan","Database","Divehi_Maldives","Dutch_Belgium","Dutch_Netherlands","EXTRA_BOLD","EXTRA_LIGHT","English_Australia","English_Belize","English_Canada","English_Caribbean","English_India","English_Ireland","English_Jamaica","English_Malaysia","English_NewZealand","English_RepublicOfThePhilippines","English_Singapore","English_SouthAfrica","English_TrinidadAndTobago","English_UnitedKingdom","English_UnitedStates","English_Zimbabwe","Estonian_Estonia","Expanded","ExtraCondensed","ExtraExpanded","FaceInfo","Family","Fantasy","Faroese_FaroeIslands","File","Filipino_Philippines","Finnish_Finland","French_Belgium","French_Canada","French_France","French_Luxembourg","French_PrincipalityOfMonaco","French_Switzerland","Frisian_Netherlands","Galician_Galician","Georgian_Georgia","German_Austria","German_Germany","German_Liechtenstein","German_Luxembourg","German_Switzerland","Greek_Greece","Greenlandic_Greenland","Gujarati_India","Hausa_Latin_Nigeria","Hebrew_Israel","Hindi_India","Hungarian_Hungary","ID","Icelandic_Iceland","Igbo_Nigeria","Indonesian_Indonesia","Inuktitut_Canada","Inuktitut_Latin_Canada","Irish_Ireland","Italian_Italy","Italian_Switzerland","Italic","Japanese_Japan","Kannada_India","Kazakh_Kazakhstan","Khmer_Cambodia","Kiche_Guatemala","Kinyarwanda_Rwanda","Kiswahili_Kenya","Konkani_India","Korean_Korea","Kyrgyz_Kyrgyzstan","LIGHT","Language","Lao_LaoPDR","Latvian_Latvia","Lithuanian_Lithuania","LowerSorbian_Germany","Luxembourgish_Luxembourg","MEDIUM","Macedonian_NorthMacedonia","Malay_BruneiDarussalam","Malay_Malaysia","Malayalam_India","Maltese_Malta","Maori_NewZealand","Mapudungun_Chile","Marathi_India","Mohawk_Mohawk","Mongolian_Cyrillic_Mongolia","Mongolian_Traditional_PeoplesRepublicOfChina","Monospace","NORMAL","Name","Nepali_Nepal","Normal","Normal","Norwegian_Bokmal_Norway","Norwegian_Nynorsk_Norway","Oblique","Occitan_France","Odia_India","Pashto_Afghanistan","Polish_Poland","Portuguese_Brazil","Portuguese_Portugal","Punjabi_India","Quechua_Bolivia","Quechua_Ecuador","Quechua_Peru","Query","Romanian_Romania","Romansh_Switzerland","Russian_Russia","SEMIBOLD","Sami_Inari_Finland","Sami_Lule_Norway","Sami_Lule_Sweden","Sami_Northern_Finland","Sami_Northern_Norway","Sami_Northern_Sweden","Sami_Skolt_Finland","Sami_Southern_Norway","Sami_Southern_Sweden","SansSerif","Sanskrit_India","SemiCondensed","SemiExpanded","Serbian_Cyrillic_BosniaAndHerzegovina","Serbian_Cyrillic_Serbia","Serbian_Latin_BosniaAndHerzegovina","Serbian_Latin_Serbia","Serif","SesothoSaLeboa_SouthAfrica","Setswana_SouthAfrica","SharedFile","Sinhala_SriLanka","Slovak_Slovakia","Slovenian_Slovenia","Source","Spanish_Argentina","Spanish_Bolivia","Spanish_Chile","Spanish_Colombia","Spanish_CostaRica","Spanish_DominicanRepublic","Spanish_Ecuador","Spanish_ElSalvador","Spanish_Guatemala","Spanish_Honduras","Spanish_Mexico","Spanish_ModernSort_Spain","Spanish_Nicaragua","Spanish_Panama","Spanish_Paraguay","Spanish_Peru","Spanish_PuertoRico","Spanish_TraditionalSort_Spain","Spanish_UnitedStates","Spanish_Uruguay","Spanish_Venezuela","Stretch","Style","Swedish_Finland","Swedish_Sweden","Syriac_Syria","THIN","Tajik_Cyrillic_Tajikistan","Tamazight_Latin_Algeria","Tamil_India","Tatar_Russia","Telugu_India","Thai_Thailand","Tibetan_PRC","Turkish_Turkey","Turkmen_Turkmenistan","Uighur_PRC","Ukrainian_Ukraine","UltraCondensed","UltraExpanded","Unknown","UpperSorbian_Germany","Urdu_IslamicRepublicOfPakistan","Uzbek_Cyrillic_Uzbekistan","Uzbek_Latin_Uzbekistan","Vietnamese_Vietnam","Weight","Welsh_UnitedKingdom","Wolof_Senegal","Yakut_Russia","Yi_PRC","Yoruba_Nigeria","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","default","default","default","default","default","default","dummy","eq","eq","eq","eq","eq","eq","eq","face","face_source","faces","families","families","family_name","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","hash","hash","hash","hash","hash","hash","id","index","into","into","into","into","into","into","into","into","into","into","is_empty","isiXhosa_SouthAfrica","isiZulu_SouthAfrica","len","load_font_data","load_font_file","load_font_source","load_fonts_dir","load_system_fonts","make_face_data_unshared","make_shared_face_data","monospaced","new","partial_cmp","partial_cmp","partial_cmp","post_script_name","primary_language","push_face_info","query","region","remove_face","set_cursive_family","set_fantasy_family","set_monospace_family","set_sans_serif_family","set_serif_family","source","stretch","stretch","style","style","to_number","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","weight","weight","with_face_data"],"q":[[0,"fontdb"],[425,"core::cmp"],[426,"core::option"],[427,"core::iter::traits::iterator"],[428,"core::fmt"],[429,"core::fmt"],[430,"core::hash"],[431,"alloc::vec"],[432,"std::io::error"],[433,"std::path"],[434,"core::convert"],[435,"tinyvec::tinyvec"],[436,"alloc::sync"],[437,"alloc::string"],[438,"core::convert"],[439,"core::ops::function"]],"d":["","","","","","","","","","","","","","","","","","","","","","","","","Black weight (900), the thickest value.","Bold weight (700).","","","","","","A font’s raw data, typically backed by a Vec.","","","","","","","","","","","","","","","Glyphs in cursive fonts generally use a more informal …","","","","A font database.","","","","Extra-bold weight (800).","Extra light weight (200).","","","","","","","","","","","","","","","","","","","","","A single font face info.","A font family.","Fantasy fonts are primarily decorative or expressive fonts …","","A font’s path.","","","","","","","","","","","","","","","","","","","","","","","","A unique per database face ID.","","","","","","","","","A form that is generally cursive in nature.","","","","","","","","","","","Light weight (300).","A Name language.","","","","","","Medium weight (500, higher than normal).","","","","","","","","","","","","The sole criterion of a monospace font is that all glyphs …","Normal (400).","The name of a font family of choice.","","A face that is neither italic not obliqued.","","","","A typically-sloped version of the regular face.","","","","","","","","","","","A database query.","","","","Semibold weight (600).","","","","","","","","","","Glyphs in sans-serif fonts, as the term is used in CSS, …","","","","","","","","Serif fonts represent the formal text style for a script.","","","A font’s raw data originating from a shared file mapping.","","","","A font source.","","","","","","","","","","","","","","","","","","","","","","A face width.","Allows italic or oblique faces to be selected.","","","","Thin weight (100), the thinnest value.","","","","","","","","","","","","","","","","","","","","Specifies the weight of glyphs in the font, their degree …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Creates a dummy ID.","","","","","","","","Selects a FaceInfo by id.","Returns font face storage and the face index by ID.","Returns an iterator over the internal storage.","A list of family names.","A prioritized list of font family names or generic family …","Returns the generic family name or the Family::Name itself.","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","An unique ID.","A face index in the source.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if the Database contains no font faces.","","","Returns the number of font faces in the Database.","Loads a font data into the Database.","Loads a font file into the Database.","Loads a font from the given source into the Database and …","Loads font files from the selected directory into the …","Attempts to load system fonts.","Transfers ownership of shared font data back to the font …","Makes the font data that backs the specified face id …","Indicates that the font face is monospaced.","Create a new, empty Database.","","","","A PostScript name.","Returns the primary language.","Pushes a user-provided FaceInfo to the database.","Performs a CSS-like query and returns the best matched …","Returns a language region.","Removes a font face by id from the database.","Sets the family that will be used by Family::Cursive.","Sets the family that will be used by Family::Fantasy.","Sets the family that will be used by Family::Monospace.","Sets the family that will be used by Family::SansSerif.","Sets the family that will be used by Family::Serif.","A font source.","A font face stretch.","Selects a normal, condensed, or expanded face from a font …","A font face style.","Allows italic or oblique faces to be selected.","Returns a numeric representation of a width.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A font face weight.","Specifies the weight of glyphs in the font, their degree …","Executes a closure with a font’s data."],"i":[9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,9,9,9,9,9,4,9,9,9,9,9,9,9,9,9,9,10,9,9,9,6,9,9,9,0,9,9,9,7,7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,0,0,6,9,4,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,9,9,9,9,9,9,9,9,8,9,9,9,9,9,9,9,9,9,9,7,0,9,9,9,9,9,7,9,9,9,9,9,9,9,9,9,9,9,6,7,6,9,8,10,9,9,8,9,9,9,9,9,9,9,9,9,9,0,9,9,9,7,9,9,9,9,9,9,9,9,9,6,9,10,10,9,9,9,9,6,9,9,4,9,9,9,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,9,9,9,7,9,9,9,9,9,9,9,9,9,9,9,10,10,9,9,9,9,9,9,0,9,9,9,9,9,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,7,10,1,2,5,7,8,10,1,1,5,6,7,8,9,10,2,2,2,3,5,2,1,1,2,3,4,5,6,7,8,9,9,10,1,2,3,4,5,6,7,8,9,10,1,5,6,7,8,10,3,3,1,2,3,4,5,6,7,8,9,10,2,9,9,2,2,2,2,2,2,2,2,3,2,1,7,10,3,9,2,2,9,2,2,2,2,2,2,3,3,5,3,5,10,1,2,3,4,5,6,7,8,9,10,1,9,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,3,5,2],"f":"````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{ce{}{}}0000000000000000000{bb}{dd}{ff}{hh}{jj}{ll}{nn}{A`A`}{AbAb}{AdAd}{{ce}Af{}{}}000000000{{bb}Ah}{{nn}Ah}{{AdAd}Ah}{{}b}{{}d}{{}j}{{}n}{{}A`}{{}Ad}5{{bb}Aj}{{jj}Aj}{{ll}Aj}{{nn}Aj}{{A`A`}Aj}{{AbAb}Aj}{{AdAd}Aj}{{db}{{Al{f}}}}{{db}{{Al{{B`{hAn}}}}}}{d{{`{{Bd{}{{Bb{f}}}}}}}}``{{dl}Bf}{{bBh}Bj}0{{dBh}Bj}{{fBh}Bj}{{hBh}Bj}{{jBh}Bj}{{lBh}Bj}{{nBh}Bj}{{A`Bh}Bj}{{AbBh}{{Bn{AfBl}}}}0{{AdBh}{{Bn{AfBl}}}}{cc{}}000000000{{bc}AfC`}{{jc}AfC`}{{lc}AfC`}{{nc}AfC`}{{A`c}AfC`}{{Adc}AfC`}``{ce{}{}}000000000{dAj}``{dCb}{{d{Cf{Cd}}}Af}{{dc}{{Bn{AfCh}}}{{Cl{Cj}}}}{{dh}{{D`{{Cn{b}}}}}}{{dc}Af{{Cl{Cj}}}}{dAf}{{db}Af}{{db}{{Al{{B`{{Db{Cl}}An}}}}}}`{{}d}{{bb}{{Al{Ah}}}}{{nn}{{Al{Ah}}}}{{AdAd}{{Al{Ah}}}}`{AbBf}{{df}Af}{{dj}{{Al{b}}}}28{{dc}Af{{Df{Dd}}}}0000`````{AdDh}{ce{}{}}000000000{cDd{}}0{c{{Bn{e}}}{}{}}0000000000000000000{cDj{}}000000000``{{dbe}{{Al{c}}}{}{{E`{{Dl{Cd}}An}{{Dn{c}}}}}}","c":[],"p":[[5,"ID",0],[5,"Database",0],[5,"FaceInfo",0],[6,"Source",0],[5,"Query",0],[6,"Family",0],[5,"Weight",0],[6,"Style",0],[6,"Language",0],[6,"Stretch",0],[1,"unit"],[6,"Ordering",425],[1,"bool"],[6,"Option",426],[1,"u32"],[1,"tuple"],[17,"Item"],[10,"Iterator",427],[1,"str"],[5,"Formatter",428],[8,"Result",428],[5,"Error",428],[6,"Result",429],[10,"Hasher",430],[1,"usize"],[1,"u8"],[5,"Vec",431],[5,"Error",432],[5,"Path",433],[10,"AsRef",434],[1,"array"],[6,"TinyVec",435],[5,"Arc",436],[5,"String",437],[10,"Into",434],[1,"u16"],[5,"TypeId",438],[1,"slice"],[17,"Output"],[10,"FnOnce",439]],"b":[[307,"impl-Debug-for-ID"],[308,"impl-Display-for-ID"],[316,"impl-Display-for-Language"],[317,"impl-Debug-for-Language"]]}],\ @@ -13,6 +17,8 @@ var searchIndex = new Map(JSON.parse('[\ ["proc_macro2",{"doc":"github crates-io docs-rs","t":"PPPGFPFPPFFPPPFPGFFGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNNNNNNNNFENNNNNNNNNNNNNN","n":["Alone","Brace","Bracket","Delimiter","Group","Group","Ident","Ident","Joint","LexError","Literal","Literal","None","Parenthesis","Punct","Punct","Spacing","Span","TokenStream","TokenTree","as_char","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","byte_character","byte_string","c_string","call_site","character","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","default","delim_span","delimiter","eq","eq","eq","eq","extend","extend","extra","f32_suffixed","f32_unsuffixed","f64_suffixed","f64_unsuffixed","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_iter","from_iter","from_str","from_str","hash","i128_suffixed","i128_unsuffixed","i16_suffixed","i16_unsuffixed","i32_suffixed","i32_unsuffixed","i64_suffixed","i64_unsuffixed","i8_suffixed","i8_unsuffixed","into","into","into","into","into","into","into","into","into","into","into_iter","is_empty","isize_suffixed","isize_unsuffixed","join","located_at","mixed_site","new","new","new","new","new_raw","partial_cmp","resolved_at","set_span","set_span","set_span","set_span","set_span","source_text","spacing","span","span","span","span","span","span","span_close","span_open","stream","string","subspan","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","to_string","to_string","to_string","token_stream","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","u128_suffixed","u128_unsuffixed","u16_suffixed","u16_unsuffixed","u32_suffixed","u32_unsuffixed","u64_suffixed","u64_unsuffixed","u8_suffixed","u8_unsuffixed","unwrap","usize_suffixed","usize_unsuffixed","DelimSpan","borrow","borrow_mut","clone","clone_into","close","fmt","from","into","join","open","to_owned","try_from","try_into","type_id","IntoIter","TokenStream","borrow","borrow_mut","clone","clone_into","fmt","from","into","into_iter","next","size_hint","to_owned","try_from","try_into","type_id"],"q":[[0,"proc_macro2"],[230,"proc_macro2::extra"],[245,"proc_macro2::token_stream"],[261,"core::ffi::c_str"],[262,"core::cmp"],[263,"core::marker"],[264,"core::convert"],[265,"core::iter::traits::collect"],[266,"core::fmt"],[267,"core::fmt"],[268,"proc_macro"],[269,"core::hash"],[270,"core::option"],[271,"alloc::string"],[272,"core::ops::range"],[273,"core::any"]],"d":["E.g. + is Alone in + =, +ident or +().","{ ... }","[ ... ]","Describes how a sequence of token trees is delimited.","A delimited token stream.","A token stream surrounded by bracket delimiters.","A word of Rust code, which may be a keyword or legal …","An identifier.","E.g. + is Joint in += or ' is Joint in '#.","Error returned from TokenStream::from_str.","A literal string ("hello"), byte string (b"hello"), …","A literal character ('a'), string ("hello"), number (2.3), …","∅ ... ∅","( ... )","A Punct is a single punctuation character like +, - or #.","A single punctuation character (+, ,, $, etc.).","Whether a Punct is followed immediately by another Punct …","A region of source code, along with macro expansion …","An abstract stream of tokens, or more concretely a …","A single token or a delimited sequence of token trees …","Returns the value of this punctuation character as char.","","","","","","","","","","","","","","","","","","","","","Byte character literal.","Byte string literal.","C string literal.","The span of the invocation of the current procedural macro.","Character literal.","","","","","","","","","","","","","","","","","","","","","Returns an object that holds this group’s span_open() and","Returns the punctuation used as the delimiter for this …","","","","","","","Items which do not have a correspondence to any API in the …","Creates a new suffixed floating-point literal.","Creates a new unsuffixed floating-point literal.","Creates a new suffixed floating-point literal.","Creates a new unsuffixed floating-point literal.","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Checks if this TokenStream is empty.","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Create a new span encompassing self and other.","Creates a new span with the same name resolution behavior …","The span located at the invocation of the procedural …","Returns an empty TokenStream containing no token trees.","Creates a new Group with the given delimiter and token …","Creates a new Punct from the given character and spacing.","Creates a new Ident with the given string as well as the …","Same as Ident::new, but creates a raw identifier (r#ident…","","Creates a new span with the same line/column information …","Configures the span for only this token.","Configures the span for this Group’s delimiters, but not …","Configure the span for this punctuation character.","Configures the span of this Ident, possibly changing its …","Configures the span associated for this literal.","Returns the source text behind a span. This preserves the …","Returns the spacing of this punctuation character, …","","Returns the span of this tree, delegating to the span …","Returns the span for the delimiters of this token stream, …","Returns the span for this punctuation character.","Returns the span of this Ident.","Returns the span encompassing this literal.","Returns the span pointing to the closing delimiter of this …","Returns the span pointing to the opening delimiter of this …","Returns the TokenStream of tokens that are delimited in …","String literal.","Returns a Span that is a subset of self.span() containing …","","","","","","","","","","","","","","","","","Public implementation details for the TokenStream type, …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","Convert proc_macro2::Span to proc_macro::Span.","Creates a new suffixed integer literal with the specified …","Creates a new unsuffixed integer literal with the …","An object that holds a Group’s span_open() and …","","","","","Returns a span for the closing punctuation of the group …","","Returns the argument unchanged.","Calls U::from(self).","Returns a span covering the entire delimited group.","Returns a span for the opening punctuation of the group …","","","","","An iterator over TokenStream’s TokenTrees.","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","",""],"i":[12,11,11,0,0,9,0,9,12,0,0,9,11,11,0,9,0,0,0,0,1,25,8,7,9,10,11,1,12,13,4,25,8,7,9,10,11,1,12,13,4,4,4,4,7,4,8,7,9,10,11,1,12,13,4,8,7,9,10,11,1,12,13,4,13,8,10,10,11,12,13,13,8,8,0,4,4,4,4,25,25,8,8,7,9,9,10,10,11,1,1,12,13,13,4,4,25,8,8,8,7,7,9,9,9,9,9,10,11,1,12,13,4,8,8,8,4,13,4,4,4,4,4,4,4,4,4,4,25,8,7,9,10,11,1,12,13,4,8,8,4,4,7,7,7,8,10,1,13,13,13,7,9,10,1,13,4,7,1,25,9,10,1,13,4,10,10,10,4,4,8,7,9,10,11,1,12,13,4,25,8,9,10,1,13,4,0,25,8,7,9,10,11,1,12,13,4,25,8,7,9,10,11,1,12,13,4,25,8,7,9,10,11,1,12,13,4,4,4,4,4,4,4,4,4,4,4,7,4,4,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,37,37,37,37,37,37,37,37,37,37,37,37,37,37],"f":"````````````````````{bd}{ce{}{}}0000000000000000000{fh}{{{j{f}}}h}{lh}{{}n}{dh}{A`A`}{nn}{AbAb}{AdAd}{AfAf}{bb}{AhAh}{AjAj}{hh}{{ce}Al{}{}}00000000{{AjAj}An}{{}A`}{AdB`}{AdAf}{{AfAf}Bb}{{AhAh}Bb}{{AjAj}Bb}{{Ajc}Bb{Bd{Bh{Bf}}}}{{A`c}Al{{Bl{}{{Bj{A`}}}}}}{{A`c}Al{{Bl{}{{Bj{Ab}}}}}}`{Bnh}0{C`h}0{{CbCd}Cf}0{{A`Cd}Cf}0{{nCd}Cf}{{AbCd}Cf}0{{AdCd}Cf}0{{AfCd}Cf}{{bCd}Cf}0{{AhCd}Cf}{{AjCd}Cf}0{{hCd}Cf}0{cc{}}{ChA`}{AbA`}22{Cjn}{AjAb}{hAb}5{bAb}{AdAb}777777{cA`{{Bl{}{{Bj{A`}}}}}}{cA`{{Bl{}{{Bj{Ab}}}}}}{Bf{{Cl{A`Cb}}}}{Bf{{Cl{hCb}}}}{{Ajc}AlCn}{D`h}0{Dbh}0{Ddh}0{Dfh}0{Dhh}0{ce{}{}}000000000{A`Dj}{A`Bb}{Dlh}0{{nn}{{Dn{n}}}}{{nn}n}{{}n}{{}A`}{{AfA`}Ad}{{dAh}b}{{Bfn}Aj}0{{AjAj}{{Dn{An}}}}6{{Abn}Al}{{Adn}Al}{{bn}Al}{{Ajn}Al}{{hn}Al}{n{{Dn{E`}}}}{bAh}{Cbn}{Abn}{Adn}{bn}{Ajn}{hn}33{AdA`}{Bfh}{{hc}{{Dn{n}}}{{Ed{Eb}}}}{ce{}{}}00000000{cE`{}}000000`{c{{Cl{e}}}{}{}}0000000000000000000{cEf{}}000000000{Ehh}0{Ejh}0{Elh}0{Enh}0{fh}0{nCj}{Ebh}0`::{B`B`}{{ce}Al{}{}}{B`n}{{B`Cd}Cf}{cc{}}?22?==<``??{DjDj}4{{DjCd}Cf}2{ce{}{}}0{Dj{{Dn{Ab}}}}{Dj{{F`{Eb{Dn{Eb}}}}}}2{c{{Cl{e}}}{}{}}0{cEf{}}","c":[],"p":[[5,"Punct",0],[1,"char"],[1,"u8"],[5,"Literal",0],[1,"slice"],[5,"CStr",261],[5,"Span",0],[5,"TokenStream",0],[6,"TokenTree",0],[5,"Group",0],[6,"Delimiter",0],[6,"Spacing",0],[5,"Ident",0],[1,"unit"],[6,"Ordering",262],[5,"DelimSpan",230],[1,"bool"],[10,"Sized",263],[1,"str"],[10,"AsRef",264],[17,"Item"],[10,"IntoIterator",265],[1,"f32"],[1,"f64"],[5,"LexError",0],[5,"Formatter",266],[8,"Result",266],[5,"TokenStream",267],[5,"Span",267],[6,"Result",268],[10,"Hasher",269],[1,"i128"],[1,"i16"],[1,"i32"],[1,"i64"],[1,"i8"],[5,"IntoIter",245],[1,"isize"],[6,"Option",270],[5,"String",271],[1,"usize"],[10,"RangeBounds",272],[5,"TypeId",273],[1,"u128"],[1,"u16"],[1,"u32"],[1,"u64"],[1,"tuple"]],"b":[[70,"impl-PartialEq-for-Ident"],[71,"impl-PartialEq%3CT%3E-for-Ident"],[72,"impl-Extend%3CTokenStream%3E-for-TokenStream"],[73,"impl-Extend%3CTokenTree%3E-for-TokenStream"],[79,"impl-Debug-for-LexError"],[80,"impl-Display-for-LexError"],[81,"impl-Debug-for-TokenStream"],[82,"impl-Display-for-TokenStream"],[84,"impl-Debug-for-TokenTree"],[85,"impl-Display-for-TokenTree"],[86,"impl-Display-for-Group"],[87,"impl-Debug-for-Group"],[89,"impl-Display-for-Punct"],[90,"impl-Debug-for-Punct"],[92,"impl-Display-for-Ident"],[93,"impl-Debug-for-Ident"],[94,"impl-Debug-for-Literal"],[95,"impl-Display-for-Literal"],[97,"impl-From%3CTokenStream%3E-for-TokenStream"],[98,"impl-From%3CTokenTree%3E-for-TokenStream"],[102,"impl-From%3CIdent%3E-for-TokenTree"],[103,"impl-From%3CLiteral%3E-for-TokenTree"],[105,"impl-From%3CPunct%3E-for-TokenTree"],[106,"impl-From%3CGroup%3E-for-TokenTree"],[113,"impl-FromIterator%3CTokenStream%3E-for-TokenStream"],[114,"impl-FromIterator%3CTokenTree%3E-for-TokenStream"]]}],\ ["quote",{"doc":"github crates-io docs-rs","t":"KKKMMMMMQNNQQNNNNM","n":["IdentFragment","ToTokens","TokenStreamExt","append","append_all","append_separated","append_terminated","fmt","format_ident","into_token_stream","into_token_stream","quote","quote_spanned","span","span","to_token_stream","to_token_stream","to_tokens"],"q":[[0,"quote"],[18,"proc_macro2"],[19,"core::convert"],[20,"core::iter::traits::collect"],[21,"core::fmt"],[22,"core::fmt"]],"d":["Specialized formatting trait used by format_ident!.","Types that can be interpolated inside a quote! invocation.","TokenStream extension trait with methods for appending …","For use by ToTokens implementations.","For use by ToTokens implementations.","For use by ToTokens implementations.","For use by ToTokens implementations.","Format this value as an identifier fragment.","Formatting macro for constructing Idents.","Convert self directly into a TokenStream object.","Convert self directly into a TokenStream object.","The whole point.","Same as quote!, but applies a given span to all tokens …","Span associated with this IdentFragment.","Span associated with this IdentFragment.","Convert self directly into a TokenStream object.","Convert self directly into a TokenStream object.","Write self to the given TokenStream."],"i":[0,0,0,1,1,1,1,7,0,6,6,0,0,7,7,6,6,6],"f":"```{{bc}d{{h{f}}}}{{bc}dj}{{bce}djl}0{{nA`}Ab}`{lAd}0``{n{{Ah{Af}}}}011{{lAd}d}","c":[],"p":[[10,"TokenStreamExt",0],[1,"unit"],[6,"TokenTree",18],[10,"Into",19],[10,"IntoIterator",20],[10,"ToTokens",0],[10,"IdentFragment",0],[5,"Formatter",21],[8,"Result",21],[5,"TokenStream",18],[5,"Span",18],[6,"Option",22]],"b":[]}],\ ["rangemap",{"doc":"RangeMap and RangeInclusiveMap are map data structures …","t":"EEEEKKMMCCCQQQQCMMFFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFIFFFFINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFIFFFFINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["RangeInclusiveMap","RangeInclusiveSet","RangeMap","RangeSet","StepFns","StepLite","add_one","add_one","inclusive_map","inclusive_set","map","range_inclusive_map","range_inclusive_set","range_map","range_set","set","sub_one","sub_one","Gaps","IntoIter","Iter","Overlapping","RangeInclusiveMap","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clear","clone","clone_into","cmp","contains_key","default","eq","extend","first_range_value","fmt","from","from","from","from","from","from","from_iter","gaps","get","get_key_value","hash","insert","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_iter","is_empty","iter","last_range_value","len","new","new_with_step_fns","next","next","next","next","next_back","next_back","next_back","overlapping","overlaps","partial_cmp","remove","size_hint","size_hint","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","Gaps","Intersection","IntoIter","Iter","Overlapping","RangeInclusiveSet","Union","bitand","bitor","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clear","clone","clone_into","cmp","contains","default","eq","extend","first","fmt","from","from","from","from","from","from","from_iter","gaps","get","hash","insert","intersection","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_iter","is_empty","iter","last","len","new","new_with_step_fns","next","next","next","next","next_back","next_back","next_back","overlapping","overlaps","partial_cmp","remove","size_hint","size_hint","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","Gaps","IntoIter","Iter","Overlapping","RangeMap","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clear","clone","clone_into","cmp","contains_key","default","eq","extend","first_range_value","fmt","from","from","from","from","from","from","from_iter","gaps","get","get_key_value","hash","insert","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_iter","is_empty","iter","last_range_value","len","new","next","next","next","next","next_back","next_back","next_back","overlapping","overlaps","partial_cmp","remove","size_hint","size_hint","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","Gaps","Intersection","IntoIter","Iter","Overlapping","RangeSet","Union","bitand","bitor","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clear","clone","clone_into","cmp","contains","default","eq","extend","first","fmt","from","from","from","from","from","from","from_iter","gaps","get","hash","insert","intersection","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_iter","is_empty","iter","last","len","new","next","next","next","next","next_back","next_back","next_back","overlapping","overlaps","partial_cmp","remove","size_hint","size_hint","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union"],"q":[[0,"rangemap"],[18,"rangemap::inclusive_map"],[100,"rangemap::inclusive_set"],[187,"rangemap::map"],[268,"rangemap::set"],[354,"core::cmp"],[355,"core::clone"],[356,"core::cmp"],[357,"core::iter::traits::collect"],[358,"core::option"],[359,"core::fmt"],[360,"core::fmt"],[361,"core::hash"],[362,"core::cmp"],[363,"core::any"],[364,"core::ops::range"]],"d":["","","","","Successor and predecessor functions defined for T, but as …","Minimal version of unstable Step trait from the Rust …","Returns the successor of self.","Returns the successor of value start.","","","","Create a RangeInclusiveMap from key-value pairs.","Create a RangeInclusiveSet from a list of ranges.","Create a RangeMap from key-value pairs.","Create a RangeSet from a list of ranges.","","Returns the predecessor of self.","Returns the predecessor of value start.","An iterator over all ranges not covered by a …","An owning iterator over the entries of a RangeInclusiveMap…","An iterator over the entries of a RangeInclusiveMap, …","An iterator over all stored ranges partially or completely …","A map whose keys are stored as ranges bounded inclusively …","","","","","","","","","","","Clears the map, removing all elements.","","","","Returns true if any range in the map covers the specified …","","","","Returns the first range-value pair in this map, if one …","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Gets an iterator over all the maximally-sized ranges …","Returns a reference to the value corresponding to the …","Returns the range-value pair (as a pair of references) …","","Insert a pair of key range and value into the map.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","Returns true if the map contains no elements.","Gets an iterator over all pairs of key range and value, …","Returns the last range-value pair in this map, if one …","Returns the number of elements in the map.","Makes a new empty RangeInclusiveMap.","Makes a new empty RangeInclusiveMap, specifying successor …","","","","","","","","Gets an iterator over all the stored ranges that are …","Returns true if any range in the map completely or …","","Removes a range from the map, if all or any of it was …","","","","","","","","","","","","","","","","","","","An iterator over all ranges not covered by a …","Intersection iterator over two RangeInclusiveSet.","An owning iterator over the ranges of a RangeInclusiveSet.","An iterator over the ranges of a RangeInclusiveSet.","An iterator over all stored ranges partially or completely …","A set whose items are stored as ranges bounded inclusively …","Union iterator over two RangeInclusiveSet.","","","","","","","","","","","","","Clears the set, removing all elements.","","","","Returns true if any range in the set covers the specified …","","","","Returns the first range in the set, if one exists. The …","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Gets an iterator over all the maximally-sized ranges …","Returns a reference to the range covering the given key, …","","Insert a range into the set.","Return an iterator over the intersection of two range sets.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","Returns true if the set contains no elements.","Gets an ordered iterator over all ranges, ordered by range.","Returns the last range in the set, if one exists. The …","Returns the number of elements in the set.","Makes a new empty RangeInclusiveSet.","Makes a new empty RangeInclusiveSet, specifying successor …","","","","","","","","Gets an iterator over all the stored ranges that are …","Returns true if any range in the set completely or …","","Removes a range from the set, if all or any of it was …","","","","","","","","","","","","","","","","","","","Return an iterator over the union of two range sets.","An iterator over all ranges not covered by a RangeMap.","An owning iterator over the entries of a RangeMap, ordered …","An iterator over the entries of a RangeMap, ordered by key …","An iterator over all stored ranges partially or completely …","A map whose keys are stored as (half-open) ranges bounded …","","","","","","","","","","","Clears the map, removing all elements.","","","","Returns true if any range in the map covers the specified …","","","","Returns the first range-value pair in this map, if one …","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Gets an iterator over all the maximally-sized ranges …","Returns a reference to the value corresponding to the …","Returns the range-value pair (as a pair of references) …","","Insert a pair of key range and value into the map.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","Returns true if the map contains no elements.","Gets an iterator over all pairs of key range and value, …","Returns the last range-value pair in this map, if one …","Returns the number of elements in the map.","Makes a new empty RangeMap.","","","","","","","","Gets an iterator over all the stored ranges that are …","Returns true if any range in the map completely or …","","Removes a range from the map, if all or any of it was …","","","","","","","","","","","","","","","","","","","An iterator over all ranges not covered by a RangeSet.","Intersection iterator over two RangeSet.","An owning iterator over the ranges of a RangeSet.","An iterator over the ranges of a RangeSet.","An iterator over all stored ranges partially or completely …","A set whose items are stored as (half-open) ranges bounded …","Union iterator over two RangeSet.","","","","","","","","","","","","","Clears the set, removing all elements.","","","","Returns true if any range in the set covers the specified …","","","","Returns the first range in the set, if one exists. The …","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Gets an iterator over all the maximally-sized ranges …","Returns a reference to the range covering the given key, …","","Insert a range into the set.","Return an iterator over the intersection of two range sets.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","Returns true if the set contains no elements.","Gets an ordered iterator over all ranges, ordered by range.","Returns the last range in the set, if one exists. The …","Returns the number of elements in the set.","Makes a new empty RangeSet.","","","","","","","","Gets an iterator over all the stored ranges that are …","Returns true if any range in the set completely or …","","Removes a range from the set, if all or any of it was …","","","","","","","","","","","","","","","","","","","Return an iterator over the union of two range sets."],"i":[0,0,0,0,0,0,1,7,0,0,0,0,0,0,0,0,1,7,0,0,0,0,0,23,25,20,26,2,23,25,20,26,2,2,2,2,2,2,2,2,2,2,2,23,25,20,26,2,2,2,2,2,2,2,2,23,25,20,26,2,23,25,20,26,2,2,2,2,2,2,2,23,25,20,26,23,25,26,2,2,2,2,23,25,2,23,25,20,26,2,23,25,20,26,2,23,25,20,26,2,0,0,0,0,0,0,0,31,31,34,35,32,36,31,34,35,32,36,31,31,31,31,31,31,31,31,31,31,31,34,35,32,36,31,31,31,31,31,31,31,31,34,35,32,36,31,34,35,32,36,31,31,31,31,31,31,31,34,35,32,36,34,35,36,31,31,31,31,34,35,31,34,35,32,36,31,34,35,32,36,31,34,35,32,36,31,31,0,0,0,0,0,41,42,40,43,38,41,42,40,43,38,38,38,38,38,38,38,38,38,38,38,41,42,40,43,38,38,38,38,38,38,38,38,41,42,40,43,38,41,42,40,43,38,38,38,38,38,38,41,42,40,43,41,42,43,38,38,38,38,41,42,38,41,42,40,43,38,41,42,40,43,38,41,42,40,43,38,0,0,0,0,0,0,0,44,44,47,48,45,49,44,47,48,45,49,44,44,44,44,44,44,44,44,44,44,44,47,48,45,49,44,44,44,44,44,44,44,44,47,48,45,49,44,47,48,45,49,44,44,44,44,44,44,47,48,45,49,47,48,49,44,44,44,44,47,48,44,47,48,45,49,44,47,48,45,49,44,47,48,45,49,44,44],"f":"``````{bb}{cc{}}````````10`````{ce{}{}}000000000{{{d{ceg}}}f{hj}{lj}{{n{c}}}}{{{d{ceg}}}{{d{ceg}}}jjj}{{ce}f{}{}}{{{d{ceg}}{d{ceg}}}A`hh{}}{{{d{ceg}}c}Ab{hj}{lj}{{n{c}}}}{{}{{d{ceg}}}{}{}{}}{{{d{ceg}}{d{ceg}}}AbAdAd{}}{{{d{ce}}g}f{hjb}{lj}{{Al{}{{Af{{Aj{{Ah{c}}e}}}}}}}}{{{d{ceg}}}{{An{{Aj{{Ah{c}}e}}}}}{hj}{lj}{{n{c}}}}{{{d{ce}}B`}Bb{hjbBd}{ljBd}};;;;{{{Bf{{Aj{{Ah{c}}e}}}}}{{d{ce}}}{hjb}{lj}}<{g{{d{ce}}}{hjb}{lj}{{Al{}{{Af{{Aj{{Ah{c}}e}}}}}}}}{{{d{ceg}}{Ah{c}}}{{Bh{ceg}}}{hj}{lj}{{n{c}}}}{{{d{ceg}}c}{{An{e}}}{hj}{lj}{{n{c}}}}{{{d{ceg}}c}{{An{{Aj{{Ah{c}}e}}}}}{hj}{lj}{{n{c}}}}{{{d{ceg}}i}fBjBj{}Bl}{{{d{ceg}}{Ah{c}}e}f{hj}{lj}{{n{c}}}}{ce{}{}}00000000{{{d{ce}}}g{}{}{}}{{{d{ceg}}}Ab{hj}{lj}{{n{c}}}}{{{d{ceg}}}{{Bn{ce}}}{}{}{}}<{{{d{ceg}}}C`{hj}{lj}{{n{c}}}}{{}{{d{cec}}}{hjb}{lj}}{{}{{d{ceg}}}{hj}{lj}{{n{c}}}}{{{Bn{ce}}}{{An{g}}}{}{}{}}{{{Cb{ce}}}{{An{{Aj{{Ah{c}}e}}}}}{}{}}{{{Bh{ceg}}}{{An{i}}}{hj}{}{{n{c}}}{}}{{{Cd{ceg}}}{{An{i}}}{hj}{}{{Cf{{Ah{c}}}}}{}}3{{{Cb{ce}}}{{An{g}}}{}{}{}}1{{{d{ceg}}i}{{Cd{cei}}}{hj}{lj}{{n{c}}}{{Cf{{Ah{c}}}}}}{{{d{ceg}}{Ah{c}}}Ab{hj}{lj}{{n{c}}}}{{{d{ceg}}{d{ceg}}}{{An{A`}}}ChCh{}}{{{d{ceg}}{Ah{c}}}f{hj}{lj}{{n{c}}}}{{{Bn{ce}}}{{Aj{C`{An{C`}}}}}{}{}}{{{Cb{ce}}}{{Aj{C`{An{C`}}}}}{}{}}{ce{}{}}{c{{Cj{e}}}{}{}}000000000{cCl{}}0000```````{{{Cn{c}}{Cn{c}}}e{hjb}{}}03333333333{{{Cn{ce}}}f{hj}{{n{c}}}}{{{Cn{ce}}}{{Cn{ce}}}jj}{{ce}f{}{}}{{{Cn{ce}}{Cn{ce}}}A`hh}{{{Cn{ce}}c}Ab{hj}{{n{c}}}}{{}{{Cn{ce}}}{}{}}{{{Cn{ce}}{Cn{ce}}}AbAdAd}{{{Cn{c}}e}f{hjb}{{Al{}{{Af{{Ah{c}}}}}}}}{{{Cn{ce}}}{{An{{Ah{c}}}}}{hj}{{n{c}}}}{{{Cn{c}}B`}Bb{hjbBd}}{cc{}}000{{{Bf{{Ah{c}}}}}{{Cn{c}}}{hjb}}1{e{{Cn{c}}}{hjb}{{Al{}{{Af{{Ah{c}}}}}}}}{{{Cn{ce}}{Ah{c}}}{{D`{ce}}}{hj}{{n{c}}}}{{{Cn{ce}}c}{{An{{Ah{c}}}}}{hj}{{n{c}}}}{{{Cn{ce}}g}fBjBjBl}{{{Cn{ce}}{Ah{c}}}f{hj}{{n{c}}}}{{{Cn{ce}}{Cn{ce}}}{{Db{c}}}{hj}{{n{c}}}}{ce{}{}}00000000{{{Cn{c}}}e{}{}}{{{Cn{ce}}}Ab{hj}{{n{c}}}}{{{Cn{ce}}}{{Dd{c}}}{hj}{{n{c}}}}={{{Cn{ce}}}C`{hj}{{n{c}}}}{{}{{Cn{cc}}}{hjb}}{{}{{Cn{ce}}}{hj}{{n{c}}}}{{{Dd{c}}}{{An{e}}}{}{}}{{{Df{c}}}{{An{{Ah{c}}}}}{}}{{{D`{ce}}}{{An{g}}}{hj}{{n{c}}}{}}{{{Dh{ce}}}{{An{g}}}{hj}{{Cf{{Ah{c}}}}}{}}3{{{Df{c}}}{{An{e}}}{}{}}1{{{Cn{ce}}g}{{Dh{cg}}}{hj}{{n{c}}}{{Cf{{Ah{c}}}}}}{{{Cn{ce}}{Ah{c}}}Ab{hj}{{n{c}}}}{{{Cn{ce}}{Cn{ce}}}{{An{A`}}}ChCh}{{{Cn{ce}}{Ah{c}}}f{hj}{{n{c}}}}{{{Dd{c}}}{{Aj{C`{An{C`}}}}}{}}{{{Df{c}}}{{Aj{C`{An{C`}}}}}{}}{ce{}{}}{c{{Cj{e}}}{}{}}000000000{cCl{}}0000{{{Cn{ce}}{Cn{ce}}}{{Dj{c}}}{hj}{{n{c}}}}`````3333333333{{{Dl{ce}}}f{}{}}{{{Dl{ce}}}{{Dl{ce}}}jj}{{ce}f{}{}}{{{Dl{ce}}{Dl{ce}}}A`hh}{{{Dl{ce}}c}Ab{hj}{}}{{}{{Dl{ce}}}{}{}}{{{Dl{ce}}{Dl{ce}}}AbAdAd}{{{Dl{ce}}g}f{hj}{lj}{{Al{}{{Af{{Aj{{Dn{c}}e}}}}}}}}{{{Dl{ce}}}{{An{{Aj{{Dn{c}}e}}}}}{hj}{}}{{{Dl{ce}}B`}BbBdBd}{cc{}}0000{{{Bf{{Aj{{Dn{c}}e}}}}}{{Dl{ce}}}{hj}{lj}}{g{{Dl{ce}}}{hj}{lj}{{Al{}{{Af{{Aj{{Dn{c}}e}}}}}}}}{{{Dl{ce}}{Dn{c}}}{{E`{ce}}}{hj}{}}{{{Dl{ce}}c}{{An{e}}}{hj}{}}{{{Dl{ce}}c}{{An{{Aj{{Dn{c}}e}}}}}{hj}{}}{{{Dl{ce}}g}fBjBjBl}{{{Dl{ce}}{Dn{c}}e}f{hj}{lj}}{ce{}{}}00000000{{{Dl{ce}}}g{}{}{}}{{{Dl{ce}}}Ab{}{}}{{{Dl{ce}}}{{Eb{ce}}}{}{}}={{{Dl{ce}}}C`{}{}}{{}{{Dl{ce}}}{}{}}{{{Eb{ce}}}{{An{g}}}{}{}{}}{{{Ed{ce}}}{{An{{Aj{{Dn{c}}e}}}}}{}{}}{{{E`{ce}}}{{An{g}}}{hj}{}{}}{{{Ef{ceg}}}{{An{i}}}h{}{{Cf{{Dn{c}}}}}{}}3{{{Ed{ce}}}{{An{g}}}{}{}{}}1{{{Dl{ce}}g}{{Ef{ceg}}}{hj}{}{{Cf{{Dn{c}}}}}}{{{Dl{ce}}{Dn{c}}}Ab{hj}{}}{{{Dl{ce}}{Dl{ce}}}{{An{A`}}}ChCh}{{{Dl{ce}}{Dn{c}}}f{hj}{lj}}{{{Eb{ce}}}{{Aj{C`{An{C`}}}}}{}{}}{{{Ed{ce}}}{{Aj{C`{An{C`}}}}}{}{}}{ce{}{}}{c{{Cj{e}}}{}{}}000000000{cCl{}}0000```````{{{Eh{c}}{Eh{c}}}e{hj}{}}03333333333{{{Eh{c}}}f{hj}}{{{Eh{c}}}{{Eh{c}}}j}{{ce}f{}{}}{{{Eh{c}}{Eh{c}}}A`h}{{{Eh{c}}c}Ab{hj}}{{}{{Eh{c}}}{}}{{{Eh{c}}{Eh{c}}}AbAd}{{{Eh{c}}e}f{hj}{{Al{}{{Af{{Dn{c}}}}}}}}{{{Eh{c}}}{{An{{Dn{c}}}}}{hj}}{{{Eh{c}}B`}Bb{hjBd}}{cc{}}0000{{{Bf{{Dn{c}}}}}{{Eh{c}}}{hj}}{e{{Eh{c}}}{hj}{{Al{}{{Af{{Dn{c}}}}}}}}{{{Eh{c}}{Dn{c}}}{{Ej{c}}}{hj}}{{{Eh{c}}c}{{An{{Dn{c}}}}}{hj}}{{{Eh{c}}e}fBjBl}{{{Eh{c}}{Dn{c}}}f{hj}}{{{Eh{c}}{Eh{c}}}{{El{c}}}{hj}}{ce{}{}}00000000{{{Eh{c}}}e{}{}}{{{Eh{c}}}Ab{hj}}{{{Eh{c}}}{{En{c}}}{hj}}={{{Eh{c}}}C`{hj}}{{}{{Eh{c}}}{hj}}{{{En{c}}}{{An{e}}}{}{}}{{{F`{c}}}{{An{{Dn{c}}}}}{}}{{{Ej{c}}}{{An{e}}}{hj}{}}{{{Fb{ce}}}{{An{g}}}{hj}{{Cf{{Dn{c}}}}}{}}3{{{F`{c}}}{{An{e}}}{}{}}1{{{Eh{c}}e}{{Fb{ce}}}{hj}{{Cf{{Dn{c}}}}}}{{{Eh{c}}{Dn{c}}}Ab{hj}}{{{Eh{c}}{Eh{c}}}{{An{A`}}}Ch}?{{{En{c}}}{{Aj{C`{An{C`}}}}}{}}{{{F`{c}}}{{Aj{C`{An{C`}}}}}{}}?{c{{Cj{e}}}{}{}}000000000{cCl{}}0000{{{Eh{c}}{Eh{c}}}{{Fd{c}}}{hj}}","c":[],"p":[[10,"StepLite",0],[5,"RangeInclusiveMap",18],[1,"unit"],[10,"Ord",354],[10,"Clone",355],[10,"Eq",354],[10,"StepFns",0],[6,"Ordering",354],[1,"bool"],[10,"PartialEq",354],[17,"Item"],[5,"RangeInclusive",356],[1,"tuple"],[10,"IntoIterator",357],[6,"Option",358],[5,"Formatter",359],[8,"Result",359],[10,"Debug",359],[1,"array"],[5,"Gaps",18],[10,"Hash",360],[10,"Hasher",360],[5,"Iter",18],[1,"usize"],[5,"IntoIter",18],[5,"Overlapping",18],[10,"Borrow",361],[10,"PartialOrd",354],[6,"Result",362],[5,"TypeId",363],[5,"RangeInclusiveSet",100],[5,"Gaps",100],[8,"Intersection",100],[5,"Iter",100],[5,"IntoIter",100],[5,"Overlapping",100],[8,"Union",100],[5,"RangeMap",187],[5,"Range",356],[5,"Gaps",187],[5,"Iter",187],[5,"IntoIter",187],[5,"Overlapping",187],[5,"RangeSet",268],[5,"Gaps",268],[8,"Intersection",268],[5,"Iter",268],[5,"IntoIter",268],[5,"Overlapping",268],[8,"Union",268]],"b":[]}],\ +["rayon",{"doc":"Rayon is a data-parallelism library that makes it easy to …","t":"FPFPFFFFFFGCNNNNNNNNNNNNNNNNNNNHNNNNNNCHNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNHNNNNNNNNNNNNNNNNNNNNNNCHNHHNNNNNNCNCCCCNHNHNCNHNNHNNNHNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCHNHNFNNNNNNNNNNNNNNNNNNNNNCCCCCCCFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFGFFFFFFFFFFFFFKKFFFFKKKRRRRRRRRRRRFPFFFFFFFFKKKKKFFFFPFFFFFFFFFFFFFFFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMMMNMMNNNNNCNNNNNNNNNHHNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKRRRRRKKKRRRKKHHHMMMNMNMMMMNNMMMMMMFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNEEEEEEEEEEEEEFNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNNNNNNNNNNNNNNNNNNNNFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFFFFFKKFFFFFFFFFMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFFFFKFFFFFMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNNNNNNNNNFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["BroadcastContext","Executed","FnContext","Idle","Scope","ScopeFifo","ThreadBuilder","ThreadPool","ThreadPoolBuildError","ThreadPoolBuilder","Yield","array","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","breadth_first","broadcast","broadcast","build","build_global","build_scoped","clone","clone_into","collections","current_num_threads","current_num_threads","current_thread_has_pending_tasks","current_thread_index","current_thread_index","default","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","description","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","eq","exit_handler","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","in_place_scope","in_place_scope","in_place_scope_fifo","in_place_scope_fifo","index","index","init","init","init","init","init","init","init","init","init","install","into","into","into","into","into","into","into","into","into","iter","join","join","join_context","max_num_threads","migrated","name","new","new","num_threads","num_threads","option","panic_handler","prelude","range","range_inclusive","result","run","scope","scope","scope_fifo","scope_fifo","slice","source","spawn","spawn","spawn","spawn_broadcast","spawn_broadcast","spawn_broadcast","spawn_broadcast","spawn_fifo","spawn_fifo","spawn_fifo","spawn_handler","stack_size","stack_size","start_handler","str","string","thread_name","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","use_current_thread","vec","yield_local","yield_local","yield_now","yield_now","IntoIter","borrow","borrow_mut","clone","clone_into","deref","deref_mut","drive","drive_unindexed","drop","fmt","from","init","into","into_par_iter","len","opt_len","to_owned","try_from","try_into","type_id","with_producer","binary_heap","btree_map","btree_set","hash_map","hash_set","linked_list","vec_deque","Drain","IntoIter","Iter","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deref","deref","deref","deref_mut","deref_mut","deref_mut","drive","drive","drive","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","drop","fmt","fmt","fmt","from","from","from","init","init","init","into","into","into","into_par_iter","into_par_iter","into_par_iter","len","len","len","opt_len","opt_len","opt_len","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","with_producer","with_producer","with_producer","IntoIter","Iter","IterMut","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","deref","deref","deref","deref_mut","deref_mut","deref_mut","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","fmt","fmt","fmt","from","from","from","init","init","init","into","into","into","into_par_iter","into_par_iter","into_par_iter","opt_len","opt_len","opt_len","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","IntoIter","Iter","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","deref","deref","deref_mut","deref_mut","drive_unindexed","drive_unindexed","drop","drop","fmt","fmt","from","from","init","init","into","into","into_par_iter","into_par_iter","opt_len","opt_len","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","Drain","IntoIter","Iter","IterMut","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","drop","fmt","fmt","fmt","fmt","from","from","from","from","init","init","init","init","into","into","into","into","into_par_iter","into_par_iter","into_par_iter","into_par_iter","opt_len","opt_len","opt_len","opt_len","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","Drain","IntoIter","Iter","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","deref","deref","deref","deref_mut","deref_mut","deref_mut","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","fmt","fmt","fmt","from","from","from","init","init","init","into","into","into","into_par_iter","into_par_iter","into_par_iter","opt_len","opt_len","opt_len","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","IntoIter","Iter","IterMut","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deref","deref","deref","deref_mut","deref_mut","deref_mut","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","fmt","fmt","fmt","from","from","from","init","init","init","into","into","into","into_par_iter","into_par_iter","into_par_iter","opt_len","opt_len","opt_len","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","Drain","IntoIter","Iter","IterMut","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","drive","drive","drive","drive","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","drop","drop","fmt","fmt","fmt","fmt","from","from","from","from","init","init","init","init","into","into","into","into","into_par_iter","into_par_iter","into_par_iter","into_par_iter","len","len","len","len","opt_len","opt_len","opt_len","opt_len","to_owned","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","with_producer","with_producer","with_producer","with_producer","Chain","Chunks","Cloned","Copied","Either","Empty","Enumerate","ExponentialBlocks","Filter","FilterMap","FlatMap","FlatMapIter","Flatten","FlattenIter","Fold","FoldChunks","FoldChunksWith","FoldWith","FromParallelIterator","IndexedParallelIterator","Inspect","Interleave","InterleaveShortest","Intersperse","IntoParallelIterator","IntoParallelRefIterator","IntoParallelRefMutIterator","Item","Item","Item","Item","Item","Item","Iter","Iter","Iter","Iter","Iter","IterBridge","Left","Map","MapInit","MapWith","MaxLen","MinLen","MultiZip","Once","PanicFuse","ParallelBridge","ParallelDrainFull","ParallelDrainRange","ParallelExtend","ParallelIterator","Positions","Repeat","RepeatN","Rev","Right","Skip","SkipAny","SkipAnyWhile","Split","StepBy","Take","TakeAny","TakeAnyWhile","TryFold","TryFoldWith","UniformBlocks","Update","WalkTree","WalkTreePostfix","WalkTreePrefix","WhileSome","Zip","ZipEq","all","all","any","any","as_mut","as_mut","as_mut","as_mut","as_pin_mut","as_pin_ref","as_ref","as_ref","as_ref","as_ref","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","by_exponential_blocks","by_uniform_blocks","chain","chunks","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_from","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cloned","cmp","cmp","collect","collect","collect_into_vec","collect_vec_list","copied","count","count","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","either","either_into","either_with","empty","enumerate","eq","eq","expect_left","expect_right","extend","factor_err","factor_first","factor_into_iter","factor_iter","factor_iter_mut","factor_none","factor_ok","factor_second","filter","filter_map","find","find_any","find_first","find_last","find_map","find_map_any","find_map_first","find_map_last","flat_map","flat_map_iter","flatten","flatten_iter","flip","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fold","fold","fold_chunks","fold_chunks_with","fold_with","for_each","for_each","for_each_init","for_each_with","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_par_iter","ge","gt","hash","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","inspect","interleave","interleave_shortest","intersperse","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_future","into_inner","into_iter","into_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","is_left","is_right","iter","iter_mut","last","le","left","left_and_then","left_or","left_or_default","left_or_else","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","len","lt","map","map","map_either","map_either_with","map_init","map_left","map_right","map_with","max","max_by","max_by_key","min","min_by","min_by_key","ne","next","next_back","nth","nth_back","once","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","panic_fuse","par_bridge","par_drain","par_drain","par_extend","par_extend","par_iter","par_iter_mut","partial_cmp","partial_cmp","partition","partition","partition_map","plumbing","poll","position","position_any","position_first","position_last","positions","product","reduce","reduce_with","repeat","repeatn","rev","rfind","rfold","right","right_and_then","right_or","right_or_default","right_or_else","size_hint","skip","skip_any","skip_any_while","split","step_by","sum","take","take","take_any","take_any_while","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","try_fold","try_fold_with","try_for_each","try_for_each_init","try_for_each_with","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_reduce","try_reduce_with","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unwrap_left","unwrap_right","unzip","unzip_into_vecs","update","walk_tree","walk_tree_postfix","walk_tree_prefix","while_some","with_max_len","with_min_len","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","zip","zip","zip_eq","Consumer","Folder","Folder","IntoIter","Item","Item","Output","Producer","ProducerCallback","Reducer","Reducer","Result","Result","UnindexedConsumer","UnindexedProducer","bridge","bridge_producer_consumer","bridge_unindexed","callback","complete","consume","consume_iter","fold_with","fold_with","full","full","into_folder","into_iter","max_len","min_len","reduce","split","split_at","split_at","split_off_left","to_reducer","IntoIter","Iter","IterMut","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deref","deref","deref","deref_mut","deref_mut","deref_mut","drive","drive","drive","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","fmt","fmt","fmt","from","from","from","init","init","init","into","into","into","into_par_iter","into_par_iter","into_par_iter","len","len","len","opt_len","opt_len","opt_len","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","with_producer","with_producer","with_producer","FromParallelIterator","IndexedParallelIterator","IntoParallelIterator","IntoParallelRefIterator","IntoParallelRefMutIterator","ParallelBridge","ParallelDrainFull","ParallelDrainRange","ParallelExtend","ParallelIterator","ParallelSlice","ParallelSliceMut","ParallelString","Iter","borrow","borrow_mut","clone","clone_into","deref","deref_mut","drive","drive","drive_unindexed","drive_unindexed","drop","fmt","from","init","into","into_par_iter","len","len","opt_len","opt_len","to_owned","try_from","try_into","type_id","with_producer","with_producer","Iter","borrow","borrow_mut","clone","clone_into","deref","deref_mut","drive","drive","drive_unindexed","drive_unindexed","drop","fmt","from","init","into","into_par_iter","len","len","opt_len","opt_len","to_owned","try_from","try_into","type_id","with_producer","with_producer","IntoIter","Iter","IterMut","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deref","deref","deref","deref_mut","deref_mut","deref_mut","drive","drive","drive","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","fmt","fmt","fmt","from","from","from","init","init","init","into","into","into","into_par_iter","into_par_iter","into_par_iter","len","len","len","opt_len","opt_len","opt_len","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","with_producer","with_producer","with_producer","ChunkBy","ChunkByMut","Chunks","ChunksExact","ChunksExactMut","ChunksMut","Iter","IterMut","ParallelSlice","ParallelSliceMut","RChunks","RChunksExact","RChunksExactMut","RChunksMut","Split","SplitInclusive","SplitInclusiveMut","SplitMut","Windows","as_parallel_slice","as_parallel_slice_mut","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","init","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_remainder","into_remainder","len","len","len","len","len","len","len","len","len","len","len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","opt_len","par_chunk_by","par_chunk_by_mut","par_chunks","par_chunks_exact","par_chunks_exact_mut","par_chunks_mut","par_rchunks","par_rchunks_exact","par_rchunks_exact_mut","par_rchunks_mut","par_sort","par_sort_by","par_sort_by_cached_key","par_sort_by_key","par_sort_unstable","par_sort_unstable_by","par_sort_unstable_by_key","par_split","par_split_inclusive","par_split_inclusive_mut","par_split_mut","par_windows","remainder","remainder","remainder","remainder","take_remainder","take_remainder","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","with_producer","Bytes","CharIndices","Chars","EncodeUtf16","Lines","MatchIndices","Matches","ParallelString","Split","SplitAsciiWhitespace","SplitInclusive","SplitTerminator","SplitWhitespace","as_parallel_string","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drive_unindexed","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","init","init","init","init","init","init","init","init","init","init","init","init","into","into","into","into","into","into","into","into","into","into","into","into","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","into_par_iter","par_bytes","par_char_indices","par_chars","par_encode_utf16","par_lines","par_match_indices","par_matches","par_split","par_split_ascii_whitespace","par_split_inclusive","par_split_terminator","par_split_whitespace","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","Drain","borrow","borrow_mut","deref","deref_mut","drive_unindexed","drop","drop","fmt","from","init","into","into_par_iter","try_from","try_into","type_id","Drain","IntoIter","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","deref","deref","deref_mut","deref_mut","drive","drive","drive_unindexed","drive_unindexed","drop","drop","drop","fmt","fmt","from","from","init","init","into","into","into_par_iter","into_par_iter","len","len","opt_len","opt_len","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","with_producer","with_producer"],"q":[[0,"rayon"],[196,"rayon::array"],[218,"rayon::collections"],[225,"rayon::collections::binary_heap"],[289,"rayon::collections::btree_map"],[340,"rayon::collections::btree_set"],[375,"rayon::collections::hash_map"],[442,"rayon::collections::hash_set"],[493,"rayon::collections::linked_list"],[547,"rayon::collections::vec_deque"],[630,"rayon::iter"],[1962,"rayon::iter::plumbing"],[1998,"rayon::option"],[2061,"rayon::prelude"],[2074,"rayon::range"],[2101,"rayon::range_inclusive"],[2128,"rayon::result"],[2191,"rayon::slice"],[2551,"rayon::str"],[2781,"rayon::string"],[2797,"rayon::vec"],[2839,"alloc::vec"],[2840,"core::marker"],[2841,"core::ops::function"],[2842,"core::marker"],[2843,"rayon_core::registry"],[2844,"core::ops::function"],[2845,"core::fmt"],[2846,"core::fmt"],[2847,"core::error"],[2848,"alloc::boxed"],[2849,"core::any"],[2850,"rayon_core::registry"],[2851,"core::ops::function"],[2852,"core::any"],[2853,"core::fmt"],[2854,"core::hash"],[2855,"core::cmp"],[2856,"core::convert"],[2857,"core::pin"],[2858,"core::convert"],[2859,"alloc::collections::linked_list"],[2860,"core::ops::deref"],[2861,"core::ops::deref"],[2862,"core::fmt"],[2863,"core::iter::traits::exact_size"],[2864,"core::iter::traits::double_ended"],[2865,"core::ops::range"],[2866,"core::cmp"],[2867,"core::task::poll"],[2868,"core::future::future"],[2869,"core::iter::traits::accum"],[2870,"core::iter::traits::accum"]],"d":["Provides context to a closure called by broadcast.","Work was found and executed.","Provides the calling context to a closure called by …","No available work was found.","Represents a fork-join scope which can be used to spawn …","Represents a fork-join scope which can be used to spawn …","Thread builder used for customization via …","Represents a user created thread-pool.","Error when initializing a thread pool.","Used to create a new ThreadPool or to configure the global …","Result of yield_now() or yield_local().","Parallel iterator types for arrays ([T; N])","","","","","","","","","","","","","","","","","","","(DEPRECATED) Suggest to worker threads that they execute …","Executes op within every thread in the current threadpool. …","Executes op within every thread in the threadpool. Any …","Creates a new ThreadPool initialized using this …","Initializes the global thread pool. This initialization is …","Creates a scoped ThreadPool initialized using this …","","","Parallel iterator types for standard collections","Returns the number of threads in the current registry. If …","Returns the (current) number of threads in the thread pool.","Returns true if the current worker thread currently has “…","If called from a Rayon worker thread, returns the index of …","If called from a Rayon worker thread in this thread-pool, …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Sets a callback to be invoked on thread exit.","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates a “fork-join” scope s and invokes the closure …","Creates a scope that spawns work into this thread-pool.","Creates a “fork-join” scope s with FIFO order, and …","Creates a scope that spawns work into this thread-pool in …","Our index amongst the broadcast threads (ranges from …","Gets the index of this thread in the pool, within …","","","","","","","","","","Executes op within the threadpool. Any attempts to use join…","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Traits for writing parallel programs using an …","Takes two closures and potentially runs them in parallel. …","Execute oper_a and oper_b in the thread-pool and return …","Identical to join, except that the closures have a …","Returns the maximum number of threads that Rayon supports …","Returns true if the closure was called from a different …","Gets the string that was specified by …","Deprecated in favor of ThreadPoolBuilder::build.","Creates and returns a valid rayon thread pool builder, but …","The number of threads receiving the broadcast in the …","Sets the number of threads to be used in the rayon …","Parallel iterator types for options","Normally, whenever Rayon catches a panic, it tries to …","The rayon prelude imports the various ParallelIterator …","Parallel iterator types for ranges, the type for values …","Parallel iterator types for inclusive ranges, the type for …","Parallel iterator types for results","Executes the main loop for this thread. This will not …","Creates a “fork-join” scope s and invokes the closure …","Creates a scope that executes within this thread-pool. …","Creates a “fork-join” scope s with FIFO order, and …","Creates a scope that executes within this thread-pool. …","Parallel iterator types for slices","","Puts the task into the Rayon threadpool’s job queue in …","Spawns a job into the fork-join scope self. This job will …","Spawns an asynchronous task in this thread-pool. This task …","Spawns an asynchronous task on every thread in this …","Spawns a job into every thread of the fork-join scope self…","Spawns a job into every thread of the fork-join scope self…","Spawns an asynchronous task on every thread in this …","Fires off a task into the Rayon threadpool in the “static…","Spawns a job into the fork-join scope self. This job will …","Spawns an asynchronous task in this thread-pool. This task …","Sets a custom function for spawning threads.","Gets the value that was specified by …","Sets the stack size of the worker threads","Sets a callback to be invoked on thread start.","Parallel iterator types for strings","This module contains the parallel iterator types for owned …","Sets a closure which takes a thread index and returns the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Use the current thread as one of the threads in the pool.","Parallel iterator types for vectors (Vec<T>)","Cooperatively yields execution to local Rayon work.","Cooperatively yields execution to local Rayon work.","Cooperatively yields execution to Rayon.","Cooperatively yields execution to Rayon.","Parallel iterator that moves out of an array.","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","This module contains the parallel iterator types for heaps …","This module contains the parallel iterator types for …","This module contains the parallel iterator types for …","This module contains the parallel iterator types for hash …","This module contains the parallel iterator types for hash …","This module contains the parallel iterator types for …","This module contains the parallel iterator types for …","Draining parallel iterator that moves out of a binary heap,","Parallel iterator over a binary heap","Parallel iterator over an immutable reference to a binary …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","Parallel iterator over a B-Tree map","Parallel iterator over an immutable reference to a B-Tree …","Parallel iterator over a mutable reference to a B-Tree map","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","Parallel iterator over a B-Tree set","Parallel iterator over an immutable reference to a B-Tree …","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","Draining parallel iterator that moves out of a hash map, …","Parallel iterator over a hash map","Parallel iterator over an immutable reference to a hash map","Parallel iterator over a mutable reference to a hash map","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","Draining parallel iterator that moves out of a hash set, …","Parallel iterator over a hash set","Parallel iterator over an immutable reference to a hash set","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","Parallel iterator over a linked list","Parallel iterator over an immutable reference to a linked …","Parallel iterator over a mutable reference to a linked list","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","Draining parallel iterator that moves a range out of a …","Parallel iterator over a double-ended queue","Parallel iterator over an immutable reference to a …","Parallel iterator over a mutable reference to a …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Chain is an iterator that joins b after a in one …","Chunks is an iterator that groups elements of an …","Cloned is an iterator that clones the elements of an …","Copied is an iterator that copies the elements of an …","The enum Either with variants Left and Right is a general …","Iterator adaptor for the empty() function.","Enumerate is an iterator that returns the current count …","ExponentialBlocks is a parallel iterator that consumes …","Filter takes a predicate filter_op and filters out …","FilterMap creates an iterator that uses filter_op to both …","FlatMap maps each element to a parallel iterator, then …","FlatMapIter maps each element to a serial iterator, then …","Flatten turns each element to a parallel iterator, then …","FlattenIter turns each element to a serial iterator, then …","Fold is an iterator that applies a function over an …","FoldChunks is an iterator that groups elements of an …","FoldChunksWith is an iterator that groups elements of an …","FoldWith is an iterator that applies a function over an …","FromParallelIterator implements the creation of a …","An iterator that supports “random access” to its data, …","Inspect is an iterator that calls a function with a …","Interleave is an iterator that interleaves elements of …","InterleaveShortest is an iterator that works similarly to …","Intersperse is an iterator that inserts a particular item …","IntoParallelIterator implements the conversion to a …","IntoParallelRefIterator implements the conversion to a …","IntoParallelRefMutIterator implements the conversion to a …","The type of item that the parallel iterator will produce.","The type of item that the parallel iterator will produce. …","The type of item that will be produced; this is typically …","The type of item that this parallel iterator produces. For …","The type of item that the parallel iterator will produce. …","The type of item that the parallel iterator will produce. …","The parallel iterator type that will be created.","The type of the parallel iterator that will be returned.","The type of iterator that will be created.","The draining parallel iterator type that will be created.","The draining parallel iterator type that will be created.","IterBridge is a parallel iterator that wraps a sequential …","A value of type L.","Map is an iterator that transforms the elements of an …","MapInit is an iterator that transforms the elements of an …","MapWith is an iterator that transforms the elements of an …","MaxLen is an iterator that imposes a maximum length on …","MinLen is an iterator that imposes a minimum length on …","MultiZip is an iterator that zips up a tuple of parallel …","Iterator adaptor for the once() function.","PanicFuse is an adaptor that wraps an iterator with a fuse …","Conversion trait to convert an Iterator to a …","ParallelDrainFull creates a parallel iterator that moves …","ParallelDrainRange creates a parallel iterator that moves …","ParallelExtend extends an existing collection with items …","Parallel version of the standard iterator trait.","Positions takes a predicate predicate and filters out …","Iterator adaptor for the repeat() function.","Iterator adaptor for the repeatn() function.","Rev is an iterator that produces elements in reverse …","A value of type R.","Skip is an iterator that skips over the first n elements. …","SkipAny is an iterator that skips over n elements from …","SkipAnyWhile is an iterator that skips over elements from …","Split is a parallel iterator using arbitrary data and a …","StepBy is an iterator that skips n elements between each …","Take is an iterator that iterates over the first n …","TakeAny is an iterator that iterates over n elements from …","TakeAnyWhile is an iterator that iterates over elements …","TryFold is an iterator that applies a function over an …","TryFoldWith is an iterator that applies a function over an …","UniformBlocks is a parallel iterator that consumes itself …","Update is an iterator that mutates the elements of an …","ParallelIterator for arbitrary tree-shaped patterns. …","ParallelIterator for arbitrary tree-shaped patterns. …","ParallelIterator for arbitrary tree-shaped patterns. …","WhileSome is an iterator that yields the Some elements of …","Zip is an iterator that zips up a and b into a single …","An IndexedParallelIterator that iterates over two parallel …","","Tests that every item in the parallel iterator matches the …","","Searches for some item in the parallel iterator that …","","","","Convert &mut Either<L, R> to Either<&mut L, &mut R>.","Convert Pin<&mut Either<L, R>> to …","Convert Pin<&Either<L, R>> to Either<Pin<&L>, Pin<&R>>, …","","","","Convert &Either<L, R> to Either<&L, &R>.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Divides an iterator into sequential blocks of …","Divides an iterator into sequential blocks of the given …","Takes two iterators and creates a new iterator over both.","Splits an iterator up into fixed-size chunks.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Creates an iterator which clones all of its elements. …","","Lexicographically compares the elements of this …","","Creates a fresh collection containing all the elements …","Collects the results of the iterator into the specified …","Collects this iterator into a linked list of vectors.","Creates an iterator which copies all of its elements. …","","Counts the number of items in this parallel iterator.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Internal method used to define the behavior of this …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Internal method used to define the behavior of this …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Apply one of two functions depending on contents, unifying …","Convert the contained value into T","Like either, but provide some context to whichever of the …","Creates a parallel iterator that produces nothing.","Yields an index along with each item.","","Determines if the elements of this ParallelIterator are …","Returns the left value","Returns the right value","","Factors out a homogenous type from an Either of Result.","Factor out a homogeneous type from an either of pairs.","Converts an Either of Iterators to be an Iterator of Either…","Borrows an Either of Iterators to be an Iterator of Eithers","Mutably borrows an Either of Iterators to be an Iterator …","Factors out None from an Either of Option.","Factors out a homogenous type from an Either of Result.","Factor out a homogeneous type from an either of pairs.","Applies filter_op to each item of this iterator, producing …","Applies filter_op to each item of this iterator to get an …","","Searches for some item in the parallel iterator that …","Searches for the sequentially first item in the parallel …","Searches for the sequentially last item in the parallel …","","Applies the given predicate to the items in the parallel …","Applies the given predicate to the items in the parallel …","Applies the given predicate to the items in the parallel …","Applies map_op to each item of this iterator to get nested …","Applies map_op to each item of this iterator to get nested …","An adaptor that flattens parallel-iterable Items into one …","An adaptor that flattens serial-iterable Items into one …","Convert Either<L, R> to Either<R, L>.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Parallel fold is similar to sequential fold except that the","Splits an iterator into fixed-size chunks, performing a …","Splits an iterator into fixed-size chunks, performing a …","Applies fold_op to the given init value with each item of …","","Executes OP on each item produced by the iterator, in …","Executes OP on a value returned by init with each item …","Executes OP on the given init value with each item …","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates an instance of the collection from the parallel …","Determines if the elements of this ParallelIterator are …","Determines if the elements of this ParallelIterator are …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Applies inspect_op to a reference to each item of this …","Interleaves elements of this iterator and the other given …","Interleaves elements of this iterator and the other given …","Intersperses clones of an element between items of this …","Calls U::from(self).","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Extract the value of an either over two equivalent types.","","Convert the inner value to an iterator.","Converts self into a parallel iterator.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Return true if the value is the Left variant.","Return true if the value is the Right variant.","Borrow the inner value as an iterator.","Mutably borrow the inner value as an iterator.","","Determines if the elements of this ParallelIterator are …","Convert the left side of Either<L, R> to an Option<L>.","Apply the function f on the value in the Left variant if …","Return left value or given value","Return left or a default","Returns left value or computes it from a closure","Produces an exact count of how many items this iterator …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Determines if the elements of this ParallelIterator are …","Map f over the contained value and return the result in the","Applies map_op to each item of this iterator, producing a …","Apply the functions f and g to the Left and Right variants …","Similar to map_either, with an added context ctx …","Applies map_op to a value returned by init with each item …","Apply the function f on the value in the Left variant if …","Apply the function f on the value in the Right variant if …","Applies map_op to the given init value with each item of …","Computes the maximum of all the items in the iterator. If …","Computes the maximum of all the items in the iterator with …","Computes the item that yields the maximum value for the …","Computes the minimum of all the items in the iterator. If …","Computes the minimum of all the items in the iterator with …","Computes the item that yields the minimum value for the …","Determines if the elements of this ParallelIterator are …","","","","","Creates a parallel iterator that produces an element …","","","Internal method used to define the behavior of this …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Wraps an iterator with a fuse in case of panics, to halt …","Creates a bridge from this type to a ParallelIterator.","Returns a draining parallel iterator over an entire …","Returns a draining parallel iterator over a range of the …","Extends an instance of the collection with the elements …","","Converts self into a parallel iterator.","Creates the parallel iterator from self.","","Lexicographically compares the elements of this …","","Partitions the items of a parallel iterator into a pair of …","Partitions and maps the items of a parallel iterator into …","Traits and functions used to implement parallel iteration. …","","","Searches for some item in the parallel iterator that …","Searches for the sequentially first item in the parallel …","Searches for the sequentially last item in the parallel …","Searches for items in the parallel iterator that match the …","Multiplies all the items in the iterator.","Reduces the items in the iterator into one item using op. …","Reduces the items in the iterator into one item using op. …","Creates a parallel iterator that endlessly repeats elt (by …","Creates a parallel iterator that produces n repeats of elt …","Produces a new iterator with the elements of this iterator …","","","Convert the right side of Either<L, R> to an Option<R>.","Apply the function f on the value in the Right variant if …","Return right value or given value","Return right or a default","Returns right value or computes it from a closure","","Creates an iterator that skips the first n elements.","Creates an iterator that skips n elements from anywhere in …","Creates an iterator that skips elements from anywhere in …","The split function takes arbitrary data and a closure that …","Creates an iterator that steps by the given amount","Sums up the items in the iterator.","Creates an iterator that yields the first n elements.","Takes only n repeats of the element, similar to the general","Creates an iterator that yields n elements from anywhere …","Creates an iterator that takes elements from anywhere in …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Performs a fallible parallel fold.","Performs a fallible parallel fold with a cloneable init …","Executes a fallible OP on each item produced by the …","Executes a fallible OP on a value returned by init with …","Executes a fallible OP on the given init value with each …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Reduces the items in the iterator into one item using a …","Reduces the items in the iterator into one item using a …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the left value","Returns the right value","Unzips the items of a parallel iterator into a pair of …","Unzips the results of the iterator into the specified …","Mutates each item of this iterator before yielding it.","Create a tree like parallel iterator from an initial root …","Create a tree like postfix parallel iterator from an …","Create a tree-like prefix parallel iterator from an …","Creates an iterator over the Some items of this iterator, …","Sets the maximum length of iterators desired to process in …","Sets the minimum length of iterators desired to process in …","Internal method used to define the behavior of this …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Iterates over tuples (A, B), where the items A are from …","Iterates tuples, repeating the element with items from …","The same as Zip, but requires that both iterators have the …","A consumer is effectively a generalized “fold” …","The Folder trait encapsulates the standard fold operation. …","The type of folder that this consumer can be converted …","The type of iterator we will become.","The type of item that will be produced by this producer …","The type of item returned by this producer.","The type of value returned by this callback. Analogous to …","A Producer is effectively a “splittable IntoIterator”. …","The ProducerCallback trait is a kind of generic closure, …","The reducer is the final step of a Consumer – after a …","The type of reducer that is produced if this consumer is …","The type of result that this consumer will ultimately …","The type of result that will ultimately be produced by the …","A stateless consumer can be freely copied. These consumers …","A variant on Producer which does not know its exact length …","This helper function is used to “connect” a parallel …","This helper function is used to “connect” a producer …","A variant of bridge_producer_consumer where the producer …","Invokes the callback with the given producer as argument. …","Finish consuming items, produce final result.","Consume next item and return new sequential state.","Consume items from the iterator until full, and return new …","Iterate the producer, feeding each element to folder, and …","Iterate the producer, feeding each element to folder, and …","Hint whether this Consumer would like to stop processing …","Hint whether this Folder would like to stop processing …","Convert the consumer into a folder that can consume items …","Convert self into an iterator; at this point, no more …","The maximum number of items that we will process …","The minimum number of items that we will process …","Reduce two final results into one; this is executed after a","Split midway into a new producer if possible, otherwise …","Split into two producers; one produces items 0..index, the …","Divide the consumer into two consumers, one processing …","Splits off a “left” consumer and returns it. The self …","Creates a reducer that can be used to combine the results …","A parallel iterator over the value in Some variant of an …","A parallel iterator over a reference to the Some variant …","A parallel iterator over a mutable reference to the Some …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Parallel iterator over a range, implemented for all …","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","","","","Parallel iterator over an inclusive range, implemented for …","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","","","","Parallel iterator over a result","Parallel iterator over an immutable reference to a result","Parallel iterator over a mutable reference to a result","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","Parallel iterator over slice in (non-overlapping) chunks …","Parallel iterator over slice in (non-overlapping) mutable …","Parallel iterator over immutable non-overlapping chunks of …","Parallel iterator over immutable non-overlapping chunks of …","Parallel iterator over mutable non-overlapping chunks of a …","Parallel iterator over mutable non-overlapping chunks of a …","Parallel iterator over immutable items in a slice","Parallel iterator over mutable items in a slice","Parallel extensions for slices.","Parallel extensions for mutable slices.","Parallel iterator over immutable non-overlapping chunks of …","Parallel iterator over immutable non-overlapping chunks of …","Parallel iterator over mutable non-overlapping chunks of a …","Parallel iterator over mutable non-overlapping chunks of a …","Parallel iterator over slices separated by a predicate","Parallel iterator over slices separated by a predicate, …","Parallel iterator over mutable slices separated by a …","Parallel iterator over mutable slices separated by a …","Parallel iterator over immutable overlapping windows of a …","Returns a plain slice, which is used to implement the rest …","Returns a plain mutable slice, which is used to implement …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","Return the remainder of the original slice that is not …","Return the remainder of the original slice that is not …","","","","","","","","","","","","","","","","","","","","","","","Returns a parallel iterator over the slice producing …","Returns a parallel iterator over the slice producing …","Returns a parallel iterator over at most chunk_size …","Returns a parallel iterator over chunk_size elements of …","Returns a parallel iterator over chunk_size elements of …","Returns a parallel iterator over at most chunk_size …","Returns a parallel iterator over at most chunk_size …","Returns a parallel iterator over chunk_size elements of …","Returns a parallel iterator over chunk_size elements of …","Returns a parallel iterator over at most chunk_size …","Sorts the slice in parallel.","Sorts the slice in parallel with a comparator function.","Sorts the slice in parallel with a key extraction function.","Sorts the slice in parallel with a key extraction function.","Sorts the slice in parallel, but might not preserve the …","Sorts the slice in parallel with a comparator function, …","Sorts the slice in parallel with a key extraction …","Returns a parallel iterator over subslices separated by …","Returns a parallel iterator over subslices separated by …","Returns a parallel iterator over mutable subslices …","Returns a parallel iterator over mutable subslices …","Returns a parallel iterator over all contiguous windows of …","Return the remainder of the original slice that is not …","Return the remainder of the original slice that is not …","Return the remainder of the original slice that is not …","Return the remainder of the original slice that is not …","Return the remainder of the original slice that is not …","Return the remainder of the original slice that is not …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Parallel iterator over the bytes of a string","Parallel iterator over the characters of a string, with …","Parallel iterator over the characters of a string","Parallel iterator over a string encoded as UTF-16","Parallel iterator over lines in a string","Parallel iterator over substrings that match a pattern, …","Parallel iterator over substrings that match a pattern","Parallel extensions for strings.","Parallel iterator over substrings separated by a pattern","Parallel iterator over substrings separated by ASCII …","Parallel iterator over substrings separated by a pattern","Parallel iterator over substrings separated by a …","Parallel iterator over substrings separated by whitespace","Returns a plain string slice, which is used to implement …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","Returns a parallel iterator over the bytes of a string.","Returns a parallel iterator over the characters of a …","Returns a parallel iterator over the characters of a …","Returns a parallel iterator over a string encoded as …","Returns a parallel iterator over the lines of a string, …","Returns a parallel iterator over substrings that match a …","Returns a parallel iterator over substrings that match a …","Returns a parallel iterator over substrings separated by a …","Returns a parallel iterator over the sub-slices of a …","Returns a parallel iterator over substrings separated by a …","Returns a parallel iterator over substrings terminated by a","Returns a parallel iterator over the sub-slices of a …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Draining parallel iterator that moves a range of …","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","Draining parallel iterator that moves a range out of a …","Parallel iterator that moves out of a vector.","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","",""],"i":[0,15,0,15,0,0,0,0,0,0,0,0,4,13,22,23,8,1,15,9,24,4,13,22,23,8,1,15,9,24,1,0,8,1,1,1,15,15,0,0,8,8,0,8,1,4,13,22,23,8,1,15,9,24,4,13,22,23,8,1,15,9,24,9,4,13,22,23,8,8,1,15,9,24,15,1,4,13,22,23,8,1,15,9,9,24,4,13,22,23,8,1,15,9,24,0,8,0,8,4,13,4,13,22,23,8,1,15,9,24,8,4,13,22,23,8,1,15,9,24,0,0,8,0,0,24,13,8,1,4,1,0,1,0,0,0,0,13,0,8,0,8,0,9,0,22,8,0,22,23,8,0,23,8,1,13,1,1,0,0,1,15,9,4,13,22,23,8,1,15,9,24,4,13,22,23,8,1,15,9,24,4,13,22,23,8,1,15,9,24,1,0,0,8,0,8,0,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,0,0,0,0,0,0,0,0,0,0,42,44,45,42,44,45,42,44,42,44,42,44,45,42,44,45,42,44,45,42,44,45,42,44,45,45,42,44,45,42,44,45,42,44,45,42,44,45,42,44,45,42,44,45,42,44,45,42,44,42,44,45,42,44,45,42,44,45,42,44,45,0,0,0,47,46,48,47,46,48,46,46,47,46,48,47,46,48,47,46,48,47,46,48,47,46,48,47,46,48,47,46,48,47,46,48,47,46,48,47,46,48,46,47,46,48,47,46,48,47,46,48,0,0,50,49,50,49,49,49,50,49,50,49,50,49,50,49,50,49,50,49,50,49,50,49,50,49,50,49,49,50,49,50,49,50,49,0,0,0,0,54,51,55,56,54,51,55,56,51,51,54,51,55,56,54,51,55,56,54,51,55,56,54,51,55,56,54,51,55,56,54,51,55,56,54,51,55,56,54,51,55,56,54,51,55,56,54,51,55,56,51,54,51,55,56,54,51,55,56,54,51,55,56,0,0,0,58,57,59,58,57,59,57,57,58,57,59,58,57,59,58,57,59,58,57,59,58,57,59,58,57,59,58,57,59,58,57,59,58,57,59,58,57,59,57,58,57,59,58,57,59,58,57,59,0,0,0,60,61,62,60,61,62,60,61,60,61,60,61,62,60,61,62,60,61,62,60,61,62,60,61,62,60,61,62,60,61,62,60,61,62,60,61,62,60,61,62,60,61,60,61,62,60,61,62,60,61,62,0,0,0,0,63,64,65,66,63,64,65,66,63,64,63,64,63,64,65,66,63,64,65,66,63,64,65,66,63,64,65,66,63,64,65,66,66,63,64,65,66,63,64,65,66,63,64,65,66,63,64,65,66,63,64,65,66,63,64,65,66,63,64,65,66,63,64,63,64,65,66,63,64,65,66,63,64,65,66,63,64,65,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,79,153,154,70,149,150,79,153,154,149,150,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,70,67,70,67,67,67,67,67,67,67,67,67,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,75,75,70,75,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,70,67,75,67,70,75,70,70,67,70,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,75,67,81,78,80,82,83,84,93,94,95,96,97,98,99,100,101,102,103,104,104,104,104,104,104,104,104,104,104,104,104,105,106,110,111,112,116,117,122,124,125,70,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,104,104,104,104,104,104,104,104,104,104,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,67,67,0,75,67,75,67,67,67,67,67,67,67,67,67,67,67,70,70,67,70,70,70,67,70,70,70,70,70,70,70,67,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,70,75,75,70,67,70,70,70,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,128,75,75,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,70,75,75,70,67,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,67,67,67,79,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,67,67,67,67,75,67,67,67,67,67,75,67,67,81,78,80,82,83,84,93,94,95,96,97,98,99,100,101,102,103,104,104,104,104,104,104,104,104,104,104,104,104,105,106,110,111,112,116,117,122,124,125,75,67,70,67,67,70,67,67,70,70,70,70,70,70,70,75,67,67,67,67,0,67,81,70,78,80,82,83,84,93,94,95,96,97,98,99,100,101,102,103,104,104,104,104,104,104,104,104,104,104,104,104,105,106,110,111,112,116,117,122,124,125,70,148,149,150,152,67,153,154,67,75,67,70,70,0,67,67,75,75,75,75,70,70,70,0,0,75,67,67,67,67,67,67,67,67,75,70,70,0,75,70,75,109,70,70,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,67,70,70,70,70,70,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,70,70,67,81,76,77,78,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,135,136,137,123,124,125,67,67,70,75,70,0,0,0,70,75,75,75,67,81,78,80,82,83,84,93,94,95,96,97,98,99,100,101,102,103,104,104,104,104,104,104,104,104,104,104,104,104,105,106,110,111,112,116,117,122,124,125,75,109,75,0,0,37,161,161,162,41,0,0,0,37,37,164,0,0,0,0,0,41,164,164,164,162,161,37,164,37,161,161,161,168,162,161,37,38,38,0,0,0,169,170,171,169,170,171,169,170,169,170,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,171,169,170,169,170,171,169,170,171,169,170,171,169,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,0,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,0,0,0,175,176,177,175,176,177,175,176,175,176,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,177,175,176,175,176,177,175,176,177,175,176,177,175,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,181,182,183,184,185,186,187,188,180,181,182,183,184,185,186,187,188,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,190,192,183,184,189,190,185,186,191,192,187,188,193,183,184,189,190,185,186,191,192,187,188,193,178,179,178,178,179,179,178,178,179,179,179,179,179,179,179,179,179,178,178,179,179,178,184,190,186,192,190,192,180,181,182,183,184,185,186,187,188,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,180,194,181,182,195,196,183,184,189,190,185,186,191,192,187,188,193,183,184,189,190,185,186,191,192,187,188,193,0,0,0,0,0,0,0,0,0,0,0,0,0,197,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,197,197,197,197,197,197,197,197,197,197,197,197,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,198,199,200,201,202,203,204,205,206,207,208,209,0,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,0,0,211,212,211,212,211,211,211,212,211,212,211,212,211,212,211,212,212,211,212,211,212,211,212,211,212,211,212,211,212,211,212,211,211,212,211,212,211,212,211,212],"f":"````````````{ce{}{}}00000000000000000{{{b{c}}}{{b{c}}}{}}{e{{d{c}}}f{{l{h}{{j{c}}}}n}}{{A`e}{{d{c}}}f{{l{h}{{j{c}}}}n}}{{{b{c}}}{{Ad{A`Ab}}}Af}{{{b{c}}}{{Ad{AhAb}}}Af}{{bcg}{{Ad{eAb}}}{{l{Aj}}n}{}{{Al{A`}{{j{e}}}}}}{AnAn}{{ce}Ah{}{}}`{{}B`}{A`B`}{A`{{Bd{Bb}}}}{{}{{Bd{B`}}}}{A`{{Bd{B`}}}}{{}b}{B`c{}}00000000000000000{AbBf}{B`Ah}0000{A`Ah}1111{{AnAn}Bb}{{{b{c}}e}{{b{c}}}{}{{l{B`}}fn}}{{hBh}{{Ad{AhBj}}}}{{AjBh}{{Ad{AhBj}}}}{{BlBh}{{Ad{AhBj}}}}{{BnBh}{{Ad{AhBj}}}}{{A`Bh}{{Ad{AhBj}}}}{{{b{c}}Bh}{{Ad{AhBj}}}{}}{{AnBh}{{Ad{AhBj}}}}{{AbBh}{{Ad{AhBj}}}}0{{C`Bh}{{Ad{AhBj}}}}{cc{}}00000000{ec{}{{Al{Bl}{{j{c}}}}}}{{A`e}c{}{{Al{Bl}{{j{c}}}}}}{ec{}{{Al{Bn}{{j{c}}}}}}{{A`e}c{}{{Al{Bn}{{j{c}}}}}}{hB`}{AjB`}{{}B`}00000000{{A`e}cf{{Al{}{{j{c}}}}f}}{ce{}{}}00000000`{{ei}{{Cb{cg}}}f{{Al{}{{j{c}}}}f}f{{Al{}{{j{g}}}}f}}{{A`ei}{{Cb{cg}}}f{{Al{}{{j{c}}}}f}f{{Al{}{{j{g}}}}f}}{{ei}{{Cb{cg}}}f{{Al{C`}{{j{c}}}}f}f{{Al{C`}{{j{g}}}}f}}5{C`Bb}{Aj{{Bd{Bf}}}}{Cd{{Ad{A`{Ch{Cf}}}}}}{{}b};{{{b{c}}B`}{{b{c}}}{}}`{{{b{c}}e}{{b{c}}}{}{{l{{Ch{Cj}}}}fn}}````{AjAh}{ecf{{Al{Bl}{{j{c}}}}f}}{{A`e}cf{{Al{Bl}{{j{c}}}}f}}{ecf{{Al{Bn}{{j{c}}}}f}}{{A`e}cf{{Al{Bn}{{j{c}}}}f}}`{Ab{{Bd{Cf}}}}{cAh{Alf}}{{Blc}Ah{{Al{Bl}}f}}{{A`c}Ah{Alf}}{cAh{{l{h}}fn}}{{Blc}Ah{{l{Blh}}fn}}{{Bnc}Ah{{l{Bnh}}fn}}{{A`c}Ah{{l{h}}fn}}6{{Bnc}Ah{{Al{Bn}}f}}5{{{b{c}}e}{{b{{Cl{e}}}}}{}{{D`{Aj}{{j{{Ad{AhCn}}}}}}}}{Aj{{Bd{B`}}}}{{{b{c}}B`}{{b{c}}}{}}{{{b{c}}e}{{b{c}}}{}{{l{B`}}fn}}``{{{b{c}}e}{{b{c}}}{}{{D`{B`}{{j{Db}}}}}}{ce{}{}}{cDb{}}{c{{Ad{e}}}{}{}}00000000000000000{cDd{}}00000000{{{b{c}}}{{b{c}}}{}}`{{}{{Bd{An}}}}{A`{{Bd{An}}}}10`66{{{Df{c}}}{{Df{c}}}{Dhf}}{{ce}Ah{}{}}{B`c{}}0{{{Df{c}}g}{}f{}{{Dj{e}}}}{{{Df{c}}g}{}f{}{{Dl{e}}}}{B`Ah}{{{Df{c}}Bh}Dn{E`f}}{cc{}}{{}B`}??{{{Df{c}}}B`f}{{{Df{c}}}{{Bd{B`}}}f}{ce{}{}}{c{{Ad{e}}}{}{}}0{cDd{}}{{{Df{c}}g}{}f{}{{Eb{e}}}}``````````333333{{{Ed{c}}}{{Ed{c}}}{DhEff}}{{{Eh{c}}}{{Eh{c}}}{Efn}}??>>>>>>{{{Ed{c}}g}{}{Eff}{}{{Dj{e}}}}{{{Eh{c}}g}{}{Efn}{}{{Dj{e}}}}{{{Ej{c}}g}{}{Eff}{}{{Dj{e}}}}{{{Ed{c}}g}{}{Eff}{}{{Dl{e}}}}{{{Eh{c}}g}{}{Efn}{}{{Dl{e}}}}{{{Ej{c}}g}{}{Eff}{}{{Dl{e}}}}{B`Ah}0{{{Ej{c}}}Ah{Eff}}1{{{Ed{c}}Bh}Dn{E`Eff}}{{{Eh{c}}Bh}Dn{E`Efn}}{{{Ej{c}}Bh}Dn{E`Eff}}{cc{}}00{{}B`}00{ce{}{}}00000{{{Ed{c}}}B`{Eff}}{{{Eh{c}}}B`{Efn}}{{{Ej{c}}}B`{Eff}}{{{Ed{c}}}{{Bd{B`}}}{Eff}}{{{Eh{c}}}{{Bd{B`}}}{Efn}}{{{Ej{c}}}{{Bd{B`}}}{Eff}}66{c{{Ad{e}}}{}{}}00000{cDd{}}00{{{Ed{c}}g}{}{Eff}{}{{Eb{e}}}}{{{Eh{c}}g}{}{Efn}{}{{Eb{e}}}}{{{Ej{c}}g}{}{Eff}{}{{Eb{e}}}}```;;;;;;{{{El{ce}}}{{El{ce}}}{Efn}n}{{ce}Ah{}{}}{B`c{}}00000{{{En{ce}}i}{}{Eff}f{}{{Dl{g}}}}{{{El{ce}}i}{}{Efn}n{}{{Dl{g}}}}{{{F`{ce}}i}{}{Efn}f{}{{Dl{g}}}}{B`Ah}00{{{En{ce}}Bh}Dn{E`Eff}{E`f}}{{{El{ce}}Bh}Dn{E`Efn}{E`n}}{{{F`{ce}}Bh}Dn{E`Efn}{E`f}}{cc{}}00{{}B`}00{ce{}{}}00000{{{En{ce}}}{{Bd{B`}}}{Eff}f}{{{El{ce}}}{{Bd{B`}}}{Efn}n}{{{F`{ce}}}{{Bd{B`}}}{Efn}f}3{c{{Ad{e}}}{}{}}00000{cDd{}}00``5555{{{Fb{c}}}{{Fb{c}}}{Efn}}{{ce}Ah{}{}}{B`c{}}000{{{Fd{c}}g}{}{Eff}{}{{Dl{e}}}}{{{Fb{c}}g}{}{Efn}{}{{Dl{e}}}}{B`Ah}0{{{Fd{c}}Bh}Dn{E`Eff}}{{{Fb{c}}Bh}Dn{E`Efn}}??>>===={{{Fd{c}}}{{Bd{B`}}}{Eff}}{{{Fb{c}}}{{Bd{B`}}}{Efn}}?;;;;::````????????{{{Ff{ce}}}{{Ff{ce}}}{FhFjn}n}988888888{{{Fl{ce}}i}{}{FhFjf}f{}{{Dl{g}}}}{{{Ff{ce}}i}{}{FhFjn}n{}{{Dl{g}}}}{{{Fn{ce}}i}{}{FhFjn}f{}{{Dl{g}}}}{{{G`{ce}}i}{}{FhFjf}f{}{{Dl{g}}}}9999{{{Fl{ce}}Bh}Dn{E`FhFjf}{E`f}}{{{Ff{ce}}Bh}Dn{E`FhFjn}{E`n}}{{{Fn{ce}}Bh}Dn{E`FhFjn}{E`f}}{{{G`{ce}}Bh}Dn{E`FhFjf}{E`f}}{cc{}}000{{}B`}000{ce{}{}}0000000{{{Fl{ce}}}{{Bd{B`}}}{FhFjf}f}{{{Ff{ce}}}{{Bd{B`}}}{FhFjn}n}{{{Fn{ce}}}{{Bd{B`}}}{FhFjn}f}{{{G`{ce}}}{{Bd{B`}}}{FhFjf}f}4{c{{Ad{e}}}{}{}}0000000{cDd{}}000```666666{{{Gb{c}}}{{Gb{c}}}{FhFjn}}{{ce}Ah{}{}}{B`c{}}00000{{{Gd{c}}g}{}{FhFjf}{}{{Dl{e}}}}{{{Gb{c}}g}{}{FhFjn}{}{{Dl{e}}}}{{{Gf{c}}g}{}{FhFjf}{}{{Dl{e}}}}{B`Ah}00{{{Gd{c}}Bh}Dn{E`FhFjf}}{{{Gb{c}}Bh}Dn{E`FhFjn}}{{{Gf{c}}Bh}Dn{E`FhFjf}}{cc{}}00{{}B`}00{ce{}{}}00000{{{Gd{c}}}{{Bd{B`}}}{FhFjf}}{{{Gb{c}}}{{Bd{B`}}}{FhFjn}}{{{Gf{c}}}{{Bd{B`}}}{FhFjf}}3{c{{Ad{e}}}{}{}}00000{cDd{}}00```555555{{{Gh{c}}}{{Gh{c}}}{Dhf}}{{{Gj{c}}}{{Gj{c}}}n}{{ce}Ah{}{}}0{B`c{}}00000{{{Gh{c}}g}{}f{}{{Dl{e}}}}{{{Gj{c}}g}{}n{}{{Dl{e}}}}{{{Gl{c}}g}{}f{}{{Dl{e}}}}{B`Ah}00{{{Gh{c}}Bh}Dn{E`f}}{{{Gj{c}}Bh}Dn{E`n}}{{{Gl{c}}Bh}Dn{E`f}}{cc{}}00{{}B`}00{ce{}{}}00000{{{Gh{c}}}{{Bd{B`}}}f}{{{Gj{c}}}{{Bd{B`}}}n}{{{Gl{c}}}{{Bd{B`}}}f}33{c{{Ad{e}}}{}{}}00000{cDd{}}00````55555555{{{Gn{c}}}{{Gn{c}}}{Dhf}}{{{H`{c}}}{{H`{c}}}n}{{ce}Ah{}{}}0{B`c{}}0000000{{{Gn{c}}g}{}f{}{{Dj{e}}}}{{{H`{c}}g}{}n{}{{Dj{e}}}}{{{Hb{c}}g}{}f{}{{Dj{e}}}}{{{Hd{c}}g}{}f{}{{Dj{e}}}}{{{Gn{c}}g}{}f{}{{Dl{e}}}}{{{H`{c}}g}{}n{}{{Dl{e}}}}{{{Hb{c}}g}{}f{}{{Dl{e}}}}{{{Hd{c}}g}{}f{}{{Dl{e}}}}{B`Ah}000{{{Hd{c}}}Ahf}{{{Gn{c}}Bh}Dn{E`f}}{{{H`{c}}Bh}Dn{E`n}}{{{Hb{c}}Bh}Dn{E`f}}{{{Hd{c}}Bh}Dn{E`f}}{cc{}}000{{}B`}000{ce{}{}}0000000{{{Gn{c}}}B`f}{{{H`{c}}}B`n}{{{Hb{c}}}B`f}{{{Hd{c}}}B`f}{{{Gn{c}}}{{Bd{B`}}}f}{{{H`{c}}}{{Bd{B`}}}n}{{{Hb{c}}}{{Bd{B`}}}f}{{{Hd{c}}}{{Bd{B`}}}f}88{c{{Ad{e}}}{}{}}0000000{cDd{}}000{{{Gn{c}}g}{}f{}{{Eb{e}}}}{{{H`{c}}g}{}n{}{{Eb{e}}}}{{{Hb{c}}g}{}f{}{{Eb{e}}}}{{{Hd{c}}g}{}f{}{{Eb{e}}}}````````````````````````````````````````````````````````````````````````````{{{Hf{ce}}g}BbHh{{Hh{}{{Hj{}}}}}{{D`{}{{j{Bb}}}}}}{{{Hl{}{{Hj{c}}}}e}Bbf{{l{c}{{j{Bb}}}}nf}}10{{{Hf{ce}}}Bf{{Hn{Bf}}}{{Hn{Bf}}}}{{{Hf{eg}}}{{I`{c}}}{}{{Hn{{I`{c}}}}}{{Hn{{I`{c}}}}}}{{{Hf{eg}}}c{}{{Hn{c}}}{{Hn{c}}}}{{{Hf{ce}}}{{Hf{ce}}}{}{}}{{{Ib{{Hf{ce}}}}}{{Hf{{Ib{c}}{Ib{e}}}}}{}{}}0{{{Hf{eg}}}{{I`{c}}}{}{{Id{{I`{c}}}}}{{Id{{I`{c}}}}}}{{{Hf{ce}}}Bf{{Id{Bf}}}{{Id{Bf}}}}{{{Hf{eg}}}c{}{{Id{c}}}{{Id{c}}}}4{ce{}{}}000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000{If{{Ih{If}}}}{{IfB`}{{Ij{If}}}}{{{Hl{}{{Hj{c}}}}e}{{Il{{Hl{}{{Hj{c}}}}}}}f{{In{}{{Hj{c}}}}}}{{IfB`}{{J`{If}}}}{{{Hf{ce}}}{{Hf{ce}}}DhDh}{{{Jb{c}}}{{Jb{c}}}f}{{{Ih{c}}}{{Ih{c}}}Dh}{{{Ij{c}}}{{Ij{c}}}Dh}{{{Il{ce}}}{{Il{ce}}}{HlDh}{{Hl{}{{Hj{}}}}Dh}}{{{J`{c}}}{{J`{c}}}{IfDh}}{{{Jd{c}}}{{Jd{c}}}{DhHl}}{{{Jf{c}}}{{Jf{c}}}{DhHl}}{{{Jh{c}}}{{Jh{c}}}{DhIf}}{{{Jj{ce}}}{{Jj{ce}}}{DhHl}Dh}{{{Jl{ce}}}{{Jl{ce}}}{DhHl}Dh}{{{Jn{ce}}}{{Jn{ce}}}{DhHl}Dh}{{{K`{ce}}}{{K`{ce}}}{DhHl}Dh}{{{Kb{c}}}{{Kb{c}}}{DhHl}}{{{Kd{c}}}{{Kd{c}}}{DhHl}}{{{Kf{ceg}}}{{Kf{ceg}}}DhDhDh}{{{Kh{ceg}}}{{Kh{ceg}}}DhDhDh}{{{Kj{ceg}}}{{Kj{ceg}}}{IfDh}DhDh}{{{Kl{ceg}}}{{Kl{ceg}}}{IfDh}DhDh}{{{Kn{ce}}}{{Kn{ce}}}{DhHl}Dh}{{{L`{ce}}}{{L`{ce}}}{IfDh}{{If{}{{Hj{}}}}Dh}}{{{Lb{ce}}}{{Lb{ce}}}{IfDh}{{If{}{{Hj{}}}}Dh}}{{{Ld{c}}}{{Ld{c}}}{HlDh}}{{{Lf{c}}}{{Lf{c}}}{DhIf}}{{{Lh{c}}}{{Lh{c}}}{DhIf}}{{{Lj{ce}}}{{Lj{ce}}}{DhHl}Dh}{{{Ll{ceg}}}{{Ll{ceg}}}{DhHl}DhDh}{{{Ln{ceg}}}{{Ln{ceg}}}{DhHl}DhDh}{{{M`{c}}}{{M`{c}}}Dh}{{{Mb{c}}}{{Mb{c}}}{Dhf}}{{{Md{c}}}{{Md{c}}}{DhHl}}{{{Mf{c}}}{{Mf{c}}}Dh}{{{Mh{ce}}}{{Mh{ce}}}{DhIf}Dh}{{{Mj{c}}}{{Mj{c}}}{DhDhf}}{{{Ml{c}}}{{Ml{c}}}{DhDhf}}{{{Mn{c}}}{{Mn{c}}}{DhIf}}{{{N`{c}}}{{N`{c}}}Dh}{{{Nb{c}}}{{Nb{c}}}{DhHl}}{{{Nd{ce}}}{{Nd{ce}}}{DhHl}Dh}{{{Nf{ce}}}{{Nf{ce}}}DhDh}{{{Nh{c}}}{{Nh{c}}}{DhIf}}{{{Nj{c}}}{{Nj{c}}}Dh}{{{Nl{c}}}{{Nl{c}}}{DhHl}}{{{Nn{ce}}}{{Nn{ce}}}{DhHl}Dh}{{{O`{cegi}}}{{O`{cegi}}}DhDhDhDh}{{{Ob{ceg}}}{{Ob{ceg}}}Dh{Dh`}Dh}{{{Od{ce}}}{{Od{ce}}}{DhHl}Dh}{{{Of{c}}}{{Of{c}}}{DhHl}}{{{Oh{ce}}}{{Oh{ce}}}{DhIf}{DhIf}}{{{Oj{ce}}}{{Oj{ce}}}{DhIf}{DhIf}}{{{Hf{ce}}{Hf{ce}}}AhDhDh}{{ce}Ah{}{}}0000000000000000000000000000000000000000000000000{{{Hl{}{{Hj{c}}}}}{{Jd{{Hl{}{{Hj{c}}}}}}}f}{{{Hf{ce}}{Hf{ce}}}OlEfEf}{{Ife}Ol{}{{In{}{{Hj{c}}}}}}{{{Hf{ce}}}gHh{{Hh{}{{Hj{}}}}}On}{{{Hl{}{{Hj{c}}}}}ef{{A`{c}}}}{{If{d{c}}}Ah{}}{{{Hl{}{{Hj{c}}}}}{{Ab{{d{c}}}}}f}{{{Hl{}{{Hj{c}}}}}{{Jf{{Hl{}{{Hj{c}}}}}}}f}{{{Hf{ce}}}B`Hh{{Hh{}{{Hj{}}}}}}{{{Hl{}{{Hj{c}}}}}B`f}{B`c{}}{{{Hf{ce}}}{}Ad{{Ad{}{{Af{}}}}}}11111111111111111111111111111111111111111111111111111{{{Hf{ce}}}{}Ah{{Ah{}{{Af{}}}}}}2222222222222222222222222222222222222222222222222222{{Ife}{}{}{{Dj{c}}}}{{{Hf{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Dj{g}}}}{{{Jb{c}}g}{}f{}{{Dj{e}}}}{{{Il{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Dj{g}}}}{{{J`{c}}g}{}If{}{{Dj{e}}}}{{{Jd{e}}i}{}{Dhfn}{{If{}{{Hj{c}}}}}{}{{Dj{g}}}}{{{Jf{e}}i}{}{Ajfn}{{If{}{{Hj{c}}}}}{}{{Dj{g}}}}{{{Jh{c}}g}{}If{}{{Dj{e}}}}{{{Kj{cgi}}m}{}Iff{{l{}{{j{e}}}}fn}{{l{e}{{j{e}}}}fn}{}{{Dj{k}}}}{{{Kl{ceg}}k}{}If{fDh}{{l{e}{{j{e}}}}fn}{}{{Dj{i}}}}{{{Kn{ce}}i}{}If{lnf}{}{{Dj{g}}}}{{{L`{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Dj{g}}}}{{{Lb{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Dj{g}}}}{{{Ld{c}}g}{}If{}{{Dj{e}}}}{{{Lf{c}}g}{}If{}{{Dj{e}}}}{{{Lh{c}}g}{}If{}{{Dj{e}}}}{{{Lj{cg}}k}{}Iff{{l{}{{j{e}}}}nf}{}{{Dj{i}}}}{{{Ll{cei}}m}{}If{fDh}f{{l{e}{{j{g}}}}nf}{}{{Dj{k}}}}{{{Ln{cgk}}o}{}If{}{{l{}{{j{e}}}}nf}f{{l{e}{{j{i}}}}nf}{}{{Dj{m}}}}{{{M`{{Cb{cegikmoAa}}}}Ae}{}IfIfIfIfIfIfIfIf{}{{Dj{Ac}}}}{{{M`{{Cb{ce}}}}i}{}IfIf{}{{Dj{g}}}}{{{M`{{Cb{cegikmoAaAcAeAgAi}}}}Am}{}IfIfIfIfIfIfIfIfIfIfIfIf{}{{Dj{Ak}}}}{{{M`{{Cb{cegik}}}}o}{}IfIfIfIfIf{}{{Dj{m}}}}{{{M`{{Cb{cegi}}}}m}{}IfIfIfIf{}{{Dj{k}}}}{{{M`{{Cb{cegikm}}}}Aa}{}IfIfIfIfIfIf{}{{Dj{o}}}}{{{M`{{Cb{cegikmoAaAc}}}}Ag}{}IfIfIfIfIfIfIfIfIf{}{{Dj{Ae}}}}{{{M`{{Cb{ceg}}}}k}{}IfIfIf{}{{Dj{i}}}}{{{M`{{Cb{cegikmoAaAcAeAg}}}}Ak}{}IfIfIfIfIfIfIfIfIfIfIf{}{{Dj{Ai}}}}{{{M`{{Cb{c}}}}g}{}If{}{{Dj{e}}}}{{{M`{{Cb{cegikmoAaAcAe}}}}Ai}{}IfIfIfIfIfIfIfIfIfIf{}{{Dj{Ag}}}}{{{M`{{Cb{cegikmo}}}}Ac}{}IfIfIfIfIfIfIf{}{{Dj{Aa}}}}{{{Mb{c}}g}{}f{}{{Dj{e}}}}{{{Md{c}}g}{}If{}{{Dj{e}}}}{{{Ml{c}}g}{}{Dhf}{}{{Dj{e}}}}{{{Mn{c}}g}{}If{}{{Dj{e}}}}{{{N`{c}}g}{}If{}{{Dj{e}}}}{{{Nh{c}}g}{}If{}{{Dj{e}}}}{{{Nj{c}}g}{}If{}{{Dj{e}}}}{{{Od{ce}}i}{}If{lfn}{}{{Dj{g}}}}{{{Oh{ce}}i}{}IfIf{}{{Dj{g}}}}{{{Oj{ce}}i}{}IfIf{}{{Dj{g}}}}{{{Hl{}{{Hj{c}}}}e}{}f{{Dl{c}}}}{{{Hf{ce}}i}{}Hl{{Hl{}{{Hj{}}}}}{}{{Dl{g}}}}{{{Jb{c}}g}{}f{}{{Dl{e}}}}{{{Ih{c}}g}{}If{}{{Dl{e}}}}{{{Ij{c}}g}{}If{}{{Dl{e}}}}{{{Il{ce}}i}{}Hl{{Hl{}{{Hj{}}}}}{}{{Dl{g}}}}{{{J`{c}}e}{}If{{Dj{d}}}}{{{Jd{e}}i}{}{Dhfn}{{Hl{}{{Hj{c}}}}}{}{{Dl{g}}}}{{{Jf{e}}i}{}{Ajfn}{{Hl{}{{Hj{c}}}}}{}{{Dl{g}}}}{{{Jh{c}}g}{}If{}{{Dl{e}}}}{{{Jj{ce}}i}{}Hl{{l{}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{Jl{cg}}k}{}Hlf{{l{}{{j{{Bd{e}}}}}}nf}{}{{Dl{i}}}}{{{Jn{cg}}k}{}HlIn{{l{}{{j{e}}}}nf}{}{{Dl{i}}}}{{{K`{cg}}k}{}HlAl{{l{}{{j{e}}}}nf}{}{{Dl{i}}}}{{{Kb{c}}g}{}Hl{}{{Dl{e}}}}{{{Kd{c}}g}{}Hl{}{{Dl{e}}}}{{{Kf{cgi}}m}{}Hlf{{l{}{{j{e}}}}nf}{{l{e}{{j{e}}}}nf}{}{{Dl{k}}}}{{{Kh{ceg}}k}{}Hl{fDh}{{l{e}{{j{e}}}}nf}{}{{Dl{i}}}}{{{Kj{cgi}}k}{}Iff{{l{}{{j{e}}}}fn}{{l{e}{{j{e}}}}fn}{{Dj{e}}}}{{{Kl{ceg}}i}{}If{fDh}{{l{e}{{j{e}}}}fn}{{Dj{e}}}}{{{Kn{ce}}i}{}Hl{lnf}{}{{Dl{g}}}}{{{L`{ce}}g}{}If{{If{}{{Hj{}}}}}Dj}{{{Lb{ce}}g}{}If{{If{}{{Hj{}}}}}Dj}{{{Ld{c}}e}{}HlDl}{{{Lf{c}}g}{}If{}{{Dl{e}}}}{{{Lh{c}}g}{}If{}{{Dl{e}}}}{{{Lj{cg}}k}{}Hlf{{l{}{{j{e}}}}nf}{}{{Dl{i}}}}{{{Ll{cei}}m}{}Hl{fDh}f{{l{e}{{j{g}}}}nf}{}{{Dl{k}}}}{{{Ln{cgk}}o}{}Hl{}{{l{}{{j{e}}}}nf}f{{l{e}{{j{i}}}}nf}{}{{Dl{m}}}}{{{M`{{Cb{c}}}}g}{}If{}{{Dl{e}}}}{{{M`{{Cb{cegikmoAaAc}}}}Ag}{}IfIfIfIfIfIfIfIfIf{}{{Dl{Ae}}}}{{{M`{{Cb{cegikmoAaAcAeAgAi}}}}Am}{}IfIfIfIfIfIfIfIfIfIfIfIf{}{{Dl{Ak}}}}{{{M`{{Cb{cegikmo}}}}Ac}{}IfIfIfIfIfIfIf{}{{Dl{Aa}}}}{{{M`{{Cb{ceg}}}}k}{}IfIfIf{}{{Dl{i}}}}{{{M`{{Cb{cegikmoAa}}}}Ae}{}IfIfIfIfIfIfIfIf{}{{Dl{Ac}}}}{{{M`{{Cb{ce}}}}i}{}IfIf{}{{Dl{g}}}}{{{M`{{Cb{cegikmoAaAcAe}}}}Ai}{}IfIfIfIfIfIfIfIfIfIf{}{{Dl{Ag}}}}{{{M`{{Cb{cegikmoAaAcAeAg}}}}Ak}{}IfIfIfIfIfIfIfIfIfIfIf{}{{Dl{Ai}}}}{{{M`{{Cb{cegik}}}}o}{}IfIfIfIfIf{}{{Dl{m}}}}{{{M`{{Cb{cegikm}}}}Aa}{}IfIfIfIfIfIf{}{{Dl{o}}}}{{{M`{{Cb{cegi}}}}m}{}IfIfIfIf{}{{Dl{k}}}}{{{Mb{c}}g}{}f{}{{Dl{e}}}}{{{Md{c}}g}{}Hl{}{{Dl{e}}}}{{{Mf{c}}g}{}{Hhf}{}{{Dl{e}}}}{{{Mh{ce}}i}{}If{{l{}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{Mj{c}}g}{}{Dhf}{}{{Dl{e}}}}{{{Ml{c}}g}{}{Dhf}{}{{Dl{e}}}}{{{Mn{c}}g}{}If{}{{Dl{e}}}}{{{N`{c}}g}{}If{}{{Dl{e}}}}{{{Nb{c}}g}{}Hl{}{{Dl{e}}}}{{{Nd{ce}}i}{}Hl{{l{}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{Nf{ce}}i}{}f{{l{c}{{j{{Cb{c{Bd{c}}}}}}}}nf}{}{{Dl{g}}}}{{{Nh{c}}g}{}If{}{{Dl{e}}}}{{{Nj{c}}g}{}If{}{{Dl{e}}}}{{{Nl{c}}g}{}Hl{}{{Dl{e}}}}{{{Nn{ce}}i}{}Hl{{l{}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{O`{cegi}}m}{}Hl{`f}{{l{}{{j{}}}}nf}{{l{}{{j{e}}}}nf}{}{{Dl{k}}}}{{{Ob{ceg}}k}{}Hl{`f}{{l{}{{j{e}}}}nf}{}{{Dl{i}}}}{{{Od{ce}}i}{}Hl{lfn}{}{{Dl{g}}}}{{{An{cg}}k}{}f{{Al{}{{Hj{c}}}}}{{l{c}{{j{e}}}}fn}{}{{Dl{i}}}}{{{AA`{cg}}k}{}f{{Al{}{{Hj{c}}}}}{{l{c}{{j{e}}}}fn}{}{{Dl{i}}}}{{{AAb{cg}}k}{}f{{Al{}{{Hj{c}}}}f}{{l{c}{{j{e}}}}fn}{}{{Dl{i}}}}{{{Of{e}}i}{}f{{Hl{}{{Hj{{Bd{c}}}}}}}{}{{Dl{g}}}}{{{Oh{ce}}i}{}IfIf{}{{Dl{g}}}}{{{Oj{ce}}i}{}IfIf{}{{Dl{g}}}}{B`Ah}0000000000000000000000000000000000000000000000000000{{{Hf{ce}}ik}g{}{}{}{{Al{c}{{j{g}}}}}{{Al{e}{{j{g}}}}}}{{{Hf{eg}}}c{}{{AAd{c}}}{{AAd{c}}}}{{{Hf{ce}}gkm}i{}{}{}{}{{Al{gc}{{j{i}}}}}{{Al{ge}{{j{i}}}}}}{{}{{Jb{c}}}f}{If{{Jh{If}}}}{{{Hf{ce}}{Hf{ce}}}BbAAfAAf}{{Ifc}BbIn}{{{Hf{ce}}Bf}c{}E`}{{{Hf{ce}}Bf}eE`{}}{{{Hf{eg}}i}Ah{}{{AAh{c}}}{{AAh{c}}}{{Al{}{{Hj{c}}}}}}{{{Hf{{Ad{ce}}{Ad{ge}}}}}{{Ad{{Hf{cg}}e}}}{}{}{}}{{{Hf{{Cb{ce}}{Cb{cg}}}}}{{Cb{c{Hf{eg}}}}}{}{}{}}{{{Hf{ce}}}AAjAlAl}{{{Hf{ce}}}AAj{}{}}0{{{Hf{{Bd{c}}{Bd{e}}}}}{{Bd{{Hf{ce}}}}}{}{}}{{{Hf{{Ad{ce}}{Ad{cg}}}}}{{Ad{c{Hf{eg}}}}}{}{}{}}{{{Hf{{Cb{ce}}{Cb{ge}}}}}{{Cb{{Hf{cg}}e}}}{}{}{}}{{{Hl{}{{Hj{c}}}}e}{{Jj{{Hl{}{{Hj{c}}}}e}}}f{{l{c}{{j{Bb}}}}nf}}{{{Hl{}{{Hj{c}}}}g}{{Jl{{Hl{}{{Hj{c}}}}g}}}ff{{l{c}{{j{{Bd{e}}}}}}nf}}{{{Hf{ce}}g}BdHh{{Hh{}{{Hj{}}}}}{{D`{}{{j{Bb}}}}}}{{{Hl{}{{Hj{c}}}}e}{{Bd{c}}}f{{l{c}{{j{Bb}}}}nf}}00{{{Hf{ce}}i}{{Bd{g}}}Hh{{Hh{}{{Hj{}}}}}{}{{D`{}{{j{{Bd{g}}}}}}}}{{{Hl{}{{Hj{c}}}}g}{{Bd{e}}}ff{{l{c}{{j{{Bd{e}}}}}}nf}}00{{{Hl{}{{Hj{c}}}}g}{{Jn{{Hl{}{{Hj{c}}}}g}}}fIn{{l{c}{{j{e}}}}nf}}{{{Hl{}{{Hj{c}}}}g}{{K`{{Hl{}{{Hj{c}}}}g}}}fAl{{l{c}{{j{e}}}}nf}}{{{Hl{}{{Hj{c}}}}}{{Kb{{Hl{}{{Hj{c}}}}}}}f}{{{Hl{}{{Hj{c}}}}}{{Kd{{Hl{}{{Hj{c}}}}}}}f}{{{Hf{ce}}}{{Hf{ec}}}{}{}}{{{Hf{ce}}Bh}{{Ad{AhBj}}}E`E`}{{{Hf{ce}}Bh}{{Ad{AhBj}}}AAlAAl}{{{Jb{c}}Bh}Dnf}{{{Ih{c}}Bh}DnE`}{{{Ij{c}}Bh}DnE`}{{{Il{ce}}Bh}Dn{HlE`}{{Hl{}{{Hj{}}}}E`}}{{{J`{c}}Bh}Dn{IfE`}}{{{Jd{c}}Bh}Dn{E`Hl}}{{{Jf{c}}Bh}Dn{E`Hl}}{{{Jh{c}}Bh}Dn{E`If}}{{{Jj{ce}}Bh}Dn{HlE`}{}}{{{Jl{ce}}Bh}Dn{HlE`}{}}{{{Jn{ce}}Bh}Dn{HlE`}{}}{{{K`{ce}}Bh}Dn{HlE`}{}}{{{Kb{c}}Bh}Dn{E`Hl}}{{{Kd{c}}Bh}Dn{E`Hl}}{{{Kf{ceg}}Bh}Dn{HlE`}{}{}}{{{Kh{ceg}}Bh}Dn{HlE`}E`{}}{{{Kj{ceg}}Bh}Dn{IfE`}{}{}}{{{Kl{ceg}}Bh}Dn{IfE`}E`{}}{{{Kn{ce}}Bh}Dn{HlE`}{}}{{{L`{ce}}Bh}Dn{IfE`}{{If{}{{Hj{}}}}E`}}{{{Lb{ce}}Bh}Dn{IfE`}{{If{}{{Hj{}}}}E`}}{{{Ld{c}}Bh}Dn{HlE`}}{{{Lf{c}}Bh}Dn{E`If}}{{{Lh{c}}Bh}Dn{E`If}}{{{Lj{ce}}Bh}Dn{HlE`}{}}{{{Ll{ceg}}Bh}Dn{HlE`}E`{}}{{{Ln{ceg}}Bh}Dn{HlE`}{}{}}{{{M`{c}}Bh}DnE`}{{{Mb{c}}Bh}Dn{E`f}}{{{Md{c}}Bh}Dn{E`Hl}}{{{Mf{c}}Bh}DnE`}{{{Mh{ce}}Bh}Dn{IfE`}{}}{{{Mj{c}}Bh}Dn{E`Dhf}}{{{Ml{c}}Bh}Dn{E`Dhf}}{{{Mn{c}}Bh}Dn{E`If}}{{{N`{c}}Bh}DnE`}{{{Nb{c}}Bh}Dn{E`Hl}}{{{Nd{ce}}Bh}Dn{HlE`}{}}{{{Nf{ce}}Bh}DnE`{}}{{{Nh{c}}Bh}Dn{E`If}}{{{Nj{c}}Bh}DnE`}{{{Nl{c}}Bh}Dn{E`Hl}}{{{Nn{ce}}Bh}Dn{HlE`}{}}{{{O`{cegi}}Bh}Dn{HlE`}{}{}{}}{{{Ob{ceg}}Bh}Dn{HlE`}`{}}{{{Od{ce}}Bh}Dn{HlE`}{}}{{{An{ce}}Bh}DnE`E`}{{{AA`{ce}}Bh}DnE`E`}{{{AAb{ce}}Bh}DnE`E`}{{{Of{c}}Bh}Dn{E`Hl}}{{{Oh{ce}}Bh}Dn{E`If}{E`If}}{{{Oj{ce}}Bh}Dn{E`If}{E`If}}{{{Hf{ce}}gi}gHh{{Hh{}{{Hj{}}}}}{}{{D`{g}{{j{g}}}}}}{{{Hl{}{{Hj{c}}}}gi}{{Kf{{Hl{}{{Hj{c}}}}gi}}}ff{{l{}{{j{e}}}}nf}{{l{ec}{{j{e}}}}nf}}{{IfB`ei}{{Kj{Ifei}}}f{{l{}{{j{c}}}}fn}{}{{l{cg}{{j{c}}}}fn}}{{IfB`cg}{{Kl{Ifcg}}}{fDh}{}{{l{ce}{{j{c}}}}fn}}{{{Hl{}{{Hj{c}}}}eg}{{Kh{{Hl{}{{Hj{c}}}}eg}}}f{fDh}{{l{ec}{{j{e}}}}nf}}{{{Hf{ce}}g}AhHh{{Hh{}{{Hj{}}}}}D`}{{{Hl{}{{Hj{c}}}}e}Ahf{{l{c}}nf}}{{{Hl{}{{Hj{c}}}}gi}Ahf{}{{l{}{{j{e}}}}nf}{{l{ec}}nf}}{{{Hl{}{{Hj{c}}}}eg}Ahf{fDh}{{l{ec}}nf}}{cc{}}{{{Ad{ce}}}{{Hf{ec}}}{}{}}1111111111111111111111111111111111111111111111111111{eA`f{{In{}{{Hj{c}}}}}}{{Ifc}BbIn}0{{{Hf{ce}}g}AhFhFhAAn}{{}B`}0000000000000000000000000000000000000000000000000000{{{Hl{}{{Hj{c}}}}e}{{Kn{{Hl{}{{Hj{c}}}}e}}}f{{l{c}}nf}}{{Ife}{{L`{If}}}{}{{In{}{{Hj{c}}}}}}{{Ife}{{Lb{If}}}{}{{In{}{{Hj{c}}}}}}{{{Hl{}{{Hj{c}}}}c}{{Ld{{Hl{}{{Hj{c}}}}}}}f}{ce{}{}}{{{Hf{ce}}}{{Ad{ec}}}{}{}}1111111111111111111111111111111111111111111111111111{c{}{}}{{{Hf{cc}}}c{}}3{{{Hf{ce}}}HfAl{{Al{}{{Hj{}}}}}}{{{In{}{{AB`{c}}{Hj{e}}}}}c{{Hl{}{{Hj{e}}}}}f}55555555555555555555555555555555555555555555555555555{{{Hf{ce}}}Bb{}{}}0{{{Hf{ce}}}Hf{}{}}0{{{Hf{ce}}}BdHh{{Hh{}{{Hj{}}}}}}?{{{Hf{ce}}}{{Bd{c}}}{}{}}{{{Hf{ce}}i}{{Hf{ge}}}{}{}{}{{Al{c}{{j{{Hf{ge}}}}}}}}{{{Hf{ce}}c}c{}{}}{{{Hf{ce}}}cABb{}}{{{Hf{ce}}g}c{}{}{{Al{e}{{j{c}}}}}}{IfB`}{{{Hf{ce}}}B`If{{If{}{{Hj{}}}}}}{{{Hf{ce}}}B`ABd{{ABd{}{{Hj{}}}}}}{{{Jb{c}}}B`f}{{{Il{ce}}}B`If{{If{}{{Hj{}}}}}}{{{J`{c}}}B`If}{{{Jd{e}}}B`{Dhfn}{{If{}{{Hj{c}}}}}}{{{Jf{e}}}B`{Ajfn}{{If{}{{Hj{c}}}}}}{{{Jh{c}}}B`If}{{{Kj{cgi}}}B`Iff{{l{}{{j{e}}}}fn}{{l{e}{{j{e}}}}fn}}{{{Kl{ceg}}}B`If{fDh}{{l{e}{{j{e}}}}fn}}{{{Kn{ce}}}B`If{lnf}}{{{L`{ce}}}B`If{{If{}{{Hj{}}}}}}{{{Lb{ce}}}B`If{{If{}{{Hj{}}}}}}{{{Ld{c}}}B`If}{{{Lf{c}}}B`If}{{{Lh{c}}}B`If}{{{Lj{cg}}}B`Iff{{l{}{{j{e}}}}nf}}{{{Ll{cei}}}B`If{fDh}f{{l{e}{{j{g}}}}nf}}{{{Ln{cgk}}}B`If{}{{l{}{{j{e}}}}nf}f{{l{e}{{j{i}}}}nf}}{{{M`{{Cb{cegikmoAaAc}}}}}B`IfIfIfIfIfIfIfIfIf}{{{M`{{Cb{cegikmoAaAcAeAgAi}}}}}B`IfIfIfIfIfIfIfIfIfIfIfIf}{{{M`{{Cb{cegikmo}}}}}B`IfIfIfIfIfIfIf}{{{M`{{Cb{cegikmoAaAcAe}}}}}B`IfIfIfIfIfIfIfIfIfIf}{{{M`{{Cb{ce}}}}}B`IfIf}{{{M`{{Cb{cegikmoAaAcAeAg}}}}}B`IfIfIfIfIfIfIfIfIfIfIf}{{{M`{{Cb{cegik}}}}}B`IfIfIfIfIf}{{{M`{{Cb{cegikmoAa}}}}}B`IfIfIfIfIfIfIfIf}{{{M`{{Cb{c}}}}}B`If}{{{M`{{Cb{cegikm}}}}}B`IfIfIfIfIfIf}{{{M`{{Cb{cegi}}}}}B`IfIfIfIf}{{{M`{{Cb{ceg}}}}}B`IfIfIf}{{{Mb{c}}}B`f}{{{Md{c}}}B`If}{{{Ml{c}}}B`{Dhf}}{{{Mn{c}}}B`If}{{{N`{c}}}B`If}{{{Nh{c}}}B`If}{{{Nj{c}}}B`If}{{{Od{ce}}}B`If{lfn}}{{{Oh{ce}}}B`IfIf}{{{Oj{ce}}}B`IfIf}{{Ifc}BbIn}{{{Hf{cc}}g}{{Hf{ee}}}{}{}{{Al{c}{{j{e}}}}}}{{{Hl{}{{Hj{c}}}}g}{{Lj{{Hl{}{{Hj{c}}}}g}}}ff{{l{c}{{j{e}}}}nf}}{{{Hf{ce}}im}{{Hf{gk}}}{}{}{}{{Al{c}{{j{g}}}}}{}{{Al{e}{{j{k}}}}}}{{{Hf{ce}}gko}{{Hf{im}}}{}{}{}{}{{Al{gc}{{j{i}}}}}{}{{Al{ge}{{j{m}}}}}}{{{Hl{}{{Hj{c}}}}gk}{{Ln{{Hl{}{{Hj{c}}}}gk}}}f{}{{l{}{{j{e}}}}nf}f{{l{ec}{{j{i}}}}nf}}{{{Hf{ce}}i}{{Hf{ge}}}{}{}{}{{Al{c}{{j{g}}}}}}{{{Hf{ce}}i}{{Hf{cg}}}{}{}{}{{Al{e}{{j{g}}}}}}{{{Hl{}{{Hj{c}}}}ei}{{Ll{{Hl{}{{Hj{c}}}}ei}}}f{fDh}f{{l{ec}{{j{g}}}}nf}}{{{Hl{}{{Hj{c}}}}}{{Bd{c}}}f}{{{Hl{}{{Hj{c}}}}e}{{Bd{c}}}f{nf{l{cc}{{j{Ol}}}}}}{{{Hl{}{{Hj{c}}}}g}{{Bd{c}}}f{Eff}{nf{l{c}{{j{e}}}}}}210;{{{Hf{ce}}}BdHh{{Hh{}{{Hj{}}}}}}{{{Hf{ce}}}BdABf{{ABf{}{{Hj{}}}}}}{{{Hf{ce}}B`}BdHh{{Hh{}{{Hj{}}}}}}{{{Hf{ce}}B`}BdABf{{ABf{}{{Hj{}}}}}}{c{{Mb{c}}}f}{{{Hf{ce}}}{{Bd{B`}}}Hl{{Hl{}{{Hj{}}}}}}{{{Jb{c}}}{{Bd{B`}}}f}{{{Hl{}{{Hj{c}}}}}{{Bd{B`}}}f}{{{Il{ce}}}{{Bd{B`}}}Hl{{Hl{}{{Hj{}}}}}}{{{J`{c}}}{{Bd{B`}}}If}{{{Jd{e}}}{{Bd{B`}}}{Dhfn}{{Hl{}{{Hj{c}}}}}}{{{Jf{e}}}{{Bd{B`}}}{Ajfn}{{Hl{}{{Hj{c}}}}}}{{{Jh{c}}}{{Bd{B`}}}If}{{{Kj{cgi}}}{{Bd{B`}}}Iff{{l{}{{j{e}}}}fn}{{l{e}{{j{e}}}}fn}}{{{Kl{ceg}}}{{Bd{B`}}}If{fDh}{{l{e}{{j{e}}}}fn}}{{{Kn{ce}}}{{Bd{B`}}}Hl{lnf}}{{{L`{ce}}}{{Bd{B`}}}If{{If{}{{Hj{}}}}}}{{{Lb{ce}}}{{Bd{B`}}}If{{If{}{{Hj{}}}}}}{{{Ld{c}}}{{Bd{B`}}}Hl}{{{Lf{c}}}{{Bd{B`}}}If}{{{Lh{c}}}{{Bd{B`}}}If}{{{Lj{cg}}}{{Bd{B`}}}Hlf{{l{}{{j{e}}}}nf}}{{{Ll{cei}}}{{Bd{B`}}}Hl{fDh}f{{l{e}{{j{g}}}}nf}}{{{Ln{cgk}}}{{Bd{B`}}}Hl{}{{l{}{{j{e}}}}nf}f{{l{e}{{j{i}}}}nf}}{{{M`{{Cb{cegikmo}}}}}{{Bd{B`}}}IfIfIfIfIfIfIf}{{{M`{{Cb{cegikm}}}}}{{Bd{B`}}}IfIfIfIfIfIf}{{{M`{{Cb{cegikmoAaAcAeAg}}}}}{{Bd{B`}}}IfIfIfIfIfIfIfIfIfIfIf}{{{M`{{Cb{cegikmoAaAcAe}}}}}{{Bd{B`}}}IfIfIfIfIfIfIfIfIfIf}{{{M`{{Cb{cegikmoAa}}}}}{{Bd{B`}}}IfIfIfIfIfIfIfIf}{{{M`{{Cb{ceg}}}}}{{Bd{B`}}}IfIfIf}{{{M`{{Cb{cegikmoAaAcAeAgAi}}}}}{{Bd{B`}}}IfIfIfIfIfIfIfIfIfIfIfIf}{{{M`{{Cb{c}}}}}{{Bd{B`}}}If}{{{M`{{Cb{cegi}}}}}{{Bd{B`}}}IfIfIfIf}{{{M`{{Cb{ce}}}}}{{Bd{B`}}}IfIf}{{{M`{{Cb{cegikmoAaAc}}}}}{{Bd{B`}}}IfIfIfIfIfIfIfIfIf}{{{M`{{Cb{cegik}}}}}{{Bd{B`}}}IfIfIfIfIf}{{{Mb{c}}}{{Bd{B`}}}f}{{{Md{c}}}{{Bd{B`}}}Hl}{{{Ml{c}}}{{Bd{B`}}}{Dhf}}{{{Mn{c}}}{{Bd{B`}}}If}{{{N`{c}}}{{Bd{B`}}}If}{{{Nh{c}}}{{Bd{B`}}}If}{{{Nj{c}}}{{Bd{B`}}}If}{{{Od{ce}}}{{Bd{B`}}}Hl{lfn}}{{{Oh{ce}}}{{Bd{B`}}}IfIf}{{{Oj{ce}}}{{Bd{B`}}}IfIf}{{{Hl{}{{Hj{c}}}}}{{Md{{Hl{}{{Hj{c}}}}}}}f}{ABh{{Mf{ABh}}}}{{{ABj{}{{AB`{c}}{Hj{e}}}}}c{{Hl{}{{Hj{e}}}}}f}{{{ABl{}{{AB`{c}}{Hj{e}}}}i}c{{Hl{}{{Hj{e}}}}}f{}{{ABn{g}}}}{{AC`e}Ahf{{In{}{{Hj{c}}}}}}{{{Hf{eg}}i}Ahf{{AC`{c}}}{{AC`{c}}}{{In{}{{Hj{c}}}}}}{{{ACb{}{{AB`{c}}{Hj{e}}}}}c{{Hl{}{{Hj{e}}}}}f}{{{ACd{}{{AB`{c}}{Hj{e}}}}}c{{Hl{}{{Hj{e}}}}}f}{{{Hf{ce}}{Hf{ce}}}{{Bd{Ol}}}ACfACf}{{Ifc}{{Bd{Ol}}}In}{{{Hf{ce}}g}{{Cb{ii}}}Hh{{Hh{}{{Hj{}}}}}{{D`{}{{j{Bb}}}}}{ABbAAh}}{{{Hl{}{{Hj{c}}}}e}{{Cb{gi}}}f{{l{c}{{j{Bb}}}}nf}{ABbf{AC`{c}}}{ABbf{AC`{c}}}}{{{Hl{}{{Hj{c}}}}i}{{Cb{km}}}fff{{l{c}{{j{{Hf{eg}}}}}}nf}{ABbf{AC`{e}}}{ABbf{AC`{g}}}}`{{{Ib{{Hf{ce}}}}ACh}ACjACl{{ACl{}{{j{}}}}}}{{{Hf{ce}}g}{{Bd{B`}}}Hh{{Hh{}{{Hj{}}}}}{{D`{}{{j{Bb}}}}}}{{Ife}{{Bd{B`}}}{}{{l{c}{{j{Bb}}}}nf}}00{{Ife}{{Mh{Ife}}}{}{{l{c}{{j{Bb}}}}nf}}{{{Hl{}{{Hj{c}}}}}ef{fACnACn}}{{{Hl{}{{Hj{c}}}}eg}cf{{l{}{{j{c}}}}nf}{{l{cc}{{j{c}}}}nf}}{{{Hl{}{{Hj{c}}}}e}{{Bd{c}}}f{{l{cc}{{j{c}}}}nf}}{c{{Mj{c}}}{Dhf}}{{cB`}{{Ml{c}}}{Dhf}}{If{{Mn{If}}}}{{{Hf{ce}}g}BdABf{{ABf{}{{Hj{}}}}}{{D`{}{{j{Bb}}}}}}{{{Hf{ce}}gi}gABf{{ABf{}{{Hj{}}}}}{}{{D`{g}{{j{g}}}}}}{{{Hf{ce}}}{{Bd{e}}}{}{}}{{{Hf{ce}}i}{{Hf{cg}}}{}{}{}{{Al{e}{{j{{Hf{cg}}}}}}}}{{{Hf{ce}}e}e{}{}}{{{Hf{ce}}}e{}ABb}{{{Hf{ce}}g}e{}{}{{Al{c}{{j{e}}}}}}{{{Hf{ce}}}{{Cb{B`{Bd{B`}}}}}Hh{{Hh{}{{Hj{}}}}}}{{IfB`}{{N`{If}}}}{{{Hl{}{{Hj{c}}}}B`}{{Nb{{Hl{}{{Hj{c}}}}}}}f}{{{Hl{}{{Hj{c}}}}e}{{Nd{{Hl{}{{Hj{c}}}}e}}}f{{l{c}{{j{Bb}}}}nf}}{{ce}{{Nf{ce}}}f{{l{c}{{j{{Cb{c{Bd{c}}}}}}}}n}}{{IfB`}{{Nh{If}}}}{{{Hl{}{{Hj{c}}}}}ef{fAD`AD`}}{{IfB`}{{Nj{If}}}}{{{Mj{c}}B`}{{Ml{c}}}{Dhf}}{{{Hl{}{{Hj{c}}}}B`}{{Nl{{Hl{}{{Hj{c}}}}}}}f}{{{Hl{}{{Hj{c}}}}e}{{Nn{{Hl{}{{Hj{c}}}}e}}}f{{l{c}{{j{Bb}}}}nf}}{ce{}{}}0000000000000000000000000000000000000000000000000{cDb{}}{{{Hl{}{{Hj{c}}}}gk}{{O`{{Hl{}{{Hj{c}}}}igk}}}f{}{{l{}{{j{e}}}}nf}{{`{}{{j{e}}}}f}{{l{ec}{{j{i}}}}nf}}{{{Hl{}{{Hj{c}}}}ei}{{Ob{{Hl{}{{Hj{c}}}}gi}}}f{Dhf}{{`{}{{j{e}}}}f}{{l{ec}{{j{g}}}}nf}}{{{Hl{}{{Hj{c}}}}g}ef{{`{}{{j{Ah}}}}f}{{l{c}{{j{e}}}}nf}}{{{Hl{}{{Hj{c}}}}gk}if{}{{l{}{{j{e}}}}nf}{{`{}{{j{Ah}}}}f}{{l{ec}{{j{i}}}}nf}}{{{Hl{}{{Hj{c}}}}ei}gf{fDh}{{`{}{{j{Ah}}}}f}{{l{ec}{{j{g}}}}nf}}{c{{Ad{e}}}{}{}}000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000{{{Hl{}{{Hj{c}}}}gi}cf{}{{l{}{{j{e}}}}nf}{{l{ee}{{j{c}}}}nf}}{{{Hl{}{{Hj{c}}}}g}{{Bd{c}}}f{}{{l{ee}{{j{c}}}}nf}}{cDd{}}0000000000000000000000000000000000000000000000000000{{{Hf{ce}}}c{}E`}{{{Hf{ce}}}eE`{}}{{{Hl{}{{Hj{c}}}}}{{Cb{gk}}}ff{ABbf{AC`{e}}}f{ABbf{AC`{i}}}}{{If{d{c}}{d{e}}}Ahff}{{{Hl{}{{Hj{c}}}}e}{{Od{{Hl{}{{Hj{c}}}}e}}}f{{l{c}}nf}}{{cg}{{AAb{cg}}}f{{Al{}{{Hj{c}}}}}{{l{c}{{j{e}}}}fn}}{{cg}{{AA`{cg}}}f{{Al{}{{Hj{c}}}}}{{l{c}{{j{e}}}}fn}}{{cg}{{An{cg}}}f{{Al{}{{Hj{c}}}}}{{l{c}{{j{e}}}}fn}}{{{Hl{}{{Hj{c}}}}}{{Of{{Hl{}{{Hj{c}}}}}}}f}{{IfB`}{{Lh{If}}}}{{IfB`}{{Lf{If}}}}{{Ife}{}{}{{Eb{c}}}}{{{Hf{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Eb{g}}}}{{{Jb{c}}g}{}f{}{{Eb{e}}}}{{{Il{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Eb{g}}}}{{{J`{c}}g}{}If{}{{Eb{e}}}}{{{Jd{e}}i}{}{Dhfn}{{If{}{{Hj{c}}}}}{}{{Eb{g}}}}{{{Jf{e}}i}{}{Ajfn}{{If{}{{Hj{c}}}}}{}{{Eb{g}}}}{{{Jh{c}}g}{}If{}{{Eb{e}}}}{{{Kj{cgi}}m}{}Iff{{l{}{{j{e}}}}fn}{{l{e}{{j{e}}}}fn}{}{{Eb{k}}}}{{{Kl{ceg}}k}{}If{fDh}{{l{e}{{j{e}}}}fn}{}{{Eb{i}}}}{{{Kn{ce}}i}{}If{lnf}{}{{Eb{g}}}}{{{L`{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Eb{g}}}}{{{Lb{ce}}i}{}If{{If{}{{Hj{}}}}}{}{{Eb{g}}}}{{{Ld{c}}g}{}If{}{{Eb{e}}}}{{{Lf{c}}g}{}If{}{{Eb{e}}}}{{{Lh{c}}g}{}If{}{{Eb{e}}}}{{{Lj{cg}}k}{}Iff{{l{}{{j{e}}}}nf}{}{{Eb{i}}}}{{{Ll{cei}}m}{}If{fDh}f{{l{e}{{j{g}}}}nf}{}{{Eb{k}}}}{{{Ln{cgk}}o}{}If{}{{l{}{{j{e}}}}nf}f{{l{e}{{j{i}}}}nf}{}{{Eb{m}}}}{{{M`{{Cb{cegikmoAaAcAeAg}}}}Ak}{}IfIfIfIfIfIfIfIfIfIfIf{}{{Eb{Ai}}}}{{{M`{{Cb{cegikmo}}}}Ac}{}IfIfIfIfIfIfIf{}{{Eb{Aa}}}}{{{M`{{Cb{cegikmoAaAcAeAgAi}}}}Am}{}IfIfIfIfIfIfIfIfIfIfIfIf{}{{Eb{Ak}}}}{{{M`{{Cb{cegikmoAaAcAe}}}}Ai}{}IfIfIfIfIfIfIfIfIfIf{}{{Eb{Ag}}}}{{{M`{{Cb{cegi}}}}m}{}IfIfIfIf{}{{Eb{k}}}}{{{M`{{Cb{cegik}}}}o}{}IfIfIfIfIf{}{{Eb{m}}}}{{{M`{{Cb{cegikmoAaAc}}}}Ag}{}IfIfIfIfIfIfIfIfIf{}{{Eb{Ae}}}}{{{M`{{Cb{c}}}}g}{}If{}{{Eb{e}}}}{{{M`{{Cb{cegikmoAa}}}}Ae}{}IfIfIfIfIfIfIfIf{}{{Eb{Ac}}}}{{{M`{{Cb{ce}}}}i}{}IfIf{}{{Eb{g}}}}{{{M`{{Cb{cegikm}}}}Aa}{}IfIfIfIfIfIf{}{{Eb{o}}}}{{{M`{{Cb{ceg}}}}k}{}IfIfIf{}{{Eb{i}}}}{{{Mb{c}}g}{}f{}{{Eb{e}}}}{{{Md{c}}g}{}If{}{{Eb{e}}}}{{{Ml{c}}g}{}{Dhf}{}{{Eb{e}}}}{{{Mn{c}}g}{}If{}{{Eb{e}}}}{{{N`{c}}g}{}If{}{{Eb{e}}}}{{{Nh{c}}g}{}If{}{{Eb{e}}}}{{{Nj{c}}g}{}If{}{{Eb{e}}}}{{{Od{ce}}i}{}If{lfn}{}{{Eb{g}}}}{{{Oh{ce}}i}{}IfIf{}{{Eb{g}}}}{{{Oj{ce}}i}{}IfIf{}{{Eb{g}}}}{{Ifc}{{Oh{If}}}In}{{{Mj{c}}e}{{Oh{{Ml{c}}}}}{Dhf}In}{{Ifc}{{Oj{If}}}In}```````````````{{ce}{}IfDj}{{B`ce}{}ADbDj}{{ce}{}ADdDl}{{{Eb{}{{j{c}}}}g}c{}{}{{ADb{}{{Hj{e}}}}}}{{{ADh{}{{ADf{c}}}}}c{}}{{{ADh{}{{ADf{c}}}}e}{{ADh{}{{ADf{c}}}}}{}{}}{{{ADh{}{{ADf{c}}}}g}{{ADh{}{{ADf{c}}}}}{}{}{{Al{}{{Hj{e}}}}}}{{{ADd{}{{Hj{c}}}}e}e{}{{ADh{c}}}}{{{ADb{}{{Hj{c}}{ADj{e}}}}g}g{}{{Hh{}{{Hj{c}}}}ABfABd}{{ADh{c}}}}{{{Dj{}{{ADl{c}}{ADn{i}}{ADf{g}}}}}Bb{{ADh{e}{{ADf{g}}}}}{}f{{AE`{g}}}}{{{ADh{}{{ADf{c}}}}}Bb{}}{{{Dj{}{{ADl{c}}{ADn{i}}{ADf{g}}}}}c{{ADh{e}{{ADf{g}}}}}{}f{{AE`{g}}}}{{{ADb{}{{Hj{c}}{ADj{e}}}}}e{}{{Hh{}{{Hj{c}}}}ABfABd}}{{{ADb{}{{Hj{c}}{ADj{e}}}}}B`{}{{Hh{}{{Hj{c}}}}ABfABd}}0{{AE`cc}c{}}{{{ADd{}{{Hj{c}}}}}{{Cb{{ADd{}{{Hj{c}}}}{Bd{{ADd{}{{Hj{c}}}}}}}}}{}}{{{ADb{}{{Hj{c}}{ADj{e}}}}B`}{{Cb{{ADb{}{{Hj{c}}{ADj{e}}}}{ADb{}{{Hj{c}}{ADj{e}}}}}}}{}{{Hh{}{{Hj{c}}}}ABfABd}}{{{Dj{}{{ADl{c}}{ADn{i}}{ADf{g}}}}B`}{{Cb{{Dj{}{{ADl{c}}{ADn{i}}{ADf{g}}}}{Dj{}{{ADl{c}}{ADn{i}}{ADf{g}}}}i}}}{{ADh{e}{{ADf{g}}}}}{}f{{AE`{g}}}}{DlDl}{Dlc{}}```{ce{}{}}00000{{{AEb{c}}}{{AEb{c}}}{Dhf}}{{{AEd{c}}}{{AEd{c}}}n}{{ce}Ah{}{}}0{B`c{}}00000{{{AEb{c}}g}{}f{}{{Dj{e}}}}{{{AEd{c}}g}{}n{}{{Dj{e}}}}{{{AEf{c}}g}{}f{}{{Dj{e}}}}{{{AEb{c}}g}{}f{}{{Dl{e}}}}{{{AEd{c}}g}{}n{}{{Dl{e}}}}{{{AEf{c}}g}{}f{}{{Dl{e}}}}{B`Ah}00{{{AEb{c}}Bh}Dn{E`f}}{{{AEd{c}}Bh}Dn{E`n}}{{{AEf{c}}Bh}Dn{E`f}}{cc{}}00{{}B`}00{ce{}{}}00000{{{AEb{c}}}B`f}{{{AEd{c}}}B`n}{{{AEf{c}}}B`f}{{{AEb{c}}}{{Bd{B`}}}f}{{{AEd{c}}}{{Bd{B`}}}n}{{{AEf{c}}}{{Bd{B`}}}f}66{c{{Ad{e}}}{}{}}00000{cDd{}}00{{{AEb{c}}g}{}f{}{{Eb{e}}}}{{{AEd{c}}g}{}n{}{{Eb{e}}}}{{{AEf{c}}g}{}f{}{{Eb{e}}}}``````````````;;{{{AEh{c}}}{{AEh{c}}}Dh}{{ce}Ah{}{}}{B`c{}}0{{{AEh{AEj}}e}{}{}{{Dj{c}}}}{{{AEh{c}}e}{}`{{Dj{c}}}}{{{AEh{AEj}}e}{}{}{{Dl{c}}}}{{{AEh{c}}e}{}`{{Dl{c}}}}{B`Ah}{{{AEh{c}}Bh}DnE`}{cc{}}{{}B`}{ce{}{}}0{{{AEh{AEj}}}B`}{{{AEh{c}}}B``}{{{AEh{AEj}}}{{Bd{B`}}}}{{{AEh{c}}}{{Bd{B`}}}`}4{c{{Ad{e}}}{}{}}0{cDd{}}{{{AEh{AEj}}e}{}{}{{Eb{c}}}}{{{AEh{c}}e}{}`{{Eb{c}}}}`88{{{AEl{c}}}{{AEl{c}}}Dh}{{ce}Ah{}{}}{B`c{}}0{{{AEl{c}}e}{}`{{Dj{c}}}}{{{AEl{AEj}}e}{}{}{{Dj{c}}}}{{{AEl{AEj}}e}{}{}{{Dl{c}}}}{{{AEl{c}}e}{}`{{Dl{c}}}}{B`Ah}{{{AEl{c}}Bh}DnE`}{cc{}}{{}B`}{ce{}{}}0{{{AEl{AEj}}}B`}{{{AEl{c}}}B``}{{{AEl{c}}}{{Bd{B`}}}`}{{{AEl{AEj}}}{{Bd{B`}}}}4{c{{Ad{e}}}{}{}}0{cDd{}}{{{AEl{AEj}}e}{}{}{{Eb{c}}}}{{{AEl{c}}e}{}`{{Eb{c}}}}```888888{{{AEn{c}}}{{AEn{c}}}{Dhf}}{{{AF`{c}}}{{AF`{c}}}n}{{ce}Ah{}{}}0{B`c{}}00000{{{AEn{c}}g}{}f{}{{Dj{e}}}}{{{AF`{c}}g}{}n{}{{Dj{e}}}}{{{AFb{c}}g}{}f{}{{Dj{e}}}}{{{AEn{c}}g}{}f{}{{Dl{e}}}}{{{AF`{c}}g}{}n{}{{Dl{e}}}}{{{AFb{c}}g}{}f{}{{Dl{e}}}}{B`Ah}00{{{AEn{c}}Bh}Dn{E`f}}{{{AF`{c}}Bh}Dn{E`n}}{{{AFb{c}}Bh}Dn{E`f}}{cc{}}00{{}B`}00{ce{}{}}00000{{{AEn{c}}}B`f}{{{AF`{c}}}B`n}{{{AFb{c}}}B`f}{{{AEn{c}}}{{Bd{B`}}}f}{{{AF`{c}}}{{Bd{B`}}}n}{{{AFb{c}}}{{Bd{B`}}}f}66{c{{Ad{e}}}{}{}}00000{cDd{}}00{{{AEn{c}}g}{}f{}{{Eb{e}}}}{{{AF`{c}}g}{}n{}{{Eb{e}}}}{{{AFb{c}}g}{}f{}{{Eb{e}}}}```````````````````{AFd{{I`{c}}}n}{AFf{{I`{c}}}f}=================================={{{AFh{ce}}}{{AFh{ce}}}{}Dh}{{{AFj{ce}}}{{AFj{ce}}}{}Dh}{{{AFl{ce}}}{{AFl{ce}}}{}Dh}{{{AFn{c}}}{{AFn{c}}}n}{{{AG`{c}}}{{AG`{c}}}n}{{{AGb{c}}}{{AGb{c}}}n}{{{AGd{c}}}{{AGd{c}}}n}{{{AGf{c}}}{{AGf{c}}}n}{{{AGh{c}}}{{AGh{c}}}n}{{ce}Ah{}{}}00000000{B`c{}}000000000000000000000000000000000{{{AFn{c}}g}{}n{}{{Dj{e}}}}{{{AG`{c}}g}{}n{}{{Dj{e}}}}{{{AGj{c}}g}{}f{}{{Dj{e}}}}{{{AGl{c}}g}{}f{}{{Dj{e}}}}{{{AGb{c}}g}{}n{}{{Dj{e}}}}{{{AGd{c}}g}{}n{}{{Dj{e}}}}{{{AGn{c}}g}{}f{}{{Dj{e}}}}{{{AH`{c}}g}{}f{}{{Dj{e}}}}{{{AGf{c}}g}{}n{}{{Dj{e}}}}{{{AGh{c}}g}{}n{}{{Dj{e}}}}{{{AHb{c}}g}{}f{}{{Dj{e}}}}{{{AFh{ce}}i}{}n{{l{cc}{{j{Bb}}}}fn}{}{{Dl{g}}}}{{{AHd{ce}}i}{}f{{l{cc}{{j{Bb}}}}fn}{}{{Dl{g}}}}{{{AFj{ce}}i}{}n{{l{c}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{AFl{ce}}i}{}n{{l{c}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{AHf{ce}}i}{}f{{l{c}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{AHh{ce}}i}{}f{{l{c}{{j{Bb}}}}nf}{}{{Dl{g}}}}{{{AFn{c}}g}{}n{}{{Dl{e}}}}{{{AG`{c}}g}{}n{}{{Dl{e}}}}{{{AGj{c}}g}{}f{}{{Dl{e}}}}{{{AGl{c}}g}{}f{}{{Dl{e}}}}{{{AGb{c}}g}{}n{}{{Dl{e}}}}{{{AGd{c}}g}{}n{}{{Dl{e}}}}{{{AGn{c}}g}{}f{}{{Dl{e}}}}{{{AH`{c}}g}{}f{}{{Dl{e}}}}{{{AGf{c}}g}{}n{}{{Dl{e}}}}{{{AGh{c}}g}{}n{}{{Dl{e}}}}{{{AHb{c}}g}{}f{}{{Dl{e}}}}{B`Ah}0000000000000000{{{AFh{ce}}Bh}DnE`{}}{{{AHd{ce}}Bh}DnE`{}}{{{AFj{ce}}Bh}DnE`{}}{{{AFl{ce}}Bh}DnE`{}}{{{AHf{ce}}Bh}DnE`{}}{{{AHh{ce}}Bh}DnE`{}}{{{AFn{c}}Bh}Dn{E`n}}{{{AG`{c}}Bh}Dn{E`n}}{{{AGj{c}}Bh}Dn{E`f}}{{{AGl{c}}Bh}Dn{E`f}}{{{AGb{c}}Bh}Dn{E`n}}{{{AGd{c}}Bh}Dn{E`n}}{{{AGn{c}}Bh}Dn{E`f}}{{{AH`{c}}Bh}Dn{E`f}}{{{AGf{c}}Bh}Dn{E`n}}{{{AGh{c}}Bh}Dn{E`n}}{{{AHb{c}}Bh}Dn{E`f}}{cc{}}0000000000000000{{}B`}0000000000000000{ce{}{}}000000000000000000000000000000000{{{AGl{c}}}{{I`{c}}}f}{{{AH`{c}}}{{I`{c}}}f}{{{AFn{c}}}B`n}{{{AG`{c}}}B`n}{{{AGj{c}}}B`f}{{{AGl{c}}}B`f}{{{AGb{c}}}B`n}{{{AGd{c}}}B`n}{{{AGn{c}}}B`f}{{{AH`{c}}}B`f}{{{AGf{c}}}B`n}{{{AGh{c}}}B`n}{{{AHb{c}}}B`f}{{{AFn{c}}}{{Bd{B`}}}n}{{{AG`{c}}}{{Bd{B`}}}n}{{{AGj{c}}}{{Bd{B`}}}f}{{{AGl{c}}}{{Bd{B`}}}f}{{{AGb{c}}}{{Bd{B`}}}n}{{{AGd{c}}}{{Bd{B`}}}n}{{{AGn{c}}}{{Bd{B`}}}f}{{{AH`{c}}}{{Bd{B`}}}f}{{{AGf{c}}}{{Bd{B`}}}n}{{{AGh{c}}}{{Bd{B`}}}n}{{{AHb{c}}}{{Bd{B`}}}f}{{AFde}{{AFh{ce}}}n{{l{cc}{{j{Bb}}}}fn}}{{AFfe}{{AHd{ce}}}f{{l{cc}{{j{Bb}}}}fn}}{{AFdB`}{{AFn{c}}}n}{{AFdB`}{{AG`{c}}}n}{{AFfB`}{{AGl{c}}}f}{{AFfB`}{{AGj{c}}}f}{{AFdB`}{{AGb{c}}}n}{{AFdB`}{{AGd{c}}}n}{{AFfB`}{{AH`{c}}}f}{{AFfB`}{{AGn{c}}}f}{AFfAh}{{AFfe}Ahf{{l{cc}{{j{Ol}}}}n}}{{AFfg}Ahf{Eff}{{l{c}{{j{e}}}}n}}{{AFfg}AhfEf{{l{c}{{j{e}}}}n}}320{{AFde}{{AFj{ce}}}n{{l{c}{{j{Bb}}}}nf}}{{AFde}{{AFl{ce}}}n{{l{c}{{j{Bb}}}}nf}}{{AFfe}{{AHh{ce}}}f{{l{c}{{j{Bb}}}}nf}}{{AFfe}{{AHf{ce}}}f{{l{c}{{j{Bb}}}}nf}}{{AFdB`}{{AGh{c}}}n}{{{AG`{c}}}{{I`{c}}}n}{{{AGl{c}}}{{I`{c}}}f}{{{AGd{c}}}{{I`{c}}}n}{{{AH`{c}}}{{I`{c}}}f}20{ce{}{}}00000000{c{{Ad{e}}}{}{}}000000000000000000000000000000000{cDd{}}0000000000000000{{{AFn{c}}g}{}n{}{{Eb{e}}}}{{{AG`{c}}g}{}n{}{{Eb{e}}}}{{{AGj{c}}g}{}f{}{{Eb{e}}}}{{{AGl{c}}g}{}f{}{{Eb{e}}}}{{{AGb{c}}g}{}n{}{{Eb{e}}}}{{{AGd{c}}g}{}n{}{{Eb{e}}}}{{{AGn{c}}g}{}f{}{{Eb{e}}}}{{{AH`{c}}g}{}f{}{{Eb{e}}}}{{{AGf{c}}g}{}n{}{{Eb{e}}}}{{{AGh{c}}g}{}n{}{{Eb{e}}}}{{{AHb{c}}g}{}f{}{{Eb{e}}}}`````````````{AHjBf}>>>>>>>>>>>>>>>>>>>>>>>>{AHlAHl}{AHnAHn}{AI`AI`}{AIbAIb}{{{AId{c}}}{{AId{c}}}{Dh`}}{{{AIf{c}}}{{AIf{c}}}{Dh`}}{{{AIh{c}}}{{AIh{c}}}{Dh`}}{AIjAIj}{AIlAIl}{AInAIn}{{{AJ`{c}}}{{AJ`{c}}}{Dh`}}{{{AJb{c}}}{{AJb{c}}}{Dh`}}{{ce}Ah{}{}}00000000000{B`c{}}00000000000000000000000{{AHle}{}{}{{Dl{c}}}}{{AHne}{}{}{{Dl{c}}}}{{AI`e}{}{}{{Dl{c}}}}{{AIbe}{}{}{{Dl{c}}}}{{{AId{c}}g}{}`{}{{Dl{e}}}}{{{AIf{c}}g}{}`{}{{Dl{e}}}}{{{AIh{c}}g}{}`{}{{Dl{e}}}}{{AIje}{}{}{{Dl{c}}}}{{AIle}{}{}{{Dl{c}}}}{{AIne}{}{}{{Dl{c}}}}{{{AJ`{c}}g}{}`{}{{Dl{e}}}}{{{AJb{c}}g}{}`{}{{Dl{e}}}}{B`Ah}00000000000{{AHlBh}Dn}{{AHnBh}Dn}{{AI`Bh}Dn}{{AIbBh}Dn}{{{AId{c}}Bh}Dn{E``}}{{{AIf{c}}Bh}Dn{E``}}{{{AIh{c}}Bh}Dn{E``}}{{AIjBh}Dn}{{AIlBh}Dn}{{AInBh}Dn}{{{AJ`{c}}Bh}Dn{E``}}{{{AJb{c}}Bh}Dn{E``}}{cc{}}00000000000{{}B`}00000000000{ce{}{}}00000000000000000000000{AHjAI`}{AHjAHn}{AHjAHl}{AHjAIb}{AHjAIj}{{AHjc}{{AJb{c}}}`}{{AHjc}{{AJ`{c}}}`}{{AHjc}{{AId{c}}}`}{AHjAIn}{{AHjc}{{AIf{c}}}`}{{AHjc}{{AIh{c}}}`}{AHjAIl}<<<<<<<<<<<<{c{{Ad{e}}}{}{}}00000000000000000000000{cDd{}}00000000000`>>{B`c{}}0{{AJde}{}{}{{Dl{c}}}}{AJdAh}{B`Ah}{{AJdBh}Dn}{cc{}}{{}B`}{ce{}{}}0998``0000{{{AJf{c}}}{{AJf{c}}}{Dhf}}{{ce}Ah{}{}}9999{{{AJf{c}}g}{}f{}{{Dj{e}}}}{{{AJh{c}}g}{}f{}{{Dj{e}}}}{{{AJf{c}}g}{}f{}{{Dl{e}}}}{{{AJh{c}}g}{}f{}{{Dl{e}}}}:{{{AJh{c}}}Ahf};{{{AJf{c}}Bh}Dn{E`f}}{{{AJh{c}}Bh}Dn{E`f}};;::9999{{{AJf{c}}}B`f}{{{AJh{c}}}B`f}{{{AJf{c}}}{{Bd{B`}}}f}{{{AJh{c}}}{{Bd{B`}}}f}={c{{Ad{e}}}{}{}}000{cDd{}}0{{{AJf{c}}g}{}f{}{{Eb{e}}}}{{{AJh{c}}g}{}f{}{{Eb{e}}}}","c":[30,127],"p":[[5,"ThreadPoolBuilder",0],[5,"Vec",2839],[10,"Send",2840],[5,"BroadcastContext",0],[17,"Output"],[10,"Fn",2841],[10,"Sync",2840],[5,"ThreadPool",0],[5,"ThreadPoolBuildError",0],[6,"Result",2842],[10,"ThreadSpawn",2843],[1,"unit"],[5,"ThreadBuilder",0],[10,"FnOnce",2841],[6,"Yield",0],[1,"usize"],[1,"bool"],[6,"Option",2844],[1,"str"],[5,"Formatter",2845],[5,"Error",2845],[5,"Scope",0],[5,"ScopeFifo",0],[5,"FnContext",0],[1,"tuple"],[5,"Configuration",2846],[10,"Error",2847],[5,"Box",2848],[10,"Any",2849],[5,"CustomSpawn",2843],[5,"Error",2850],[10,"FnMut",2841],[5,"String",2851],[5,"TypeId",2849],[5,"IntoIter",196],[10,"Clone",2852],[10,"Consumer",1962],[10,"UnindexedConsumer",1962],[8,"Result",2845],[10,"Debug",2845],[10,"ProducerCallback",1962],[5,"IntoIter",225],[10,"Ord",2853],[5,"Iter",225],[5,"Drain",225],[5,"Iter",289],[5,"IntoIter",289],[5,"IterMut",289],[5,"Iter",340],[5,"IntoIter",340],[5,"Iter",375],[10,"Hash",2854],[10,"Eq",2853],[5,"IntoIter",375],[5,"IterMut",375],[5,"Drain",375],[5,"Iter",442],[5,"IntoIter",442],[5,"Drain",442],[5,"IntoIter",493],[5,"Iter",493],[5,"IterMut",493],[5,"IntoIter",547],[5,"Iter",547],[5,"IterMut",547],[5,"Drain",547],[6,"Either",630],[10,"Iterator",2855],[17,"Item"],[10,"ParallelIterator",630],[10,"AsMut",2856],[1,"slice"],[5,"Pin",2857],[10,"AsRef",2856],[10,"IndexedParallelIterator",630],[5,"ExponentialBlocks",630],[5,"UniformBlocks",630],[5,"Chain",630],[10,"IntoParallelIterator",630],[5,"Chunks",630],[5,"Empty",630],[5,"Cloned",630],[5,"Copied",630],[5,"Enumerate",630],[5,"Filter",630],[5,"FilterMap",630],[5,"FlatMap",630],[5,"FlatMapIter",630],[5,"Flatten",630],[5,"FlattenIter",630],[5,"Fold",630],[5,"FoldWith",630],[5,"FoldChunks",630],[5,"FoldChunksWith",630],[5,"Inspect",630],[5,"Interleave",630],[5,"InterleaveShortest",630],[5,"Intersperse",630],[5,"MinLen",630],[5,"MaxLen",630],[5,"Map",630],[5,"MapWith",630],[5,"MapInit",630],[5,"MultiZip",630],[5,"Once",630],[5,"PanicFuse",630],[5,"IterBridge",630],[5,"Positions",630],[5,"Repeat",630],[5,"RepeatN",630],[5,"Rev",630],[5,"Skip",630],[5,"SkipAny",630],[5,"SkipAnyWhile",630],[5,"Split",630],[5,"StepBy",630],[5,"Take",630],[5,"TakeAny",630],[5,"TakeAnyWhile",630],[5,"TryFold",630],[5,"TryFoldWith",630],[5,"Update",630],[5,"WhileSome",630],[5,"Zip",630],[5,"ZipEq",630],[6,"Ordering",2853],[10,"FromIterator",2858],[10,"FromParallelIterator",630],[5,"LinkedList",2859],[10,"Deref",2860],[17,"Target"],[10,"DerefMut",2860],[10,"Copy",2840],[10,"IntoIterator",2858],[5,"WalkTreePrefix",630],[5,"WalkTreePostfix",630],[5,"WalkTree",630],[10,"Into",2856],[10,"PartialEq",2853],[10,"Extend",2858],[5,"IterEither",2861],[10,"Display",2845],[10,"Hasher",2854],[17,"Iter"],[10,"Default",2862],[10,"ExactSizeIterator",2863],[10,"DoubleEndedIterator",2864],[10,"ParallelBridge",630],[10,"ParallelDrainFull",630],[10,"ParallelDrainRange",630],[10,"RangeBounds",2865],[10,"ParallelExtend",630],[10,"IntoParallelRefIterator",630],[10,"IntoParallelRefMutIterator",630],[10,"PartialOrd",2853],[5,"Context",2866],[6,"Poll",2867],[10,"Future",2868],[10,"Product",2869],[10,"Sum",2869],[10,"Producer",1962],[10,"UnindexedProducer",1962],[17,"Result"],[10,"Folder",1962],[17,"IntoIter"],[17,"Folder"],[17,"Reducer"],[10,"Reducer",1962],[5,"IntoIter",1998],[5,"Iter",1998],[5,"IterMut",1998],[5,"Iter",2074],[1,"char"],[5,"Iter",2101],[5,"IntoIter",2128],[5,"Iter",2128],[5,"IterMut",2128],[10,"ParallelSlice",2191],[10,"ParallelSliceMut",2191],[5,"ChunkBy",2191],[5,"Split",2191],[5,"SplitInclusive",2191],[5,"Chunks",2191],[5,"ChunksExact",2191],[5,"RChunks",2191],[5,"RChunksExact",2191],[5,"Iter",2191],[5,"Windows",2191],[5,"ChunksMut",2191],[5,"ChunksExactMut",2191],[5,"RChunksMut",2191],[5,"RChunksExactMut",2191],[5,"IterMut",2191],[5,"ChunkByMut",2191],[5,"SplitMut",2191],[5,"SplitInclusiveMut",2191],[10,"ParallelString",2551],[5,"Chars",2551],[5,"CharIndices",2551],[5,"Bytes",2551],[5,"EncodeUtf16",2551],[5,"Split",2551],[5,"SplitInclusive",2551],[5,"SplitTerminator",2551],[5,"Lines",2551],[5,"SplitWhitespace",2551],[5,"SplitAsciiWhitespace",2551],[5,"Matches",2551],[5,"MatchIndices",2551],[5,"Drain",2781],[5,"IntoIter",2797],[5,"Drain",2797]],"b":[[83,"impl-Display-for-ThreadPoolBuildError"],[84,"impl-Debug-for-ThreadPoolBuildError"],[710,"impl-AsMut%3Cstr%3E-for-Either%3CL,+R%3E"],[711,"impl-AsMut%3C%5BTarget%5D%3E-for-Either%3CL,+R%3E"],[712,"impl-AsMut%3CTarget%3E-for-Either%3CL,+R%3E"],[713,"impl-Either%3CL,+R%3E"],[716,"impl-AsRef%3C%5BTarget%5D%3E-for-Either%3CL,+R%3E"],[717,"impl-AsRef%3Cstr%3E-for-Either%3CL,+R%3E"],[718,"impl-AsRef%3CTarget%3E-for-Either%3CL,+R%3E"],[719,"impl-Either%3CL,+R%3E"],[1068,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H)%3E"],[1069,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B)%3E"],[1070,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)%3E"],[1071,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E)%3E"],[1072,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D)%3E"],[1073,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F)%3E"],[1074,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I)%3E"],[1075,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C)%3E"],[1076,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)%3E"],[1077,"impl-IndexedParallelIterator-for-MultiZip%3C(A,)%3E"],[1078,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)%3E"],[1079,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G)%3E"],[1119,"impl-ParallelIterator-for-MultiZip%3C(A,)%3E"],[1120,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I)%3E"],[1121,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)%3E"],[1122,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G)%3E"],[1123,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C)%3E"],[1124,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H)%3E"],[1125,"impl-ParallelIterator-for-MultiZip%3C(A,+B)%3E"],[1126,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)%3E"],[1127,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)%3E"],[1128,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E)%3E"],[1129,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F)%3E"],[1130,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D)%3E"],[1241,"impl-Debug-for-Either%3CL,+R%3E"],[1242,"impl-Display-for-Either%3CL,+R%3E"],[1543,"impl-IndexedParallelIterator-for-Either%3CL,+R%3E"],[1544,"impl-ExactSizeIterator-for-Either%3CL,+R%3E"],[1562,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I)%3E"],[1563,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)%3E"],[1564,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G)%3E"],[1565,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)%3E"],[1566,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B)%3E"],[1567,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)%3E"],[1568,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E)%3E"],[1569,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H)%3E"],[1570,"impl-IndexedParallelIterator-for-MultiZip%3C(A,)%3E"],[1571,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F)%3E"],[1572,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D)%3E"],[1573,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C)%3E"],[1624,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G)%3E"],[1625,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F)%3E"],[1626,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)%3E"],[1627,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)%3E"],[1628,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H)%3E"],[1629,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C)%3E"],[1630,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)%3E"],[1631,"impl-ParallelIterator-for-MultiZip%3C(A,)%3E"],[1632,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D)%3E"],[1633,"impl-ParallelIterator-for-MultiZip%3C(A,+B)%3E"],[1634,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I)%3E"],[1635,"impl-ParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E)%3E"],[1937,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)%3E"],[1938,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G)%3E"],[1939,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)%3E"],[1940,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)%3E"],[1941,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D)%3E"],[1942,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E)%3E"],[1943,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H,+I)%3E"],[1944,"impl-IndexedParallelIterator-for-MultiZip%3C(A,)%3E"],[1945,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F,+G,+H)%3E"],[1946,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B)%3E"],[1947,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C,+D,+E,+F)%3E"],[1948,"impl-IndexedParallelIterator-for-MultiZip%3C(A,+B,+C)%3E"],[2081,"impl-IndexedParallelIterator-for-Iter%3Cchar%3E"],[2082,"impl-IndexedParallelIterator-for-Iter%3CT%3E"],[2083,"impl-ParallelIterator-for-Iter%3Cchar%3E"],[2084,"impl-ParallelIterator-for-Iter%3CT%3E"],[2091,"impl-IndexedParallelIterator-for-Iter%3Cchar%3E"],[2092,"impl-IndexedParallelIterator-for-Iter%3CT%3E"],[2093,"impl-ParallelIterator-for-Iter%3Cchar%3E"],[2094,"impl-ParallelIterator-for-Iter%3CT%3E"],[2099,"impl-IndexedParallelIterator-for-Iter%3Cchar%3E"],[2100,"impl-IndexedParallelIterator-for-Iter%3CT%3E"],[2108,"impl-IndexedParallelIterator-for-Iter%3CT%3E"],[2109,"impl-IndexedParallelIterator-for-Iter%3Cchar%3E"],[2110,"impl-ParallelIterator-for-Iter%3Cchar%3E"],[2111,"impl-ParallelIterator-for-Iter%3CT%3E"],[2118,"impl-IndexedParallelIterator-for-Iter%3Cchar%3E"],[2119,"impl-IndexedParallelIterator-for-Iter%3CT%3E"],[2120,"impl-ParallelIterator-for-Iter%3CT%3E"],[2121,"impl-ParallelIterator-for-Iter%3Cchar%3E"],[2126,"impl-IndexedParallelIterator-for-Iter%3Cchar%3E"],[2127,"impl-IndexedParallelIterator-for-Iter%3CT%3E"]]}],\ +["rayon_core",{"doc":"Rayon-core houses the core stable APIs of Rayon.","t":"FFPFPFFFFFFGNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNHNHNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNHNNNNNNNNNNNNNHNNNNNNNNNNNHNHHNNNNNNNNNNNHNHNNHNNHNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNHN","n":["BroadcastContext","Configuration","Executed","FnContext","Idle","Scope","ScopeFifo","ThreadBuilder","ThreadPool","ThreadPoolBuildError","ThreadPoolBuilder","Yield","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","breadth_first","breadth_first","broadcast","broadcast","build","build","build_global","build_scoped","clone","clone_into","current_num_threads","current_num_threads","current_thread_has_pending_tasks","current_thread_has_pending_tasks","current_thread_index","current_thread_index","default","default","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","description","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","eq","exit_handler","exit_handler","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","in_place_scope","in_place_scope","in_place_scope_fifo","in_place_scope_fifo","index","index","init","init","init","init","init","init","init","init","init","init","initialize","install","into","into","into","into","into","into","into","into","into","into","join","join","join_context","max_num_threads","migrated","name","new","new","new","num_threads","num_threads","num_threads","panic_handler","panic_handler","run","scope","scope","scope_fifo","scope_fifo","source","spawn","spawn","spawn","spawn_broadcast","spawn_broadcast","spawn_broadcast","spawn_broadcast","spawn_fifo","spawn_fifo","spawn_fifo","spawn_handler","stack_size","stack_size","stack_size","start_handler","start_handler","thread_name","thread_name","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","use_current_thread","yield_local","yield_local","yield_now","yield_now"],"q":[[0,"rayon_core"],[209,"alloc::vec"],[210,"core::marker"],[211,"core::ops::function"],[212,"core::marker"],[213,"core::error"],[214,"alloc::boxed"],[215,"core::ops::function"],[216,"core::fmt"],[217,"core::fmt"],[218,"std::io::error"],[219,"core::ops::function"],[220,"core::any"]],"d":["Provides context to a closure called by broadcast.","Contains the rayon thread pool configuration. Use …","Work was found and executed.","Provides the calling context to a closure called by …","No available work was found.","Represents a fork-join scope which can be used to spawn …","Represents a fork-join scope which can be used to spawn …","Thread builder used for customization via …","Represents a user created thread-pool.","Error when initializing a thread pool.","Used to create a new ThreadPool or to configure the global …","Result of yield_now() or yield_local().","","","","","","","","","","","","","","","","","","","","","(DEPRECATED) Suggest to worker threads that they execute …","Deprecated in favor of ThreadPoolBuilder::breadth_first.","Executes op within every thread in the current threadpool. …","Executes op within every thread in the threadpool. Any …","Creates a new ThreadPool initialized using this …","Deprecated in favor of ThreadPoolBuilder::build.","Initializes the global thread pool. This initialization is …","Creates a scoped ThreadPool initialized using this …","","","Returns the number of threads in the current registry. If …","Returns the (current) number of threads in the thread pool.","If called from a Rayon worker thread, indicates whether …","Returns true if the current worker thread currently has “…","If called from a Rayon worker thread, returns the index of …","If called from a Rayon worker thread in this thread-pool, …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Sets a callback to be invoked on thread exit.","Deprecated in favor of ThreadPoolBuilder::exit_handler.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates a “fork-join” scope s and invokes the closure …","Creates a scope that spawns work into this thread-pool.","Creates a “fork-join” scope s with FIFO order, and …","Creates a scope that spawns work into this thread-pool in …","Our index amongst the broadcast threads (ranges from …","Gets the index of this thread in the pool, within …","","","","","","","","","","","Deprecated in favor of ThreadPoolBuilder::build_global.","Executes op within the threadpool. Any attempts to use join…","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Takes two closures and potentially runs them in parallel. …","Execute oper_a and oper_b in the thread-pool and return …","Identical to join, except that the closures have a …","Returns the maximum number of threads that Rayon supports …","Returns true if the closure was called from a different …","Gets the string that was specified by …","Deprecated in favor of ThreadPoolBuilder::build.","Creates and returns a valid rayon thread pool builder, but …","Creates and return a valid rayon thread pool …","The number of threads receiving the broadcast in the …","Sets the number of threads to be used in the rayon …","Deprecated in favor of ThreadPoolBuilder::num_threads.","Normally, whenever Rayon catches a panic, it tries to …","Deprecated in favor of ThreadPoolBuilder::panic_handler.","Executes the main loop for this thread. This will not …","Creates a “fork-join” scope s and invokes the closure …","Creates a scope that executes within this thread-pool. …","Creates a “fork-join” scope s with FIFO order, and …","Creates a scope that executes within this thread-pool. …","","Puts the task into the Rayon threadpool’s job queue in …","Spawns a job into the fork-join scope self. This job will …","Spawns an asynchronous task in this thread-pool. This task …","Spawns an asynchronous task on every thread in this …","Spawns a job into every thread of the fork-join scope self…","Spawns a job into every thread of the fork-join scope self…","Spawns an asynchronous task on every thread in this …","Fires off a task into the Rayon threadpool in the “static…","Spawns a job into the fork-join scope self. This job will …","Spawns an asynchronous task in this thread-pool. This task …","Sets a custom function for spawning threads.","Gets the value that was specified by …","Sets the stack size of the worker threads","Deprecated in favor of ThreadPoolBuilder::stack_size.","Sets a callback to be invoked on thread start.","Deprecated in favor of ThreadPoolBuilder::start_handler.","Sets a closure which takes a thread index and returns the …","Deprecated in favor of ThreadPoolBuilder::thread_name.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Use the current thread as one of the threads in the pool.","Cooperatively yields execution to local Rayon work.","Cooperatively yields execution to local Rayon work.","Cooperatively yields execution to Rayon.","Cooperatively yields execution to Rayon."],"i":[0,0,17,0,17,0,0,0,0,0,0,0,5,15,24,25,9,1,17,10,2,26,5,15,24,25,9,1,17,10,2,26,1,2,0,9,1,2,1,1,17,17,0,9,0,9,0,9,1,2,5,15,24,25,9,1,17,10,2,26,5,15,24,25,9,1,17,10,2,26,10,5,15,24,25,9,9,1,17,10,2,26,17,1,2,5,15,24,25,9,1,17,10,10,2,26,5,15,24,25,9,1,17,10,2,26,0,9,0,9,5,15,5,15,24,25,9,1,17,10,2,26,0,9,5,15,24,25,9,1,17,10,2,26,0,9,0,0,26,15,9,1,2,5,1,2,1,2,15,0,9,0,9,10,0,24,9,0,24,25,9,0,25,9,1,15,1,2,1,2,1,2,17,10,5,15,24,25,9,1,17,10,2,26,5,15,24,25,9,1,17,10,2,26,5,15,24,25,9,1,17,10,2,26,1,0,9,0,9],"f":"````````````{ce{}{}}0000000000000000000{{{b{c}}}{{b{c}}}{}}{dd}{e{{f{c}}}h{{n{j}{{l{c}}}}A`}}{{Abe}{{f{c}}}h{{n{j}{{l{c}}}}A`}}{{{b{c}}}{{Af{AbAd}}}`}{d{{Af{Ab{Aj{Ah}}}}}}{{{b{c}}}{{Af{AlAd}}}`}{{bcg}{{Af{eAd}}}{{n{An}}A`}{}{{B`{Ab}{{l{e}}}}}}{BbBb}{{ce}Al{}{}}{{}Bd}{AbBd}{{}{{Bh{Bf}}}}{Ab{{Bh{Bf}}}}{{}{{Bh{Bd}}}}{Ab{{Bh{Bd}}}}{{}b}{{}d}{Bdc{}}0000000000000000000{AdBj}{BdAl}0000{AbAl}11111{{BbBb}Bf}{{{b{c}}e}{{b{c}}}{}{{n{Bd}}hA`}}{{dc}d{{n{Bd}}hA`}}{{jBl}Bn}{{AnBl}Bn}{{C`Bl}Bn}{{CbBl}Bn}{{AbBl}Bn}{{{b{c}}Bl}Bn{}}{{BbBl}Bn}{{AdBl}Bn}0{{dBl}Bn}{{CdBl}Bn}{cc{}}000000000{ec{}{{B`{C`}{{l{c}}}}}}{{Abe}c{}{{B`{C`}{{l{c}}}}}}{ec{}{{B`{Cb}{{l{c}}}}}}{{Abe}c{}{{B`{Cb}{{l{c}}}}}}{jBd}{AnBd}{{}Bd}000000000{d{{Af{Al{Aj{Ah}}}}}}{{Abe}ch{{B`{}{{l{c}}}}h}}{ce{}{}}000000000{{ei}{{Cf{cg}}}h{{B`{}{{l{c}}}}h}h{{B`{}{{l{g}}}}h}}{{Abei}{{Cf{cg}}}h{{B`{}{{l{c}}}}h}h{{B`{}{{l{g}}}}h}}{{ei}{{Cf{cg}}}h{{B`{Cd}{{l{c}}}}h}h{{B`{Cd}{{l{g}}}}h}}6{CdBf}{An{{Bh{Bj}}}}{d{{Af{Ab{Aj{Ah}}}}}}{{}b}{{}d}={{{b{c}}Bd}{{b{c}}}{}}{{dBd}d}{{{b{c}}e}{{b{c}}}{}{{n{{Aj{Ch}}}}hA`}}{{dc}d{{n{{Aj{Ch}}}}hA`}}{AnAl}{ech{{B`{C`}{{l{c}}}}h}}{{Abe}ch{{B`{C`}{{l{c}}}}h}}{ech{{B`{Cb}{{l{c}}}}h}}{{Abe}ch{{B`{Cb}{{l{c}}}}h}}{Ad{{Bh{Ah}}}}{cAl{B`h}}{{C`c}Al{{B`{C`}}h}}{{Abc}Al{B`h}}{cAl{{n{j}}hA`}}{{C`c}Al{{n{C`j}}hA`}}{{Cbc}Al{{n{Cbj}}hA`}}{{Abc}Al{{n{j}}hA`}}6{{Cbc}Al{{B`{Cb}}h}}5{{{b{c}}e}{{b{{`{e}}}}}{}{{Cl{An}{{l{{Cj{Al}}}}}}}}{An{{Bh{Bd}}}}{{{b{c}}Bd}{{b{c}}}{}}{{dBd}d}{{{b{c}}e}{{b{c}}}{}{{n{Bd}}hA`}}{{dc}d{{n{Bd}}hA`}}{{{b{c}}e}{{b{c}}}{}{{Cl{Bd}{{l{Cn}}}}}}{{dc}d{{Cl{Bd}{{l{Cn}}}}}}{ce{}{}}{cCn{}}{c{{Af{e}}}{}{}}0000000000000000000{cD`{}}000000000{{{b{c}}}{{b{c}}}{}}{{}{{Bh{Bb}}}}{Ab{{Bh{Bb}}}}10","c":[1,32,122,140],"p":[[5,"ThreadPoolBuilder",0],[5,"Configuration",0],[5,"Vec",209],[10,"Send",210],[5,"BroadcastContext",0],[17,"Output"],[10,"Fn",211],[10,"Sync",210],[5,"ThreadPool",0],[5,"ThreadPoolBuildError",0],[6,"Result",212],[10,"Error",213],[5,"Box",214],[1,"unit"],[5,"ThreadBuilder",0],[10,"FnOnce",211],[6,"Yield",0],[1,"usize"],[1,"bool"],[6,"Option",215],[1,"str"],[5,"Formatter",216],[8,"Result",216],[5,"Scope",0],[5,"ScopeFifo",0],[5,"FnContext",0],[1,"tuple"],[10,"Any",217],[8,"Result",218],[10,"FnMut",211],[5,"String",219],[5,"TypeId",217]],"b":[[92,"impl-Display-for-ThreadPoolBuildError"],[93,"impl-Debug-for-ThreadPoolBuildError"]]}],\ ["read_fonts",{"doc":"Reading OpenType tables","t":"RFFPFKTGPFKKFPPPPPPPPKPKGKKRTIIPKFFKPKNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNMMNMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNCNONNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNDNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCIFFNNNNONNNNNNNNNNNNNNNNNONNNNNNNNONNNNONNNNNNNNNIIGIIIFIIFIIFPPPINNNNNNNNNNNONNNNNONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNONNNNONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFPFPGFGFFGFPPPPPPPPFTGIIIIIIPFPFTNNONNONONONNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONONONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONOOONNNONNNONNNNNNNNNNONNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNOONNNNNNNNNOONONONONONNNNNNNNNNNNNNNNNNNNNONONNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONONONONNNNONONONNNNNNNNONONNNNNNNNNNONNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONONONONNOONONONOINNNNINNNNNFINNNNNNNNNNNNNNNNNNNNNNNNNNNFINNNNNNNNNNNNNNNNNNNNNNNNIIIIFIIFIIFIIGFPIFPPPPPPPPPPPGIGFFPFPFPFPNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONONNNOONNNONNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNONONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNOONNONONNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNONIFIFPFGIIIPPFIFIPPPGPPPPPPPPGPPPPPPPPFIPPPPPGIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIPPPPPPPPPPPPPPPPPPPPPPPIFIFPPPPPPPPPPPPPPPNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFIFTTNNONNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNIFINNNNNNNNNNNNNNONNNNNNNONNINNNNINNNNNIIFFNNNNNNONNONNNNNNNNNNONONNOONNNNNNNNNNNNNONONNONNNNNONNNNNNNNNTTTTIFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONONNNNNNNNNNNNNNNNIIPGIIIEEPEEEEEPPPIGIIPEEPIEENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTTGFPIFPFPPPPIGTPTTTTPPKPFFTTTPIFTTTGGFTTTTTTTTTTNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNONNNNNNNNNNNNNNNNNMNNNNNNNNNNNHNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNOOONNNNNNOOOOOOOOPPPPPPPPPPPPPPPPPPPPFFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPFFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPNNNNNNNNNNONNNNNNNNNNNNHNNNNNNNNNNNNNNNNONNNNNNNNNNONOONNNNNNNNNNNNNNNNNNNNNNNNTIIIGIFPPPFFEFPPPEPPPIEEFPIGEEPPPPPPPPPPPPPIIIEIFIIIIFPPPPPPPPPPPPGIIIFIGIIGEPPPGIIFFTTTTTTTTNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNONNNNNNNNNONNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNOONNNONONNNNNNNNONONONONNNNNNNNONOPPPIIPPPEEPPPEEPIGEEPPPPPPPPIIPPPIIEEPPPIPPPIEIEPPPGIIIGIIGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFIIIFTIFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOTTTITFTTTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNINNNNNNNNNNNNNNIFNNONNNNNNNNNNNNNNNNNNONNNNINNNNNNNNNNNNNIIGIIIIIPIGIIFIIIIIIGGIPGPKIIGFIFFIPPPPPPPPPPTTTIFPPPIFITFIIFGIIIFIIPIPIPGTIPPNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNMNNNNNONNNONNNNNONONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNONNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNONNNNNNNNNNNNNNNNNNNONNNNNNNONNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGPPNNNNNNNNNNNNNNNNINNNNNNNNNNNNNNNNIFNNNNNNONONNNNNNNNNNNCNNNNNNNNONSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSTTFTTTTGTTTTTFTPFIFFFTTTTTTTTPPTTTTTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNONNOONONNNNNNONNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTTTTTITTFTTTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNJFINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFPGPGIIIFFPPPPPPPGIIPPPPPPFPPPPGPSFPPFPNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNOONNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKSFNNMNNMNHNNNNMNMNNNNNNPPPPPPPPPPPPPFPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGPPPPPPPPPPPPPPPPPPPFPPPPPPGPPPPPPPPPPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNOOOTTIFIINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFGIIIIIFFTPPPPTINNNNNNONONONONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNTFFGIITFFKPPTTIITTFFFFTTFKFFFFFIFFFITNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNMNNNNNNONNNNNNNNNONNNNNNNNNNNNNNNNNONNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNINNNNNNNNNNNNNNEINNNNNNINNNNNNNNNNNNNNNN","n":["Args","ArrayOfNullableOffsets","ArrayOfOffsets","Collection","CollectionRef","ComputeSize","EMPTY","FileRef","Font","FontData","FontRead","FontReadWithArgs","FontRef","InvalidArrayLen","InvalidCollectionIndex","InvalidFormat","InvalidSfnt","InvalidTtc","MalformedData","MetricIsMissing","NullOffset","Offset","OutOfBounds","ReadArgs","ReadError","ResolveNullableOffset","ResolveOffset","Size","TAG","TTCHeader","TableDirectory","TableIsMissing","TableProvider","TableRecord","TableRef","TopLevelTable","ValidationError","VarSize","_padding","_padding","ach_vend_id","additional_offset_to_index_subtable","advance","advance","advance_height_delta","advance_height_mapping","advance_height_mapping_offset","advance_height_max","advance_width_delta","advance_width_mapping","advance_width_mapping_offset","advance_width_max","alpha","alpha","alternate_glyph_ids","alternate_set_count","alternate_set_offsets","alternate_sets","anchor_format","anchor_format","anchor_format","anchor_point","angle","angle","angle","angle","array","as_bytes","as_ref","ascender","ascender","attach_list","attach_list_offset","attach_point_offsets","attach_points","avar","avar","axes","axes","axis_count","axis_count","axis_count","axis_count","axis_count","axis_index","axis_index","axis_index","axis_index","axis_instance_arrays","axis_instance_arrays_offset","axis_segment_maps","axis_size","axis_value_count","axis_value_offsets","axis_values","axis_values","backdrop_paint","backdrop_paint_offset","backtrack_class_def","backtrack_class_def_offset","backtrack_coverage_offsets","backtrack_coverage_offsets","backtrack_coverages","backtrack_coverages","backtrack_glyph_count","backtrack_glyph_count","backtrack_glyph_count","backtrack_glyph_count","backtrack_sequence","backtrack_sequence","base_array","base_array_offset","base_coord_count","base_coord_format","base_coord_format","base_coord_format","base_coord_offsets","base_coord_point","base_coords","base_count","base_coverage","base_coverage_offset","base_glyph_list","base_glyph_list_offset","base_glyph_paint_records","base_glyph_records","base_glyph_records_offset","base_lang_sys_count","base_lang_sys_records","base_records","base_script_count","base_script_list","base_script_list_offset","base_script_records","base_tag_count","base_tag_list","base_tag_list_offset","base_values","base_values_offset","baseline_tags","big_metrics","big_metrics","bitmap_sizes","bitmap_sizes","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","bsb_delta","bsb_mapping","bsb_mapping_offset","caret_count","caret_offset","caret_offset","caret_slope_rise","caret_slope_rise","caret_slope_run","caret_slope_run","caret_value_format","caret_value_format","caret_value_format","caret_value_offsets","caret_value_point_index","caret_values","cbdt","cbdt","cblc","cblc","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_y","center_y","center_y","center_y","center_y","center_y","center_y","center_y","center_y","center_y","cff","cff","cff2","cff2","chained_class_seq_rule_count","chained_class_seq_rule_offsets","chained_class_seq_rule_set_count","chained_class_seq_rule_set_offsets","chained_class_seq_rule_sets","chained_class_seq_rules","chained_seq_rule_count","chained_seq_rule_offsets","chained_seq_rule_set_count","chained_seq_rule_set_offsets","chained_seq_rule_sets","chained_seq_rules","char_count","character","checksum","checksum","checksum_adjustment","class1_count","class1_records","class2_count","class_def","class_def1","class_def1_offset","class_def2","class_def2_offset","class_def_offset","class_format","class_format","class_range_count","class_range_records","class_seq_rule_count","class_seq_rule_offsets","class_seq_rule_set_count","class_seq_rule_set_offsets","class_seq_rule_sets","class_seq_rules","class_value_array","clip_list","clip_list_offset","clips","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmap","cmap","cmp","color_line","color_line","color_line","color_line","color_line","color_line","color_line_offset","color_line_offset","color_line_offset","color_line_offset","color_line_offset","color_line_offset","color_record_indices","color_records_array","color_records_array_offset","color_stops","color_stops","colr","colr","component_count","component_count","component_data","component_glyph_ids","component_glyphs_and_flags","component_records","components","composite_mode","compute_delta","compute_float_delta","compute_size","condition_count","condition_offsets","conditions","coordinate","coordinate","coordinate","coordinate","coordinate","count","count","count","count_and_instructions","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage","coverage_format","coverage_format","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offsets","coverage_offsets","coverages","coverages","cpal","cpal","created","cvar","cvar","data","data","data","data","data","data","data_for_tag","data_for_tag","data_offset","default","default_baseline_index","default_lang_sys","default_lang_sys_offset","default_min_max","default_min_max_offset","delta_format","delta_format","delta_glyph_id","delta_set","delta_set_inner_index","delta_set_outer_index","delta_sets","delta_value","deltas","descender","descender","design_axes","design_axes_offset","design_axis_count","design_axis_size","design_size","device","device","device_offset","device_offset","dsig_length","dsig_length","dsig_offset","dsig_offset","dsig_tag","dsig_tag","dx","dx","dx","dx","dy","dy","dy","dy","ebdt","ebdt","eblc","eblc","elided_fallback_name_id","encoding_records","end_angle","end_angle","end_code","end_pts_of_contours","end_size","entry_count","entry_exit_count","entry_exit_record","entry_format","entry_format","entry_selector","entry_selector","entry_selector","eq","expect_data_for_tag","expect_data_for_tag","expect_table","expect_table","extend","extend","extension","extension","extension_lookup_type","extension_lookup_type","extension_offset","extension_offset","fds","feat_min_max_count","feat_min_max_records","feat_ui_label_name_id","feat_ui_tooltip_text_name_id","feature_count","feature_index_count","feature_indices","feature_list","feature_list","feature_list_offset","feature_list_offset","feature_params","feature_params_offset","feature_records","feature_variation_record_count","feature_variation_records","feature_variations","feature_variations","feature_variations_offset","feature_variations_offset","filter_range_max_value","filter_range_min_value","first_code","first_glyph_index","first_layer_index","first_param_ui_label_name_id","flags","flags","flags","flags","flags","flags","flags","fmt","fmt","fmt","fmt","font_direction_hint","font_revision","fonts","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","from","from","from","from","from","from","from","from","from","from","from_index","fs_selection","fs_type","fvar","fvar","gasp_ranges","gdef","gdef","get","get","get","get","get","get","get","get","get","get_offset","get_offset","get_subtable","glyf","glyf","glyph_array","glyph_array","glyph_array","glyph_class_def","glyph_class_def_offset","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","glyph_data","glyph_data","glyph_data_format","glyph_data_offsets","glyph_id","glyph_id","glyph_id_array","glyph_id_array","glyph_id_array","glyph_id_array","glyph_name","glyph_name_index","glyph_variation_data","glyph_variation_data_array_offset","glyph_variation_data_offsets","gpos","gpos","graphic_type","groups","groups","groups","gsub","gsub","gvar","gvar","h_metrics","has_overlapping_contours","hash","hdr_size","head","head","header_size","hhea","hhea","hmtx","hmtx","horiz_axis","horiz_axis_offset","hvar","hvar","id_delta","id_range_offsets","identifier","image_data_offset","image_data_offset","image_data_offset","image_data_offset","image_data_offset","image_format","image_format","image_format","image_format","image_format","image_size","image_size","index_format","index_format","index_format","index_format","index_format","index_to_loc_format","input_class_def","input_class_def_offset","input_coverage_offsets","input_coverages","input_glyph_count","input_glyph_count","input_glyph_count","input_sequence","input_sequence","input_sequence","input_sequence","instance_count","instance_size","instances","instances","instruction_length","instructions","instructions","intermediate_end_tuple","intermediate_start_tuple","into","into","into","into","into","into","into","into","into","is32","is_empty","is_empty","is_empty","is_empty","is_fixed_pitch","is_valid_bit_pattern","italic_angle","item_count","item_var_store","item_var_store","item_var_store_offset","item_var_store_offset","item_variation_data","item_variation_data_count","item_variation_data_offsets","item_variation_store","item_variation_store","item_variation_store","item_variation_store","item_variation_store_offset","item_variation_store_offset","item_variation_store_offset","item_variation_store_offset","iter","iter","iter","iter","iter","iter","iter","iter","iter","lang_sys_count","lang_sys_records","lang_tag_count","lang_tag_record","language","language","language","language","language","language","language","language","last_glyph_index","layer_list","layer_list_offset","layer_records","layer_records_offset","left_side_bearings","len","len","len","len","length","length","length","length","length","length","length","length","length","length","length","lig_caret_list","lig_caret_list_offset","lig_glyph_count","lig_glyph_offsets","lig_glyphs","ligature_array","ligature_array_offset","ligature_attach_offsets","ligature_attaches","ligature_count","ligature_count","ligature_coverage","ligature_coverage_offset","ligature_glyph","ligature_offsets","ligature_set_count","ligature_set_offsets","ligature_sets","ligatures","line_gap","line_gap","linked_value","loca","loca","lookahead_class_def","lookahead_class_def_offset","lookahead_coverage_offsets","lookahead_coverage_offsets","lookahead_coverages","lookahead_coverages","lookahead_glyph_count","lookahead_glyph_count","lookahead_glyph_count","lookahead_glyph_count","lookahead_sequence","lookahead_sequence","lookup_count","lookup_flag","lookup_index_count","lookup_list","lookup_list","lookup_list_indices","lookup_list_offset","lookup_list_offset","lookup_offsets","lookup_type","lookups","lowest_rec_ppem","lsb_delta","lsb_mapping","lsb_mapping_offset","mac_style","magic_number","major","major_version","major_version","major_version","major_version","major_version","map_codepoint","map_codepoint","map_codepoint","map_count","map_count","map_data","map_data","map_variant","mark1_array","mark1_array_offset","mark1_coverage","mark1_coverage_offset","mark2_array","mark2_array_offset","mark2_count","mark2_coverage","mark2_coverage_offset","mark2_records","mark_array","mark_array","mark_array_offset","mark_array_offset","mark_attach_class_def","mark_attach_class_def_offset","mark_class_count","mark_class_count","mark_class_count","mark_count","mark_coverage","mark_coverage","mark_coverage_offset","mark_coverage_offset","mark_filtering_set","mark_glyph_set_count","mark_glyph_sets_def","mark_glyph_sets_def_offset","mark_records","max_component_depth","max_component_elements","max_composite_contours","max_composite_points","max_contours","max_coord","max_coord_offset","max_function_defs","max_instruction_defs","max_mem_type1","max_mem_type42","max_points","max_size_of_instructions","max_stack_elements","max_storage","max_twilight_points","max_zones","maxp","maxp","metric_data_format","metric_data_format","metric_delta","min_bottom_side_bearing","min_coord","min_coord_offset","min_left_side_bearing","min_mem_type1","min_mem_type42","min_right_side_bearing","min_top_side_bearing","minor","minor_version","minor_version","minor_version","minor_version","minor_version","modified","mvar","mvar","n_ranges","n_ranges","name","name","name_entry","name_record","new","new","new","new","nominal_value","non_null","non_null","num_base_glyph_paint_records","num_base_glyph_records","num_chars","num_clips","num_color_records","num_fonts","num_fonts","num_glyphs","num_glyphs","num_glyphs","num_glyphs","num_groups","num_groups","num_groups","num_layer_records","num_layers","num_layers","num_named_parameters","num_names","num_palette_entries","num_palettes","num_points","num_ranges","num_sizes","num_sizes","num_stops","num_stops","num_strikes","num_tables","num_tables","num_tables","num_unicode_value_ranges","num_uvs_mappings","num_var_selector_records","number_of_contours","number_of_contours","number_of_long_metrics","number_of_long_ver_metrics","off_size","off_size","off_size","offset","offset","offset_data","offset_to_axis_value_offsets","offset_to_axis_values","offsets","offsets","origin_offset_x","origin_offset_y","os2","os2","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offsets","paints","pair_set_count","pair_set_offsets","pair_sets","pair_value_count","pair_value_records","palette_entry_labels_array","palette_entry_labels_array_offset","palette_index","palette_index","palette_labels_array","palette_labels_array_offset","palette_types_array","palette_types_array_offset","panose_10","partial_cmp","peak_tuple","point_count","point_indices","points","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","post","post","ppem","ppi","radius0","radius0","radius1","radius1","range_count","range_end","range_max_value","range_min_value","range_records","range_shift","range_shift","range_shift","range_start","ranges","ranges","ranges","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read_array","read_at","read_be_at","read_points_fast","read_ref_at","read_with_args","read_with_args","read_with_args","read_with_args","reference_glyph","region_count","region_index_count","region_indexes","required_feature_index","resolve","resolve","resolve_offset","resolve_with_args","resolve_with_args","rsb_delta","rsb_mapping","rsb_mapping_offset","s_cap_height","s_family_class","s_typo_ascender","s_typo_descender","s_typo_line_gap","sample_text_name_id","sbit_offsets","sbit_offsets","sbix","sbix","scale","scale","scale","scale","scale_x","scale_x","scale_x","scale_x","scale_y","scale_y","scale_y","scale_y","script_count","script_list","script_list","script_list_offset","script_list_offset","script_records","search_range","search_range","search_range","seg_count_x2","sentinel","sentinel","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_rule_count","seq_rule_offsets","seq_rule_set_count","seq_rule_set_offsets","seq_rule_sets","seq_rules","sequence_count","sequence_offsets","sequences","serialized_data","serialized_data_offset","sfnt_version","sfnt_version","shared_tuple_count","shared_tuples","shared_tuples_offset","side_bearing","side_bearing","size_in_bytes","size_in_bytes","slice","source_paint","source_paint_offset","split_off","start_angle","start_angle","start_char_code","start_code","start_glyph_id","start_size","stat","stat","storage_offset","strike_offsets","strikes","string_data","string_data","sub_header_keys","sub_table_count","subst_format","subst_format","subst_format","subst_format","subst_format","subst_format","subst_format","substitute_glyph_ids","substitute_glyph_ids","substitute_glyph_ids","substitution_count","substitutions","subtable_offsets","subtables","sx_height","table_data","table_directory","table_directory_offsets","table_directory_offsets","table_records","table_records","tables","tag","tag","take_up_to","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_usize","top_dict_data","top_dict_length","top_side_bearings","trailing_data","trailing_data","transform","transform","transform_offset","transform_offset","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","tsb_delta","tsb_mapping","tsb_mapping_offset","ttc_tag","ttc_tag","tuple_index","tuple_variation_count","tuple_variation_count","tuple_variation_headers","tuple_variation_headers","tuples","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","types","ui_name_id","ul_code_page_range_1","ul_code_page_range_2","ul_unicode_range_1","ul_unicode_range_2","ul_unicode_range_3","ul_unicode_range_4","underline_position","underline_thickness","units_per_em","us_break_char","us_default_char","us_first_char_index","us_last_char_index","us_lower_optical_point_size","us_max_context","us_upper_optical_point_size","us_weight_class","us_width_class","us_win_ascent","us_win_descent","uvs_mapping","v0_base_glyph","v0_layer","v1_base_glyph","v1_clip_box","v1_layer","v_metrics","v_org_delta","v_org_mapping","v_org_mapping_offset","value","value","value_count","value_format","value_format","value_format1","value_format1","value_format2","value_format2","value_name_id","value_name_id","value_name_id","value_name_id","value_record","value_record_count","value_record_size","value_records","value_records","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_map","var_index_map_offset","var_selector","variation_data","variation_data_size","variation_region_list","variation_region_list_offset","variation_regions","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","version","vert_axis","vert_axis_offset","vhea","vhea","vmtx","vmtx","vvar","vvar","word_delta_count","x0","x0","x0","x0","x1","x1","x1","x1","x2","x2","x_avg_char_width","x_coordinate","x_coordinate","x_coordinate","x_device","x_device_offset","x_max","x_max","x_max","x_max","x_max","x_max_extent","x_min","x_min","x_min","x_min","x_min","x_skew_angle","x_skew_angle","x_skew_angle","x_skew_angle","xx","xx","xy","xy","y0","y0","y0","y0","y1","y1","y1","y1","y2","y2","y_coordinate","y_coordinate","y_coordinate","y_device","y_device_offset","y_max","y_max","y_max","y_max","y_max","y_max_extent","y_min","y_min","y_min","y_min","y_min","y_skew_angle","y_skew_angle","y_skew_angle","y_skew_angle","y_strikeout_position","y_strikeout_size","y_subscript_x_offset","y_subscript_x_size","y_subscript_y_offset","y_subscript_y_size","y_superscript_x_offset","y_superscript_x_size","y_superscript_y_offset","y_superscript_y_size","yx","yx","yy","yy","ComputedArray","VarLenArray","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","fmt","from","from","get","get","into","into","is_empty","iter","iter","len","new","read","read_with_args","read_with_args","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","avar","base","bitmap","cbdt","cblc","cff","cff2","cmap","colr","cpal","cvar","ebdt","eblc","fvar","gasp","gdef","glyf","gpos","gsub","gvar","head","hhea","hmtx","hvar","layout","loca","maxp","mvar","name","os2","post","postscript","sbix","stat","variations","vhea","vmtx","vvar","Avar","AxisValueMap","SegmentMaps","apply","axis_count","axis_segment_maps","axis_value_maps","axis_value_maps","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","cmp","eq","eq","fmt","fmt","from","from","from_coordinate","from_coordinate","hash","hash","into","into","is_valid_bit_pattern","partial_cmp","partial_cmp","position_map_count","position_map_count","read","read","read_with_args","to_coordinate","to_coordinate","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","version","Axis","Base","BaseCoord","BaseCoordFormat1","BaseCoordFormat2","BaseCoordFormat3","BaseLangSysRecord","BaseScript","BaseScriptList","BaseScriptRecord","BaseTagList","BaseValues","FeatMinMaxRecord","Format1","Format2","Format3","MinMax","base_coord_count","base_coord_format","base_coord_format","base_coord_format","base_coord_format","base_coord_offsets","base_coord_point","base_coords","base_lang_sys_count","base_lang_sys_records","base_lang_sys_tag","base_lang_sys_tag","base_script","base_script_count","base_script_list","base_script_list_offset","base_script_offset","base_script_offset","base_script_records","base_script_tag","base_script_tag","base_tag_count","base_tag_list","base_tag_list_offset","base_values","base_values_offset","baseline_tags","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","coordinate","coordinate","coordinate","coordinate","default_baseline_index","default_min_max","default_min_max_offset","device","device_offset","feat_min_max_count","feat_min_max_records","feature_table_tag","feature_table_tag","fmt","fmt","fmt","from","from","from","from","horiz_axis","horiz_axis_offset","into","into","into","into","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","item_var_store","item_var_store_offset","max_coord","max_coord","max_coord_offset","max_coord_offset","max_coord_offset","min_coord","min_coord","min_coord_offset","min_coord_offset","min_coord_offset","min_max","min_max_offset","min_max_offset","read","read","read","read","read","read","read","read","read","read","read","read_with_args","reference_glyph","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","version","vert_axis","vert_axis_offset","BdtComponent","Big","BigGlyphMetrics","BitAligned","BitmapContent","BitmapData","BitmapDataFormat","BitmapFlags","BitmapLocation","BitmapMetrics","BitmapSize","ByteAligned","Composite","Data","Format1","Format2","Format3","Format4","Format5","GlyphIdOffsetPair","HORIZONTAL_METRICS","IndexSubtable","IndexSubtable1","IndexSubtable2","IndexSubtable3","IndexSubtable4","IndexSubtable5","IndexSubtableArray","Png","SbitLineMetrics","Small","SmallGlyphMetrics","VERTICAL_METRICS","additional_offset_to_index_subtable","advance","advance","all","ascender","ascender","bearing_x","bearing_x","bearing_y","bearing_y","big_metrics","big_metrics","bit_depth","bit_depth","bit_depth","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","caret_offset","caret_offset","caret_slope_denominator","caret_slope_denominator","caret_slope_numerator","caret_slope_numerator","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","cmp","color_ref","color_ref","contains","content","data_offset","data_size","default","default","descender","descender","difference","empty","end_glyph_index","end_glyph_index","eq","eq","eq","eq","eq","eq","eq","eq","first_glyph_index","flags","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from_bits","from_bits_truncate","from_raw","glyph_array","glyph_array","glyph_id","glyph_id","glyph_id","glyph_id","hash","hash","hash","hash","hash","hash","hash","height","height","height","height","hori","hori","hori_advance","hori_advance","hori_bearing_x","hori_bearing_x","hori_bearing_y","hori_bearing_y","image_data_offset","image_data_offset","image_data_offset","image_data_offset","image_data_offset","image_data_offset","image_format","image_format","image_format","image_format","image_format","image_format","image_size","image_size","index_format","index_format","index_format","index_format","index_format","index_format","index_subtable_array_offset","index_subtable_array_offset","index_tables_size","index_tables_size","insert","intersection","intersects","into","into","into","into","into","into","into","into","into","into","into","into","into","is_empty","is_empty","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","last_glyph_index","location","max_before_bl","max_before_bl","metrics","metrics","min_advance_sb","min_advance_sb","min_after_bl","min_after_bl","min_origin_sb","min_origin_sb","not","num_glyphs","num_glyphs","number_of_index_subtables","number_of_index_subtables","pad1","pad1","pad2","pad2","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","ppem_x","ppem_x","ppem_y","ppem_y","read","read","read","read","read","read","read","read_with_args","remove","sbit_offset","sbit_offset","sbit_offsets","sbit_offsets","start_glyph_index","start_glyph_index","sub","sub_assign","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","toggle","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","union","vert","vert","vert_advance","vert_advance","vert_bearing_x","vert_bearing_x","vert_bearing_y","vert_bearing_y","width","width","width","width","width_max","width_max","x_offset","x_offset","y_offset","y_offset","Cbdt","data","major_version","minor_version","read","Cblc","bitmap_sizes","major_version","minor_version","num_sizes","read","Cff","CffHeader","_padding","borrow","borrow_mut","clone","clone_into","from","global_subrs","hdr_size","header","into","major","minor","name","names","off_size","offset_data","read","read","read_with_args","string","strings","to_owned","top_dicts","trailing_data","try_from","try_into","type_id","Cff2","Cff2Header","_padding","borrow","borrow_mut","clone","clone_into","from","global_subrs","header","header_size","into","major_version","minor_version","offset_data","read","read","read_with_args","to_owned","top_dict_data","top_dict_data","top_dict_length","trailing_data","try_from","try_into","type_id","Cmap","Cmap0","Cmap10","Cmap12","Cmap12Iter","Cmap13","Cmap14","Cmap14Iter","Cmap2","Cmap4","Cmap4Iter","Cmap6","Cmap8","CmapSubtable","ConstantMapGroup","Custom","DefaultUvs","EncodingRecord","Format0","Format10","Format12","Format13","Format14","Format2","Format4","Format6","Format8","ISO","Macintosh","MapVariant","NonDefaultUvs","PlatformId","SequentialMapGroup","SubHeader","Unicode","UnicodeRange","UseDefault","UvsMapping","Variant","VariationSelector","Windows","additional_count","additional_count","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","default","default_uvs","default_uvs_offset","default_uvs_offset","encoding_id","encoding_id","encoding_records","end_char_code","end_char_code","end_char_code","end_char_code","end_code","entry_count","entry_count","entry_count","entry_selector","eq","eq","eq","eq","eq","eq","eq","first_code","first_code","first_code","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","format","format","format","format","format","format","format","format","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from_raw","glyph_id","glyph_id","glyph_id","glyph_id","glyph_id_array","glyph_id_array","glyph_id_array","glyph_id_array","groups","groups","groups","hash","hash","hash","hash","hash","hash","id_delta","id_delta","id_delta","id_range_offset","id_range_offset","id_range_offsets","into","into","into","into","into","into","into","into","into","into","into","into","into","into_iter","into_iter","into_iter","is32","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","iter","iter","iter","language","language","language","language","language","language","language","language","length","length","length","length","length","length","length","length","length","map_codepoint","map_codepoint","map_codepoint","map_variant","new","next","next","next","non_default_uvs","non_default_uvs_offset","non_default_uvs_offset","num_chars","num_groups","num_groups","num_groups","num_tables","num_unicode_value_ranges","num_uvs_mappings","num_var_selector_records","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","platform_id","platform_id","range_shift","ranges","read","read","read","read","read","read","read","read","read","read","read","read","read","read_with_args","search_range","seg_count_x2","start_char_code","start_char_code","start_char_code","start_char_code","start_char_code","start_code","start_glyph_id","start_glyph_id","start_unicode_value","start_unicode_value","sub_header_keys","subtable","subtable_offset","subtable_offset","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unicode_value","unicode_value","uvs_mapping","var_selector","var_selector","var_selector","version","Affine2x3","BaseGlyph","BaseGlyphList","BaseGlyphPaint","Clear","Clip","ClipBox","ClipBoxFormat1","ClipBoxFormat2","ClipList","ColorBurn","ColorDodge","ColorIndex","ColorLine","ColorStop","Colr","ColrGlyph","ColrLayers","Composite","CompositeMode","Darken","Dest","DestAtop","DestIn","DestOut","DestOver","Difference","Exclusion","Extend","Format1","Format2","Glyph","HardLight","HslColor","HslHue","HslLuminosity","HslSaturation","Layer","LayerList","Lighten","LinearGradient","Multiply","Overlay","Pad","Paint","PaintColrGlyph","PaintColrLayers","PaintComposite","PaintGlyph","PaintId","PaintLinearGradient","PaintRadialGradient","PaintRotate","PaintRotateAroundCenter","PaintScale","PaintScaleAroundCenter","PaintScaleUniform","PaintScaleUniformAroundCenter","PaintSkew","PaintSkewAroundCenter","PaintSolid","PaintSweepGradient","PaintTransform","PaintTranslate","PaintVarLinearGradient","PaintVarRadialGradient","PaintVarRotate","PaintVarRotateAroundCenter","PaintVarScale","PaintVarScaleAroundCenter","PaintVarScaleUniform","PaintVarScaleUniformAroundCenter","PaintVarSkew","PaintVarSkewAroundCenter","PaintVarSolid","PaintVarSweepGradient","PaintVarTransform","PaintVarTranslate","Plus","RadialGradient","Reflect","Repeat","Rotate","RotateAroundCenter","Scale","ScaleAroundCenter","ScaleUniform","ScaleUniformAroundCenter","Screen","Skew","SkewAroundCenter","SoftLight","Solid","Src","SrcAtop","SrcIn","SrcOut","SrcOver","SweepGradient","Transform","Translate","VarAffine2x3","VarColorIndex","VarColorLine","VarColorStop","VarLinearGradient","VarRadialGradient","VarRotate","VarRotateAroundCenter","VarScale","VarScaleAroundCenter","VarScaleUniform","VarScaleUniformAroundCenter","VarSkew","VarSkewAroundCenter","VarSolid","VarSweepGradient","VarTransform","VarTranslate","Xor","alpha","alpha","alpha","alpha","alpha","alpha","alpha","alpha","alpha","alpha","angle","angle","angle","angle","backdrop_paint","backdrop_paint_offset","base_glyph_list","base_glyph_list_offset","base_glyph_paint_records","base_glyph_records","base_glyph_records_offset","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_x","center_y","center_y","center_y","center_y","center_y","center_y","center_y","center_y","center_y","center_y","clip_box","clip_box_offset","clip_box_offset","clip_list","clip_list_offset","clips","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","cmp","cmp","color_line","color_line","color_line","color_line","color_line","color_line","color_line_offset","color_line_offset","color_line_offset","color_line_offset","color_line_offset","color_line_offset","color_stops","color_stops","composite_mode","default","default","dx","dx","dx","dx","dy","dy","dy","dy","end_angle","end_angle","end_glyph_id","end_glyph_id","eq","eq","eq","eq","eq","eq","eq","eq","extend","extend","first_layer_index","first_layer_index","first_layer_index","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","format","from","from","from","from","from","from","from","from","from","from","from","from","from_raw","from_raw","glyph_id","glyph_id","glyph_id","glyph_id","glyph_id","glyph_id","glyph_id","glyph_id","hash","hash","hash","hash","hash","hash","hash","hash","into","into","into","into","into","into","into","into","into","into","into","into","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","item_variation_store","item_variation_store_offset","layer_list","layer_list_offset","layer_records","layer_records_offset","new","new","num_base_glyph_paint_records","num_base_glyph_records","num_clips","num_layer_records","num_layers","num_layers","num_layers","num_layers","num_stops","num_stops","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offset","paint_offsets","paints","palette_index","palette_index","palette_index","palette_index","palette_index","palette_index","palette_index","palette_index","palette_index","palette_index","palette_index","palette_index","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","radius0","radius0","radius1","radius1","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read_with_args","read_with_args","scale","scale","scale","scale","scale_x","scale_x","scale_x","scale_x","scale_y","scale_y","scale_y","scale_y","source_paint","source_paint_offset","start_angle","start_angle","start_glyph_id","start_glyph_id","stop_offset","stop_offset","stop_offset","stop_offset","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","to_raw","transform","transform","transform_offset","transform_offset","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","v0_base_glyph","v0_layer","v1_base_glyph","v1_clip_box","v1_layer","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_base","var_index_map","var_index_map_offset","version","x0","x0","x0","x0","x1","x1","x1","x1","x2","x2","x_max","x_max","x_max","x_min","x_min","x_min","x_skew_angle","x_skew_angle","x_skew_angle","x_skew_angle","xx","xx","xy","xy","y0","y0","y0","y0","y1","y1","y1","y1","y2","y2","y_max","y_max","y_max","y_min","y_min","y_min","y_skew_angle","y_skew_angle","y_skew_angle","y_skew_angle","yx","yx","yy","yy","ColorRecord","Cpal","PaletteType","USABLE_WITH_DARK_BACKGROUND","USABLE_WITH_LIGHT_BACKGROUND","all","alpha","alpha","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","blue","blue","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","cmp","color_record_indices","color_records_array","color_records_array_offset","contains","default","difference","empty","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from_bits","from_bits_truncate","from_raw","green","green","hash","hash","insert","intersection","intersects","into","into","is_empty","is_valid_bit_pattern","is_valid_bit_pattern","not","num_color_records","num_palette_entries","num_palettes","palette_entry_labels_array","palette_entry_labels_array_offset","palette_labels_array","palette_labels_array_offset","palette_types_array","palette_types_array_offset","partial_cmp","partial_cmp","read","red","red","remove","sub","sub_assign","to_owned","to_owned","to_raw","toggle","try_from","try_from","try_into","try_into","type_id","type_id","union","version","Cvar","CvtDelta","CvtVariationData","apply_scalar","borrow","borrow_mut","clone","clone_into","data","data_offset","deltas","eq","fmt","from","into","is_point","new","position","read","to_owned","try_from","try_into","tuple_variation_count","tuple_variation_headers","type_id","value","variation_data","version","Ebdt","data","major_version","minor_version","read","Eblc","bitmap_sizes","major_version","minor_version","num_sizes","read","AxisInstanceArrays","Fvar","InstanceRecord","VariationAxisRecord","axes","axes","axis_count","axis_instance_arrays","axis_instance_arrays_offset","axis_name_id","axis_name_id","axis_size","axis_tag","axis_tag","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","compute_size","coordinates","default_value","default_value","eq","flags","flags","flags","fmt","fmt","from","from","hash","instance_count","instance_size","instances","instances","into","into","is_valid_bit_pattern","max_value","max_value","min_value","min_value","normalize","partial_cmp","post_script_name_id","read","read","read","read_with_args","read_with_args","subfamily_name_id","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","version","GASP_DOGRAY","GASP_GRIDFIT","GASP_SYMMETRIC_GRIDFIT","GASP_SYMMETRIC_SMOOTHING","Gasp","GaspRange","GaspRangeBehavior","all","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","cmp","contains","default","difference","empty","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from_bits","from_bits_truncate","from_raw","gasp_ranges","hash","hash","insert","intersection","intersects","into","into","is_empty","is_valid_bit_pattern","is_valid_bit_pattern","not","num_ranges","partial_cmp","partial_cmp","range_gasp_behavior","range_gasp_behavior","range_max_ppem","range_max_ppem","read","remove","sub","sub_assign","to_owned","to_owned","to_raw","toggle","try_from","try_from","try_into","try_into","type_id","type_id","union","version","AttachList","AttachPoint","Base","CaretValue","CaretValueFormat1","CaretValueFormat2","CaretValueFormat3","ChainedSequenceContext","ClassDef","Component","CoverageTable","Device","DeviceOrVariationIndex","FeatureList","FeatureVariations","Format1","Format2","Format3","Gdef","GlyphClassDef","LigCaretList","LigGlyph","Ligature","Lookup","LookupList","Mark","MarkGlyphSets","ScriptList","SequenceContext","attach_list","attach_list_offset","attach_point_offsets","attach_points","borrow","borrow","borrow_mut","borrow_mut","caret_count","caret_value_format","caret_value_format","caret_value_format","caret_value_format","caret_value_offsets","caret_value_point_index","caret_values","clone","clone","clone_into","clone_into","cmp","coordinate","coordinate","coverage","coverage","coverage_offset","coverage_offset","coverage_offsets","coverages","default","device","device_offset","eq","fmt","format","from","from","from_raw","glyph_class_def","glyph_class_def_offset","glyph_count","hash","into","into","item_var_store","item_var_store_offset","lig_caret_list","lig_caret_list_offset","lig_glyph_count","lig_glyph_offsets","lig_glyphs","mark_attach_class_def","mark_attach_class_def_offset","mark_glyph_set_count","mark_glyph_sets_def","mark_glyph_sets_def_offset","new","partial_cmp","point_count","point_indices","read","read","read","read","read","read","read","read","read","read","read_with_args","to_owned","to_owned","to_raw","try_from","try_from","try_into","try_into","type_id","type_id","version","ARGS_ARE_XY_VALUES","ARG_1_AND_2_ARE_WORDS","Anchor","Component","Composite","CompositeGlyph","CompositeGlyphFlags","ContourOrder","CurvePoint","ExpectedCubic","ExpectedQuad","ExpectedQuadOrOnCurve","FreeType","Glyf","Glyph","HAS_DELTA","HarfBuzz","MORE_COMPONENTS","ON_CURVE_POINT","OVERLAP_COMPOUND","OVERLAP_SIMPLE","Offset","Point","PointCoord","PointFlagMismatch","PointFlags","PointMarker","REPEAT_FLAG","ROUND_XY_TO_GRID","SCALED_COMPONENT_OFFSET","Simple","SimpleGlyph","SimpleGlyphFlags","TOUCHED","TOUCHED_X","TOUCHED_Y","ToPathError","ToPathStyle","Transform","UNSCALED_COMPONENT_OFFSET","USE_MY_METRICS","WE_HAVE_AN_X_AND_Y_SCALE","WE_HAVE_A_SCALE","WE_HAVE_A_TWO_BY_TWO","WE_HAVE_INSTRUCTIONS","X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR","X_SHORT_VECTOR","Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR","Y_SHORT_VECTOR","all","all","anchor","bitand","bitand","bitand_assign","bitand_assign","bitor","bitor","bitor_assign","bitor_assign","bits","bits","bitxor","bitxor","bitxor_assign","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","bytecode","clear_marker","clear_on_curve","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","component_data","component_glyphs_and_flags","components","compute_flags","compute_flags","contains","contains","count_and_instructions","default","default","default","default","default","default","difference","difference","empty","empty","end_pts_of_contours","eq","eq","eq","eq","eq","eq","eq","eq","flags","flip_on_curve","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from_bits","from_bits","from_bits","from_bits_truncate","from_bits_truncate","from_fixed","from_i32","from_raw","from_raw","glyph","glyph_data","has_marker","has_overlapping_contours","hash","hash","insert","insert","instruction_length","instructions","instructions","intersection","intersection","intersects","intersects","into","into","into","into","into","into","into","into","into","into","into","is_empty","is_empty","is_off_curve","is_off_curve_cubic","is_off_curve_quad","is_on_curve","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","midpoint","new","not","not","num_points","number_of_contours","number_of_contours","number_of_contours","off_curve","off_curve_cubic","off_curve_quad","on_curve","on_curve","on_curve","partial_cmp","partial_cmp","points","read","read","read","read","read_points_fast","read_with_args","remove","remove","set_marker","set_on_curve","sub","sub","sub_assign","sub_assign","to_f32","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_path","to_raw","to_raw","to_string","toggle","toggle","transform","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","union","union","x","x_max","x_max","x_max","x_min","x_min","x_min","xx","xy","y","y_max","y_max","y_max","y_min","y_min","y_min","yx","yy","base","component","x","y","num_flags","num_points","AA","ABS","ADD","ALIGNPTS","ALIGNRP","AND","CALL","CEILING","CINDEX","CLEAR","DEBUG","DELTAC1","DELTAC2","DELTAC3","DELTAP1","DELTAP2","DELTAP3","DEPTH","DIV","DUP","DecodeError","Decoder","EIF","ELSE","ENDF","EQ","EVEN","FDEF","FLIPOFF","FLIPON","FLIPPT","FLIPRGOFF","FLIPRGON","FLOOR","GC0","GC1","GETDATA","GETINFO","GETVARIATION","GFV","GPV","GT","GTEQ","IDEF","IF","INS28","INS7B","INS83","INS84","INS8F","INS90","INS93","INS94","INS95","INS96","INS97","INS98","INS99","INS9A","INS9B","INS9C","INS9D","INS9E","INS9F","INSA0","INSA1","INSA2","INSA3","INSA4","INSA5","INSA6","INSA7","INSA8","INSA9","INSAA","INSAB","INSAC","INSAD","INSAE","INSAF","INSTCTRL","IP","ISECT","IUP0","IUP1","InlineOperands","Instruction","JMPR","JROF","JROT","LOOPCALL","LT","LTEQ","MAX","MD0","MD1","MDAP0","MDAP1","MDRP00000","MDRP00001","MDRP00010","MDRP00011","MDRP00100","MDRP00101","MDRP00110","MDRP00111","MDRP01000","MDRP01001","MDRP01010","MDRP01011","MDRP01100","MDRP01101","MDRP01110","MDRP01111","MDRP10000","MDRP10001","MDRP10010","MDRP10011","MDRP10100","MDRP10101","MDRP10110","MDRP10111","MDRP11000","MDRP11001","MDRP11010","MDRP11011","MDRP11100","MDRP11101","MDRP11110","MDRP11111","MIAP0","MIAP1","MIN","MINDEX","MIRP00000","MIRP00001","MIRP00010","MIRP00011","MIRP00100","MIRP00101","MIRP00110","MIRP00111","MIRP01000","MIRP01001","MIRP01010","MIRP01011","MIRP01100","MIRP01101","MIRP01110","MIRP01111","MIRP10000","MIRP10001","MIRP10010","MIRP10011","MIRP10100","MIRP10101","MIRP10110","MIRP10111","MIRP11000","MIRP11001","MIRP11010","MIRP11011","MIRP11100","MIRP11101","MIRP11110","MIRP11111","MPPEM","MPS","MSIRP0","MSIRP1","MUL","NEG","NEQ","NOT","NPUSHB","NPUSHW","NROUND00","NROUND01","NROUND10","NROUND11","ODD","OR","Opcode","POP","PUSHB000","PUSHB001","PUSHB010","PUSHB011","PUSHB100","PUSHB101","PUSHB110","PUSHB111","PUSHW000","PUSHW001","PUSHW010","PUSHW011","PUSHW100","PUSHW101","PUSHW110","PUSHW111","RCVT","RDTG","ROFF","ROLL","ROUND00","ROUND01","ROUND10","ROUND11","RS","RTDG","RTG","RTHG","RUTG","S45ROUND","SANGW","SCANCTRL","SCANTYPE","SCFS","SCVTCI","SDB","SDPVTL0","SDPVTL1","SDS","SFVFS","SFVTCA0","SFVTCA1","SFVTL0","SFVTL1","SFVTPV","SHC0","SHC1","SHP0","SHP1","SHPIX","SHZ0","SHZ1","SLOOP","SMD","SPVFS","SPVTCA0","SPVTCA1","SPVTL0","SPVTL1","SROUND","SRP0","SRP1","SRP2","SSW","SSWCI","SUB","SVTCA0","SVTCA1","SWAP","SZP0","SZP1","SZP2","SZPS","UTP","WCVTF","WCVTP","WS","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","bytecode","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","decode","decode_all","default","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_byte","hash","inline_operands","into","into","into","into","into","is_empty","is_push","len","name","new","opcode","partial_cmp","pc","pc","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","values","ANY_DEVICE_OR_VARIDX","AnchorFormat1","AnchorFormat2","AnchorFormat3","AnchorTable","BaseArray","BaseRecord","ChainContextual","ChainContextual","ChainContextual","Class1Record","Class2Record","ClassDef","ComponentRecord","Contextual","Contextual","Contextual","CoverageTable","Cursive","Cursive","Cursive","CursivePosFormat1","Device","DeviceOrVariationIndex","EntryExitRecord","Extension","ExtensionPosFormat1","ExtensionSubtable","FeatureList","FeatureVariations","Format1","Format1","Format1","Format1","Format1","Format2","Format2","Format2","Format2","Format2","Format3","Format3","Format3","Gpos","LigatureArray","LigatureAttach","Lookup","Mark2Array","Mark2Record","MarkArray","MarkBasePosFormat1","MarkLigPosFormat1","MarkMarkPosFormat1","MarkRecord","MarkToBase","MarkToBase","MarkToBase","MarkToLig","MarkToLig","MarkToLig","MarkToMark","MarkToMark","MarkToMark","Pair","Pair","Pair","PairPos","PairPosFormat1","PairPosFormat2","PairSet","PairValueRecord","PositionChainContext","PositionLookup","PositionLookupList","PositionSequenceContext","PositionSubtables","ScriptList","Single","Single","Single","SinglePos","SinglePosFormat1","SinglePosFormat2","ValueFormat","ValueRecord","X_ADVANCE","X_ADVANCE_DEVICE","X_PLACEMENT","X_PLACEMENT_DEVICE","Y_ADVANCE","Y_ADVANCE_DEVICE","Y_PLACEMENT","Y_PLACEMENT_DEVICE","all","anchor_format","anchor_format","anchor_format","anchor_format","anchor_point","base_anchor_offsets","base_anchor_offsets","base_anchors","base_array","base_array_offset","base_count","base_coverage","base_coverage_offset","base_records","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","class1_count","class1_records","class2_count","class2_records","class2_records","class_def1","class_def1_offset","class_def2","class_def2_offset","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","component_count","component_records","compute_size","compute_size","compute_size","compute_size","compute_size","compute_size","compute_size","contains","coverage","coverage","coverage","coverage","coverage","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","default","default","difference","empty","entry_anchor","entry_anchor_offset","entry_anchor_offset","entry_exit_count","entry_exit_record","eq","eq","exit_anchor","exit_anchor_offset","exit_anchor_offset","extension","extension","extension_lookup_type","extension_offset","feature_list","feature_list_offset","feature_variations","feature_variations_offset","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_bits","from_bits_truncate","from_raw","hash","insert","intersection","intersects","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","is_empty","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","ligature_anchor_offsets","ligature_anchor_offsets","ligature_anchors","ligature_array","ligature_array_offset","ligature_attach_offsets","ligature_attaches","ligature_count","ligature_coverage","ligature_coverage_offset","lookup_flag","lookup_list","lookup_list_offset","lookup_type","mark1_array","mark1_array_offset","mark1_coverage","mark1_coverage_offset","mark2_anchor_offsets","mark2_anchor_offsets","mark2_anchors","mark2_array","mark2_array_offset","mark2_count","mark2_coverage","mark2_coverage_offset","mark2_records","mark_anchor","mark_anchor_offset","mark_anchor_offset","mark_array","mark_array","mark_array_offset","mark_array_offset","mark_class","mark_class","mark_class_count","mark_class_count","mark_class_count","mark_count","mark_coverage","mark_coverage","mark_coverage_offset","mark_coverage_offset","mark_filtering_set","mark_records","not","pair_set_count","pair_set_offsets","pair_sets","pair_value_count","pair_value_records","partial_cmp","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","pos_format","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","record_byte_len","remove","script_list","script_list_offset","second_glyph","second_glyph","sub","sub_assign","subtables","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","toggle","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","union","value_count","value_format","value_format","value_format","value_format1","value_format1","value_format1","value_format2","value_format2","value_format2","value_record","value_record1","value_record1","value_record1","value_record1","value_record2","value_record2","value_record2","value_record2","value_records","version","x_advance","x_advance","x_advance_device","x_advance_device","x_coordinate","x_coordinate","x_coordinate","x_coordinate","x_device","x_device","x_device_offset","x_placement","x_placement","x_placement_device","x_placement_device","y_advance","y_advance","y_advance_device","y_advance_device","y_coordinate","y_coordinate","y_coordinate","y_coordinate","y_device","y_device","y_device_offset","y_placement","y_placement","y_placement_device","y_placement_device","Alternate","Alternate","Alternate","AlternateSet","AlternateSubstFormat1","ChainContextual","ChainContextual","ChainContextual","ChainedSequenceContext","ClassDef","Contextual","Contextual","Contextual","CoverageTable","Device","Extension","ExtensionSubstFormat1","ExtensionSubtable","FeatureList","FeatureVariations","Format1","Format1","Format1","Format2","Format2","Format2","Format3","Format3","Gsub","Ligature","Ligature","Ligature","Ligature","LigatureSet","LigatureSubstFormat1","Lookup","LookupList","Multiple","Multiple","Multiple","MultipleSubstFormat1","Reverse","Reverse","Reverse","ReverseChainSingleSubstFormat1","ScriptList","Sequence","SequenceContext","Single","Single","Single","SingleSubst","SingleSubstFormat1","SingleSubstFormat2","SubstitutionChainContext","SubstitutionLookup","SubstitutionLookupList","SubstitutionSequenceContext","SubstitutionSubtables","alternate_glyph_ids","alternate_set_count","alternate_set_offsets","alternate_sets","backtrack_coverage_offsets","backtrack_coverages","backtrack_glyph_count","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","component_count","component_glyph_ids","coverage","coverage","coverage","coverage","coverage","coverage","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offset","delta_glyph_id","extension","extension","extension_lookup_type","extension_offset","feature_list","feature_list_offset","feature_variations","feature_variations_offset","from","from","from","from","glyph_count","glyph_count","glyph_count","glyph_count","into","into","into","into","ligature_count","ligature_glyph","ligature_offsets","ligature_set_count","ligature_set_offsets","ligature_sets","ligatures","lookahead_coverage_offsets","lookahead_coverages","lookahead_glyph_count","lookup_flag","lookup_list","lookup_list_offset","lookup_type","mark_filtering_set","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read_with_args","read_with_args","read_with_args","script_list","script_list_offset","sequence_count","sequence_offsets","sequences","subst_format","subst_format","subst_format","subst_format","subst_format","subst_format","subst_format","subst_format","substitute_glyph_ids","substitute_glyph_ids","substitute_glyph_ids","subtables","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","version","GlyphDelta","GlyphVariationData","GlyphVariationDataHeader","Gvar","GvarFlags","LONG_OFFSETS","SharedTuples","U16Or32","all","apply_scalar","axis_count","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","compute_size","contains","default","difference","empty","eq","eq","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from_bits","from_bits_truncate","from_raw","get","glyph_count","glyph_variation_data","glyph_variation_data_array_offset","glyph_variation_data_offsets","hash","insert","intersection","intersects","into","into","into","is_empty","is_point","is_valid_bit_pattern","new","not","partial_cmp","position","read","read","read","read_with_args","read_with_args","remove","serialized_data","serialized_data_offset","shared_tuple_count","shared_tuples","shared_tuples_offset","sub","sub_assign","to_owned","to_owned","to_owned","to_raw","toggle","try_from","try_from","try_from","try_into","try_into","try_into","tuple_variation_count","tuple_variation_headers","tuples","type_id","type_id","type_id","union","version","x_delta","y_delta","BOLD","CONDENSED","EXTENDED","Head","ITALIC","MacStyle","OUTLINE","SHADOW","UNDERLINE","all","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow_mut","checksum_adjustment","clone","clone_into","cmp","contains","created","default","difference","empty","eq","flags","fmt","fmt","fmt","fmt","fmt","font_direction_hint","font_revision","from","from_bits","from_bits_truncate","from_raw","glyph_data_format","hash","index_to_loc_format","insert","intersection","intersects","into","is_empty","is_valid_bit_pattern","lowest_rec_ppem","mac_style","magic_number","modified","not","partial_cmp","read","remove","sub","sub_assign","to_owned","to_raw","toggle","try_from","try_into","type_id","union","units_per_em","version","x_max","x_min","y_max","y_min","Hhea","advance_width_max","ascender","caret_offset","caret_slope_rise","caret_slope_run","descender","line_gap","metric_data_format","min_left_side_bearing","min_right_side_bearing","number_of_long_metrics","read","version","x_max_extent","Hmtx","LongMetric","advance","advance","advance","borrow","borrow_mut","clone","clone_into","cmp","eq","fmt","from","h_metrics","hash","into","is_valid_bit_pattern","left_side_bearings","partial_cmp","read","read_with_args","side_bearing","side_bearing","side_bearing","to_owned","try_from","try_into","type_id","Hvar","advance_width_delta","advance_width_mapping","advance_width_mapping_offset","item_variation_store","item_variation_store_offset","lsb_delta","lsb_mapping","lsb_mapping_offset","read","rsb_delta","rsb_mapping","rsb_mapping_offset","version","ChainedClassSequenceRule","ChainedClassSequenceRuleSet","ChainedSequenceContext","ChainedSequenceContextFormat1","ChainedSequenceContextFormat2","ChainedSequenceContextFormat3","ChainedSequenceRule","ChainedSequenceRuleSet","CharacterVariant","CharacterVariantParams","ClassDef","ClassDefFormat1","ClassDefFormat2","ClassRangeRecord","ClassSequenceRule","ClassSequenceRuleSet","ConditionFormat1","ConditionSet","CoverageFormat1","CoverageFormat2","CoverageTable","DeltaFormat","Device","Device","DeviceOrVariationIndex","Extension","ExtensionLookup","Feature","FeatureList","FeatureParams","FeatureRecord","FeatureTableSubstitution","FeatureTableSubstitutionRecord","FeatureVariationRecord","FeatureVariations","Format1","Format1","Format1","Format1","Format2","Format2","Format2","Format2","Format3","Format3","IGNORE_BASE_GLYPHS","IGNORE_LIGATURES","IGNORE_MARKS","LangSys","LangSysRecord","Local2BitDeltas","Local4BitDeltas","Local8BitDeltas","Lookup","LookupFlag","LookupList","RIGHT_TO_LEFT","RangeRecord","Script","ScriptList","ScriptRecord","SequenceContext","SequenceContextFormat1","SequenceContextFormat2","SequenceContextFormat3","SequenceLookupRecord","SequenceRule","SequenceRuleSet","Size","SizeParams","StylisticSet","StylisticSetParams","Subtable","Subtables","USE_MARK_FILTERING_SET","VariationIndex","VariationIndex","VariationIndex","alternate_feature","alternate_feature_offset","alternate_feature_offset","axis_index","backtrack_class_def","backtrack_class_def_offset","backtrack_coverage_offsets","backtrack_coverages","backtrack_glyph_count","backtrack_glyph_count","backtrack_glyph_count","backtrack_sequence","backtrack_sequence","bitor","bitor_assign","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chained_class_seq_rule_count","chained_class_seq_rule_offsets","chained_class_seq_rule_set_count","chained_class_seq_rule_set_offsets","chained_class_seq_rule_sets","chained_class_seq_rules","chained_seq_rule_count","chained_seq_rule_offsets","chained_seq_rule_set_count","chained_seq_rule_set_offsets","chained_seq_rule_sets","chained_seq_rules","char_count","character","class","class","class_def","class_def_offset","class_format","class_format","class_format","class_range_count","class_range_records","class_seq_rule_count","class_seq_rule_offsets","class_seq_rule_set_count","class_seq_rule_set_offsets","class_seq_rule_sets","class_seq_rules","class_value_array","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","condition_count","condition_offsets","condition_set","condition_set_offset","condition_set_offset","conditions","coverage","coverage","coverage","coverage","coverage_format","coverage_format","coverage_format","coverage_offset","coverage_offset","coverage_offset","coverage_offset","coverage_offsets","coverages","default","default","default_lang_sys","default_lang_sys_offset","delta_format","delta_format","delta_set_inner_index","delta_set_outer_index","delta_value","design_size","empty","end_glyph_id","end_glyph_id","end_glyph_id","end_glyph_id","end_size","eq","eq","eq","eq","eq","extension","feat_ui_label_name_id","feat_ui_tooltip_text_name_id","feature","feature_count","feature_index","feature_index","feature_index_count","feature_indices","feature_offset","feature_offset","feature_params","feature_params_offset","feature_records","feature_table_substitution","feature_table_substitution_offset","feature_table_substitution_offset","feature_tag","feature_tag","feature_variation_record_count","feature_variation_records","filter_range_max_value","filter_range_min_value","first_param_ui_label_name_id","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","format","format","format","format","format","format","format","format","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_bits_truncate","from_raw","from_raw","get","get","get","get","get","get","get","get_subtable","glyph_array","glyph_count","glyph_count","glyph_count","glyph_count","glyph_count","hash","hash","hash","hash","hash","identifier","ignore_base_glyphs","ignore_ligatures","ignore_marks","input_class_def","input_class_def_offset","input_coverage_offsets","input_coverages","input_glyph_count","input_glyph_count","input_glyph_count","input_sequence","input_sequence","input_sequence","input_sequence","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","is_empty","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","iter","iter","iter","iter","iter","iter","lang_sys","lang_sys_count","lang_sys_offset","lang_sys_offset","lang_sys_records","lang_sys_tag","lang_sys_tag","len","lookahead_class_def","lookahead_class_def_offset","lookahead_coverage_offsets","lookahead_coverages","lookahead_glyph_count","lookahead_glyph_count","lookahead_glyph_count","lookahead_sequence","lookahead_sequence","lookup_count","lookup_flag","lookup_index_count","lookup_list_index","lookup_list_index","lookup_list_indices","lookup_offsets","lookup_type","lookups","mark_attachment_type_mask","mark_filtering_set","name_entry","new","num_named_parameters","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","range_count","range_end","range_records","range_start","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","read_with_args","required_feature_index","right_to_left","sample_text_name_id","script","script_count","script_offset","script_offset","script_records","script_tag","script_tag","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_count","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_lookup_records","seq_rule_count","seq_rule_offsets","seq_rule_set_count","seq_rule_set_offsets","seq_rule_sets","seq_rules","sequence_index","sequence_index","set_ignore_base_glyphs","set_ignore_ligatures","set_ignore_marks","set_mark_attachment_type","set_right_to_left","set_use_mark_filtering_set","start_coverage_index","start_coverage_index","start_glyph_id","start_glyph_id","start_glyph_id","start_glyph_id","start_glyph_id","start_size","sub_table_count","substitution_count","substitutions","subtable_offsets","subtables","to_bits","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","to_raw","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","ui_name_id","use_mark_filtering_set","version","version","version","Loca","Long","Short","borrow","borrow_mut","clone","clone_into","from","get_glyf","get_raw","into","is_empty","len","read","read_with_args","to_owned","try_from","try_into","type_id","Maxp","max_component_depth","max_component_elements","max_composite_contours","max_composite_points","max_contours","max_function_defs","max_instruction_defs","max_points","max_size_of_instructions","max_stack_elements","max_storage","max_twilight_points","max_zones","num_glyphs","read","version","Mvar","ValueRecord","borrow","borrow_mut","clone","clone_into","cmp","delta_set_inner_index","delta_set_inner_index","delta_set_outer_index","delta_set_outer_index","eq","fmt","from","hash","into","is_valid_bit_pattern","item_variation_store","item_variation_store_offset","metric_delta","partial_cmp","read","tags","to_owned","try_from","try_into","type_id","value_record_count","value_record_size","value_records","value_tag","value_tag","version","CPHT","GSP0","GSP1","GSP2","GSP3","GSP4","GSP5","GSP6","GSP7","GSP8","GSP9","HASC","HCLA","HCLD","HCOF","HCRN","HCRS","HDSC","HLGP","SBXO","SBXS","SBYO","SBYS","SPXO","SPXS","SPYO","SPYS","STRO","STRS","UNDO","UNDS","VASC","VCOF","VCRN","VCRS","VDSC","VLGP","XHGT","COMPATIBLE_FULL_NAME","COPYRIGHT_NOTICE","CharIter","DARK_BACKGROUND_PALETTE","DESCRIPTION","DESIGNER","DESIGNER_URL","Encoding","FAMILY_NAME","FULL_NAME","LICENSE_DESCRIPTION","LICENSE_URL","LIGHT_BACKGROUND_PALETTE","LangTagRecord","MANUFACTURER","MacRoman","MacRomanMapping","Name","NameId","NameRecord","NameString","POSTSCRIPT_CID_NAME","POSTSCRIPT_NAME","SAMPLE_TEXT","SUBFAMILY_NAME","TRADEMARK","TYPOGRAPHIC_FAMILY_NAME","TYPOGRAPHIC_SUBFAMILY_NAME","UNIQUE_ID","Unknown","Utf16Be","VARIATIONS_POSTSCRIPT_NAME_PREFIX","VENDOR_URL","VERSION_STRING","WWS_FAMILY_NAME","WWS_SUBFAMILY_NAME","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chars","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","count","decode","default","encode","encoding_id","encoding_id","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from_raw","hash","into","into","into","into","into","into","into","into_iter","into_iter","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","lang_tag","lang_tag_count","lang_tag_offset","lang_tag_offset","lang_tag_record","language_id","language_id","length","length","length","length","name_id","name_id","name_record","new","new","next","partial_cmp","platform_id","platform_id","predefined","read","storage_offset","string","string_data","string_offset","string_offset","to_be_bytes","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","to_string","to_string","to_u16","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","version","BOLD","ITALIC","NEGATIVE","OBLIQUE","OUTLINED","Os2","REGULAR","STRIKEOUT","SelectionFlags","UNDERSCORE","USE_TYPO_METRICS","WWS","ach_vend_id","all","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow_mut","clone","clone_into","cmp","contains","default","difference","empty","eq","fmt","fmt","fmt","fmt","fmt","from","from_bits","from_bits_truncate","from_raw","fs_selection","fs_type","hash","insert","intersection","intersects","into","is_empty","is_valid_bit_pattern","not","panose_10","partial_cmp","read","remove","s_cap_height","s_family_class","s_typo_ascender","s_typo_descender","s_typo_line_gap","sub","sub_assign","sx_height","to_owned","to_raw","toggle","try_from","try_into","type_id","ul_code_page_range_1","ul_code_page_range_2","ul_unicode_range_1","ul_unicode_range_2","ul_unicode_range_3","ul_unicode_range_4","union","us_break_char","us_default_char","us_first_char_index","us_last_char_index","us_lower_optical_point_size","us_max_context","us_upper_optical_point_size","us_weight_class","us_width_class","us_win_ascent","us_win_descent","version","x_avg_char_width","y_strikeout_position","y_strikeout_size","y_subscript_x_offset","y_subscript_x_size","y_subscript_y_offset","y_subscript_y_size","y_superscript_x_offset","y_superscript_x_size","y_superscript_y_offset","y_superscript_y_size","DEFAULT_GLYPH_NAMES","PString","Post","as_str","borrow","borrow_mut","clone","clone_into","deref","eq","eq","fmt","from","glyph_name","glyph_name_index","into","is_fixed_pitch","italic_angle","max_mem_type1","max_mem_type42","min_mem_type1","min_mem_type42","num_glyphs","num_names","read","read","read_with_args","string_data","to_owned","try_from","try_into","type_id","underline_position","underline_thickness","version","BlendState","CharstringNestingDepthLimitExceeded","Error","ExpectedI32StackEntry","FdSelect","FdSelectFormat0","FdSelectFormat3","FdSelectFormat4","FdSelectRange3","FdSelectRange4","Fixed","Format0","Format1","Format2","Format3","Format4","I32","Index","Index1","Index2","InvalidCharstringOperator","InvalidDictOperator","InvalidIndexOffsetSize","InvalidNumber","InvalidStackAccess","InvalidVariationStoreIndex","Latin1String","MissingBlendState","MissingCharstrings","MissingPrivateDict","MissingSubroutines","Number","Read","STANDARD_STRINGS","Stack","StackOverflow","StackUnderflow","StringId","ZeroOffsetInIndex","apply_blend","apply_delta_prefix_sum","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chars","charstring","clear","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","count","count","count","data","data","default","dict","eq","eq","eq","eq","eq","eq","fd","fd","fd","fd","fds","first","first","first","first","fixed_array","fixed_values","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","font_index","format","format","format","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from","get","get","get","get_fixed","get_i32","get_offset","get_offset","get_offset","hash","hash","hash","into","into","into","into","into","into","into","into","into","into","is_empty","is_valid_bit_pattern","is_valid_bit_pattern","len","len_is_odd","n_ranges","n_ranges","new","new","new","new","new","number_values","off_size","off_size","offsets","offsets","partial_cmp","partial_cmp","partial_cmp","pop_fixed","pop_i32","push","ranges","ranges","read","read","read","read","read","read","read_with_args","region_count","reverse","scalars","sentinel","sentinel","set_store_index","size_in_bytes","size_in_bytes","size_in_bytes","standard_string","subr_bias","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_u16","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","verify_at_least_len","verify_exact_len","CommandSink","NESTING_DEPTH_LIMIT","PenSink","borrow","borrow_mut","close","close","counter_mask","curve_to","curve_to","evaluate","from","hint_mask","hstem","into","line_to","line_to","move_to","move_to","new","try_from","try_into","type_id","vstem","BaseFontBlend","BaseFontBlend","BaseFontName","BaseFontName","Blend","BlueFuzz","BlueFuzz","BlueScale","BlueScale","BlueShift","BlueShift","BlueValues","BlueValues","Blues","Charset","Charset","CharstringType","CharstringType","CharstringsOffset","CharstringsOffset","CidCount","CidCount","CidFontRevision","CidFontRevision","CidFontType","CidFontType","CidFontVersion","CidFontVersion","Copyright","Copyright","DefaultWidthX","DefaultWidthX","Encoding","Encoding","Entry","ExpansionFactor","ExpansionFactor","FamilyBlues","FamilyBlues","FamilyName","FamilyName","FamilyOtherBlues","FamilyOtherBlues","FdArrayOffset","FdArrayOffset","FdSelectOffset","FdSelectOffset","FontBbox","FontBbox","FontMatrix","FontMatrix","FontName","FontName","ForceBold","ForceBold","FullName","FullName","InitialRandomSeed","InitialRandomSeed","IsFixedPitch","IsFixedPitch","ItalicAngle","ItalicAngle","LanguageGroup","LanguageGroup","NominalWidthX","NominalWidthX","Notice","Notice","Operand","Operator","Operator","OtherBlues","OtherBlues","PaintType","PaintType","PostScript","PostScript","PrivateDictRange","PrivateDictRange","Ros","Ros","StdHw","StdHw","StdVw","StdVw","StemSnapH","StemSnapH","StemSnapV","StemSnapV","StemSnaps","StrokeWidth","StrokeWidth","SubrsOffset","SubrsOffset","SyntheticBase","SyntheticBase","Token","UidBase","UidBase","UnderlinePosition","UnderlinePosition","UnderlineThickness","UnderlineThickness","UniqueId","UniqueId","VariationStoreIndex","VariationStoreIndex","VariationStoreOffset","VariationStoreOffset","Version","Version","Weight","Weight","Xuid","Xuid","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","entries","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","hash","into","into","into","into","into","new","to_owned","to_owned","to_owned","to_owned","to_owned","tokens","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","values","values","ordering","registry","supplement","ALWAYS_SET","DRAW_OUTLINES","GlyphData","HeaderFlags","Sbix","Strike","all","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow_mut","clone","clone_into","cmp","contains","data","default","difference","empty","eq","flags","fmt","fmt","fmt","fmt","fmt","from","from_bits","from_bits_truncate","from_raw","glyph_data","glyph_data_offsets","graphic_type","hash","insert","intersection","intersects","into","is_empty","is_valid_bit_pattern","not","num_strikes","origin_offset_x","origin_offset_y","partial_cmp","ppem","ppi","read","read","read","read_with_args","read_with_args","remove","strike_offsets","strikes","sub","sub_assign","to_owned","to_raw","toggle","try_from","try_into","type_id","union","version","AxisRecord","AxisValue","AxisValueArray","AxisValueFormat1","AxisValueFormat2","AxisValueFormat3","AxisValueFormat4","AxisValueRecord","AxisValueTableFlags","ELIDABLE_AXIS_VALUE_NAME","Format1","Format2","Format3","Format4","OLDER_SIBLING_FONT_ATTRIBUTE","Stat","all","axis_count","axis_index","axis_index","axis_index","axis_index","axis_index","axis_name_id","axis_name_id","axis_ordering","axis_ordering","axis_tag","axis_tag","axis_value_count","axis_value_offsets","axis_values","axis_values","bitand","bitand_assign","bitor","bitor_assign","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","contains","default","design_axes","design_axes_offset","design_axis_count","design_axis_size","difference","elided_fallback_name_id","empty","eq","eq","eq","flags","flags","flags","flags","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","format","format","format","format","from","from","from","from","from_bits","from_bits_truncate","from_raw","hash","hash","hash","insert","intersection","intersects","into","into","into","into","is_empty","is_valid_bit_pattern","is_valid_bit_pattern","is_valid_bit_pattern","linked_value","nominal_value","not","offset_to_axis_value_offsets","offset_to_axis_values","partial_cmp","partial_cmp","partial_cmp","range_max_value","range_min_value","read","read","read","read","read","read","read","read_with_args","read_with_args","remove","sub","sub_assign","to_owned","to_owned","to_owned","to_owned","to_raw","toggle","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","union","value","value","value","value","value_name_id","value_name_id","value_name_id","value_name_id","value_name_id","version","COUNT_MASK","DeltaRunIter","DeltaSetIndex","DeltaSetIndexMap","DeltaSetIndexMapFormat0","DeltaSetIndexMapFormat1","EMBEDDED_PEAK_TUPLE","EntryFormat","FloatItemDelta","FloatItemDeltaTarget","Format0","Format1","INNER_INDEX_BIT_COUNT_MASK","INTERMEDIATE_REGION","ItemVariationData","ItemVariationStore","MAP_ENTRY_SIZE_MASK","PRIVATE_POINT_NUMBERS","PackedDeltas","PackedPointNumbers","PackedPointNumbersIter","RegionAxisCoordinates","SHARED_POINT_NUMBERS","TUPLE_INDEX_MASK","Tuple","TupleDelta","TupleDeltaIter","TupleIndex","TupleVariation","TupleVariationCount","TupleVariationData","TupleVariationHeader","TupleVariationHeaderIter","TupleVariationIter","VariationRegion","VariationRegionList","ZERO","active_tuples_at","all","apply_float_delta","axis_count","bit_count","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","cmp","compute_delta","compute_float_delta","compute_scalar","compute_scalar","compute_scalar_f32","compute_scalar_f32","compute_size","compute_size","contains","count","count","cur","default","default","default","default","default","default","delta_set","delta_sets","deltas","difference","embedded_peak_tuple","empty","end_coord","end_coord","entry_format","entry_format","entry_format","entry_size","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","format","format","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_bits","from_bits","from_bits","from_bits_truncate","from_raw","from_raw","from_raw","get","get","has_deltas_for_all_points","hash","hash","hash","hash","hash","hash","hash","inner","insert","intermediate_end_tuple","intermediate_region","intermediate_start_tuple","intersection","intersects","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_iter","is_empty","is_empty","is_point","is_valid_bit_pattern","is_valid_bit_pattern","item_count","item_variation_data","item_variation_data_count","item_variation_data_offsets","iter","len","map_count","map_count","map_data","map_data","map_data","new","next","next","next","next","next","not","outer","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","peak","peak_coord","peak_coord","peak_tuple","point_numbers","private_point_numbers","read","read","read","read","read","read","read","read","read","read_with_args","read_with_args","read_with_args","read_with_args","region_axes","region_axes","region_count","region_index_count","region_indexes","remove","shared_point_numbers","size_hint","split_off_front","start_coord","start_coord","sub","sub_assign","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_raw","to_raw","to_raw","toggle","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","tuple_index","tuple_records_index","tuples","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","union","values","values","variation_data_size","variation_region_list","variation_region_list_offset","variation_regions","word_delta_count","Vhea","advance_height_max","ascender","caret_offset","caret_slope_rise","caret_slope_run","descender","line_gap","metric_data_format","min_bottom_side_bearing","min_top_side_bearing","number_of_long_ver_metrics","read","version","y_max_extent","LongMetric","Vmtx","advance","read","read_with_args","side_bearing","top_side_bearings","v_metrics","Vvar","advance_height_delta","advance_height_mapping","advance_height_mapping_offset","bsb_delta","bsb_mapping","bsb_mapping_offset","item_variation_store","item_variation_store_offset","read","tsb_delta","tsb_mapping","tsb_mapping_offset","v_org_delta","v_org_mapping","v_org_mapping_offset","version"],"q":[[0,"read_fonts"],[1433,"read_fonts::array"],[1463,"read_fonts::tables"],[1501,"read_fonts::tables::avar"],[1550,"read_fonts::tables::base"],[1686,"read_fonts::tables::bitmap"],[2056,"read_fonts::tables::cbdt"],[2061,"read_fonts::tables::cblc"],[2067,"read_fonts::tables::cff"],[2096,"read_fonts::tables::cff2"],[2122,"read_fonts::tables::cmap"],[2468,"read_fonts::tables::colr"],[3116,"read_fonts::tables::cpal"],[3205,"read_fonts::tables::cvar"],[3233,"read_fonts::tables::ebdt"],[3238,"read_fonts::tables::eblc"],[3244,"read_fonts::tables::fvar"],[3309,"read_fonts::tables::gasp"],[3386,"read_fonts::tables::gdef"],[3496,"read_fonts::tables::glyf"],[3817,"read_fonts::tables::glyf::Anchor"],[3821,"read_fonts::tables::glyf::ToPathError"],[3823,"read_fonts::tables::glyf::bytecode"],[4163,"read_fonts::tables::gpos"],[4683,"read_fonts::tables::gsub"],[4859,"read_fonts::tables::gvar"],[4964,"read_fonts::tables::head"],[5037,"read_fonts::tables::hhea"],[5052,"read_fonts::tables::hmtx"],[5080,"read_fonts::tables::hvar"],[5094,"read_fonts::tables::layout"],[5665,"read_fonts::tables::loca"],[5684,"read_fonts::tables::maxp"],[5701,"read_fonts::tables::mvar"],[5734,"read_fonts::tables::mvar::tags"],[5772,"read_fonts::tables::name"],[5933,"read_fonts::tables::os2"],[6031,"read_fonts::tables::post"],[6066,"read_fonts::tables::postscript"],[6309,"read_fonts::tables::postscript::charstring"],[6333,"read_fonts::tables::postscript::dict"],[6519,"read_fonts::tables::postscript::dict::Entry"],[6522,"read_fonts::tables::sbix"],[6592,"read_fonts::tables::stat"],[6752,"read_fonts::tables::variations"],[7149,"read_fonts::tables::vhea"],[7164,"read_fonts::tables::vmtx"],[7172,"read_fonts::tables::vvar"],[7189,"font_types::tag"],[7190,"font_types::glyph_id"],[7191,"core::option"],[7192,"font_types::fixed"],[7193,"font_types::fixed"],[7194,"font_types::offset"],[7195,"font_types::offset"],[7196,"font_types::raw"],[7197,"font_types::offset"],[7198,"core::clone"],[7199,"font_types::raw"],[7200,"core::iter::traits::iterator"],[7201,"font_types::longdatetime"],[7202,"core::fmt"],[7203,"core::fmt"],[7204,"core::convert"],[7205,"core::ops::range"],[7206,"bytemuck::anybitpattern"],[7207,"font_types::raw"],[7208,"core::ops::range"],[7209,"core::any"],[7210,"font_types::version"],[7211,"font_types::version"],[7212,"core::fmt"]],"d":["","An array of nullable offsets that can be resolved on …","An array of offsets that can be resolved on access.","A collection of fonts.","Reference to the content of a font collection file.","A type that can compute its size at runtime, based on some …","Empty data, useful for some tests and examples","Reference to the content of a font or font collection file.","A single font.","A reference to raw binary font data.","A type that can be read from raw table data.","A trait for types that require external data in order to …","Reference to an in-memory font.","","","","","","","","","Any offset type.","","A trait for a type that needs additional arguments to be …","An error that occurs when reading font data","A helper trait providing a ‘resolve’ method for …","A helper trait providing a ‘resolve’ method for offset …","The type of the first (length) field of the item.","The table’s tag.","TTC Header","The OpenType Table Directory","","An interface for accessing tables from a font (or …","Record for a table in a font.","Typed access to raw table data.","A table that has an associated tag.","","A trait for types that have variable length.","Padding bytes before the start of the Name INDEX.","Padding bytes before the start of the Top DICT.","Font Vendor Identification.","Add to indexSubTableArrayOffset to get offset from …","Returns the advance width for the given glyph identifier.","Returns the advance height for the given glyph identifier.","Returns the advance height delta for the specified glyph …","Attempt to resolve advance_height_mapping_offset.","Offset in bytes from the start of this table to the …","Maximum advance height value in ‘vmtx’ table.","Returns the advance width delta for the specified glyph …","Attempt to resolve advance_width_mapping_offset.","Offset in bytes from the start of this table to the …","Maximum advance width value in ‘hmtx’ table.","Alpha value. For variation, use varIndexBase + 0.","Alpha value.","Array of alternate glyph IDs, in arbitrary order","Number of AlternateSet tables","Array of offsets to AlternateSet tables. Offsets are from …","A dynamically resolving wrapper for alternate_set_offsets.","Format identifier, = 1","Format identifier, = 2","Format identifier, = 3","Index to glyph contour point","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Custom array types","Return the data as a byte slice","","Typographic ascent.","Typographic ascent.","Attempt to resolve attach_list_offset.","Offset to attachment point list table, from beginning of …","Array of offsets to AttachPoint tables-from beginning of …","A dynamically resolving wrapper for attach_point_offsets.","","","Variation axis record array.","Returns the array of variation axis records.","The total number of axes contributing to this axis-values …","The number of variation axes for this font. This must be …","The number of variation axes for this font. This must be …","The number of variation axes for this font. This must be …","The number of variation axes in the font (the number of …","Zero-base index into the axis record array identifying the …","Zero-base index into the axis record array identifying the …","Zero-base index into the axis record array identifying the …","Index (zero-based) for the variation axis within the ‘…","Attempt to resolve axis_instance_arrays_offset.","Offset in bytes from the beginning of the table to the …","The segment maps array — one segment map for each axis, …","The size in bytes of each VariationAxisRecord — set to …","The number of axis value tables.","Array of offsets to axis value tables, in bytes from the …","A dynamically resolving wrapper for axis_value_offsets.","Array of AxisValue records that provide the combination of …","Attempt to resolve backdrop_paint_offset.","Offset to a backdrop Paint table.","Attempt to resolve backtrack_class_def_offset.","Offset to ClassDef table containing backtrack sequence …","Array of offsets to coverage tables in backtrack sequence, …","Array of offsets to coverage tables for the backtrack …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for …","Number of glyphs in the backtrack sequence.","Number of glyphs in the backtrack sequence","Number of glyphs in the backtrack sequence","Number of glyphs in the backtrack sequence","Array of backtrack-sequence classes","Array of backtrack glyph IDs","Attempt to resolve base_array_offset.","Offset to BaseArray table, from beginning of MarkBasePos …","Number of BaseCoord tables defined — should equal …","Format identifier — format = 2","Format identifier — format = 1","Format identifier — format = 3","Array of offsets to BaseCoord tables, from beginning of …","Index of contour point on the reference glyph","A dynamically resolving wrapper for base_coord_offsets.","Number of BaseRecords","Attempt to resolve base_coverage_offset.","Offset to baseCoverage table, from beginning of MarkBasePos","Attempt to resolve base_glyph_list_offset.","Offset to BaseGlyphList table.","","Attempt to resolve base_glyph_records_offset.","Offset to baseGlyphRecords array (may be NULL).","Number of BaseLangSysRecords defined — may be zero (0)","Array of BaseLangSysRecords, in alphabetical order by …","Array of BaseRecords, in order of baseCoverage Index.","Number of BaseScriptRecords defined","Attempt to resolve base_script_list_offset.","Offset to BaseScriptList table, from beginning of Axis …","Array of BaseScriptRecords, in alphabetical order by …","Number of baseline identification tags in this text …","Attempt to resolve base_tag_list_offset.","Offset to BaseTagList table, from beginning of Axis table …","Attempt to resolve base_values_offset.","Offset to BaseValues table, from beginning of BaseScript …","Array of 4-byte baseline identification tags — must be in","All glyphs have the same metrics; glyph data may be …","All glyphs have the same metrics.","BitmapSize records array.","BitmapSize records array.","","","","","","","","","","","","","","","","","","","Returns the bottom side bearing delta for the specified …","Attempt to resolve bsb_mapping_offset.","Offset in bytes from the start of this table to the …","Number of CaretValue tables for this ligature (components …","The amount by which a slanted highlight on a glyph needs …","The amount by which a slanted highlight on a glyph needs …","Used to calculate the slope of the cursor (rise/run); 1 for","Used to calculate the slope of the cursor (rise/run); 1 for","0 for vertical caret, 1 for horizontal.","0 for vertical caret, 1 for horizontal.","Format identifier-format = 3","Format identifier: format = 1","Format identifier: format = 2","Array of offsets to CaretValue tables, from beginning of …","Contour point index on glyph","A dynamically resolving wrapper for caret_value_offsets.","","","","","x coordinate for the center of rotation. For variation, use","x coordinate for the center of rotation.","Center x coordinate.","x coordinate for the center of scaling. For variation, use …","x coordinate for the center of scaling.","x coordinate for the center of scaling.","x coordinate for the center of scaling. For variation, use …","x coordinate for the center of rotation.","Center x coordinate. For variation, use varIndexBase + 0.","x coordinate for the center of rotation. For variation, use","y coordinate for the center of scaling.","y coordinate for the center of scaling. For variation, use …","Center y coordinate. For variation, use varIndexBase + 1.","y coordinate for the center of scaling.","Center y coordinate.","y coordinate for the center of rotation.","y coordinate for the center of rotation. For variation, use","y coordinate for the center of scaling. For variation, use …","y coordinate for the center of rotation. For variation, use","y coordinate for the center of rotation.","","","","","Number of ChainedClassSequenceRule tables","Array of offsets to ChainedClassSequenceRule tables, from …","Number of ChainedClassSequenceRuleSet tables","Array of offsets to ChainedClassSequenceRuleSet tables, …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for …","Number of ChainedSequenceRule tables","Array of offsets to ChainedSequenceRule tables, from …","Number of ChainedSequenceRuleSet tables","Array of offsets to ChainedSeqRuleSet tables, from …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for …","The count of characters for which this feature provides …","The Unicode Scalar Value of the characters for which this …","Checksum for the table.","Checksum for the table.","To compute: set it to 0, sum the entire font as uint32, …","Number of classes in classDef1 table — includes Class 0.","Array of Class1 records, ordered by classes in classDef1.","Number of classes in classDef2 table — includes Class 0.","Attempt to resolve class_def_offset.","Attempt to resolve class_def1_offset.","Offset to ClassDef table, from beginning of PairPos …","Attempt to resolve class_def2_offset.","Offset to ClassDef table, from beginning of PairPos …","Offset to ClassDef table, from beginning of …","Format identifier — format = 1","Format identifier — format = 2","Number of ClassRangeRecords","Array of ClassRangeRecords — ordered by startGlyphID","Number of ClassSequenceRule tables","Array of offsets to ClassSequenceRule tables, from …","Number of ClassSequenceRuleSet tables","Array of offsets to ClassSequenceRuleSet tables, from …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for class_seq_rule_offsets.","Array of Class Values — one per glyph ID","Attempt to resolve clip_list_offset.","Offset to ClipList table (may be NULL).","Clip records. Sorted by startGlyphID.","","","","","","","","","","","","","","","","","","","","","","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Offset to ColorLine table.","Offset to VarColorLine table.","Offset to ColorLine table.","Offset to VarColorLine table.","Offset to VarColorLine table.","Offset to ColorLine table.","Index of each palette’s first color record in the …","Attempt to resolve color_records_array_offset.","Offset from the beginning of CPAL table to the first …","","Allows for variations.","","","Number of ComponentRecords in this ligature","Number of components in the ligature","component flag glyph index of component","Array of component glyph IDs — start with the second …","Returns an iterator that yields the glyph identifier and …","Array of Component records, ordered in writing direction.","Returns an iterator over the components of the composite …","A CompositeMode enumeration value.","Computes the delta value for the specified index and set …","Computes the delta value in floating point for the …","Compute the number of bytes required to represent this …","Number of conditions for this condition set.","Array of offsets to condition tables, from beginning of the","A dynamically resolving wrapper for condition_offsets.","X or Y value, in design units","X or Y value, in design units","X or Y value, in design units","X or Y value, in design units","X or Y value, in design units","Number of name records.","Number of objects stored in INDEX.","Number of objects stored in INDEX.","Returns the component count and TrueType interpreter …","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Format identifier — format = 1","Format identifier — format = 2","Offset to Coverage table, from beginning of …","Offset to Coverage table - from beginning of LigCaretList …","Offset to Coverage table, from beginning of CursivePos …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of PairPos …","Offset to Coverage table, from beginning of …","Offset to Coverage table, from beginning of …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table - from beginning of AttachList …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of SinglePos …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of SinglePos …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of PairPos …","Offset to Coverage table, from beginning of …","Offset to Coverage table, from beginning of substitution …","Array of offsets to mark glyph set coverage tables, from …","Array of offsets to Coverage tables, from beginning of …","A dynamically resolving wrapper for coverage_offsets.","A dynamically resolving wrapper for coverage_offsets.","","","Number of seconds since 12:00 midnight that started …","","","Array containing the object data.","The actual embedded graphic data. The total length is …","","Attempt to resolve data_offset.","Array containing the object data.","","","","Offset from the start of the ‘cvar’ table to the …","","Index number of default baseline for this script — equals","Attempt to resolve default_lang_sys_offset.","Offset to default LangSys table, from beginning of Script …","Attempt to resolve default_min_max_offset.","Offset to MinMax table, from beginning of BaseScript table …","Format, = 0x8000","Format of deltaValue array data: 0x0001, 0x0002, or 0x0003","Add to original glyph ID to get substitute glyph ID","Returns an iterator over the per-region delta values for …","A delta-set inner index — used to select a delta-set row …","A delta-set outer index — used to select an item …","Delta-set rows.","Array of compressed data","Computes the accumulated deltas for the given set of …","Typographic descent.","Typographic descent.","Attempt to resolve design_axes_offset.","Offset in bytes from the beginning of the STAT table to the","The number of axis records. In a font with an ‘fvar’ …","The size in bytes of each axis record.","The first value represents the design size in 720/inch …","Attempt to resolve device_offset.","Attempt to resolve device_offset.","Offset to Device table (non-variable font) / Variation …","Offset to Device table (non-variable font) / Variation …","The length (in bytes) of the DSIG table (null if no …","The length (in bytes) of the DSIG table (null if no …","The offset (in bytes) of the DSIG table from the beginning …","The offset (in bytes) of the DSIG table from the beginning …","Tag indicating that a DSIG table exists, 0x44534947 (‘…","Tag indicating that a DSIG table exists, 0x44534947 (‘…","Translation in x direction. For variation, use …","Translation in x direction.","Translation in x direction. For variation, use …","Translation in x direction.","Translation in y direction.","Translation in y direction.","Translation in y direction. For variation, use …","Translation in y direction. For variation, use …","","","","","Name ID used as fallback when projection of names into a …","","End of the angular range of the gradient, 180° in …","End of the angular range of the gradient, 180° in …","End characterCode for each segment, last=0xFFFF.","Array of point indices for the last point of each contour, …","Largest size to correct, in ppem","Number of character codes in subrange.","Number of EntryExit records","Array of EntryExit records, in Coverage index order.","A packed field that describes the compressed …","A packed field that describes the compressed …","","Log2 of the maximum power of 2 less than or equal to …","","","","","","","An Extend enum value.","An Extend enum value.","Attempt to resolve extension_offset.","Attempt to resolve extension_offset.","Lookup type of subtable referenced by extensionOffset …","Lookup type of subtable referenced by extensionOffset …","Offset to the extension subtable, of lookup type …","Offset to the extension subtable, of lookup type …","FD selector array (one entry for each glyph).","Number of FeatMinMaxRecords — may be zero (0)","Array of FeatMinMaxRecords, in alphabetical order by …","The ‘name’ table name ID that specifies a string (or …","The ‘name’ table name ID that specifies a string (or …","Number of FeatureRecords in this table","Number of feature index values for this language system —","Array of indices into the FeatureList, in arbitrary order","Attempt to resolve feature_list_offset.","Attempt to resolve feature_list_offset.","Offset to FeatureList table, from beginning of GSUB table","Offset to FeatureList table, from beginning of GPOS table","Attempt to resolve feature_params_offset.","Offset from start of Feature table to FeatureParams table, …","Array of FeatureRecords — zero-based (first feature has …","Number of feature variation records.","Array of feature variation records.","Attempt to resolve feature_variations_offset.","Attempt to resolve feature_variations_offset.","","Offset to FeatureVariations table, from beginning of the …","Maximum value of the font variation instances that satisfy …","Minimum value of the font variation instances that satisfy …","First character code of subrange.","First glyph ID of this range.","Index (base 0) into the LayerList.","The first ‘name’ table name ID used to specify strings …","See the flags enum","Flags — see below for details.","Flags — see below for details.","Flags — see below for details.","Bit 0: Set to 1. Bit 1: Draw outlines. Bits 2 to 15: …","Flags — see below for details.","Bit-field that gives the format of the offset array that …","","","","","Deprecated (Set to 2).","Set by font manufacturer.","Returns an iterator over the fonts contained in the file.","Set to 14.","Format identifier: format = 3","Format— set to 1","Set to 22.","Set to 28.","DeltaSetIndexMap format: set to 1.","Set to 6.","DeltaSetIndexMap format: set to 0.","Subtable format; set to 8.","Format identifier — set to 4.","Set to 1.","Set to 7.","Format identifier — set to 3.","Set to 29.","Format identifier: format = 2","Set to 8.","Format identifier — set to 2.","Set to 30.","Format number is set to 6.","Set to 27.","Set to 9.","Set to 10.","Format identifier — set to 1.","Set to 26.","Set to 3.","Set to 31.","Set to 11.","Format identifier == 1","Set to 25.","Format identifier: format = 2","Set to 12.","Set to 13.","Set to 21.","Format = 4.","Format = 3.","Format = 0.","Set to 20.","Subtable format; set to 10.","Set to 2.","Set to 5.","Set to 32.","Set to 24.","Format identifier: format = 1","Set to 1.","Subtable format. Set to 14.","Format, = 1","Set to 2.","Set to 23.","Format identifier: format = 1","Set to 15.","Format number is set to 4.","Set to 16.","Set to 4.","Set to 17.","Set to 18.","Format identifier: format = 3","Format number is set to 2.","Format number is set to 0.","Subtable format; set to 12.","Format number is set to 0.","Subtable format; set to 13.","Set to 19.","Set to 1.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates a new reference to an in-memory font at the …","Font selection flags.","Type flags.","","","Sorted by ppem","","","Resolve the offset at the provided index.","Resolve the offset at the provided index.","Get the class for this glyph id","If this glyph is in the coverage table, returns its index","Returns the data for the object at the given index.","If this glyph is in the coverage table, returns its index","Get the class for this glyph id","Returns the data for the object at the given index.","Returns the font in the collection at the specified index.","Returns the offset of the object at the given index.","Returns the offset of the object at the given index.","","","","One per glyph.","Array of glyph IDs — in numerical order","One per glyph, sorted by glyhph ID.","Attempt to resolve glyph_class_def_offset.","Offset to class definition table for glyph type, from …","Number of glyphs in the input glyph sequence","Number of glyph IDs in the substituteGlyphIDs array","Number of glyph IDs in the substituteGlyphIDs array. This …","Size of the classValueArray","Number of glyph IDs in the substituteGlyphIDs array.","Number of glyph IDs in the alternateGlyphIDs array","Number of glyphs with attachment points","Number of glyphs to be matched","Number of glyphs in the glyph array","Number of glyphs in the input sequence","The number of glyphs in this font. This must match the …","the raw data for flags & x/y coordinates","","0 for current format.","Offset from the beginning of the strike data header to …","Glyph ID for a BaseGlyphList base glyph.","Glyph ID for the source outline.","Glyph index array (arbitrary length)","An array that maps character codes to glyph index values.","Array of glyph indices for the character codes covered","Array of glyph index values for character codes in the …","","Array of indices into the string data. See below for …","Get the variation data for a specific glyph.","Offset from the start of this table to the array of …","Offsets from the start of the GlyphVariationData array to …","","","Indicates the format of the embedded graphic data: one of …","Array of SequentialMapGroup records.","Array of ConstantMapGroup records.","Array of SequentialMapGroup records.","","","","","Paired advance width/height and left/top side bearing …","Returns true if the contours in the simple glyph may …","","Header size (bytes).","","","Header size (bytes).","","","","","Attempt to resolve horiz_axis_offset.","Offset to horizontal Axis table, from beginning of BASE …","","","Delta for all character codes in segment.","Offsets into glyphIdArray or 0","The second value has no independent meaning, but serves as …","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Format of EBDT image data.","Format of EBDT image data.","Format of EBDT image data.","Format of EBDT image data.","Format of EBDT image data.","All glyphs have the same data size.","All the glyphs are of the same size.","Format of this IndexSubTable.","Format of this IndexSubTable.","Format of this IndexSubTable.","Format of this IndexSubTable.","Format of this IndexSubTable.","0 for short offsets (Offset16), 1 for long (Offset32).","Attempt to resolve input_class_def_offset.","Offset to ClassDef table containing input sequence context,","Array of offsets to coverage tables for the input sequence","A dynamically resolving wrapper for input_coverage_offsets.","Number of glyphs in the input sequence","Total number of glyphs in the input sequence","Number of glyphs in the input sequence","Sequence of classes to be matched to the input glyph …","Array of input glyph IDs—start with second glyph","Array of input glyph IDs—starting with the second glyph","Array of input sequence classes, beginning with the second …","The number of named instances defined in the font (the …","The size in bytes of each InstanceRecord — set to either …","Instance record array.","Returns the array of instance records.","Total number of bytes for instructions. If …","Returns the TrueType interpreter instructions.","Array of instruction byte code for the glyph.","Intermediate end tuple record for this tuple variation …","Intermediate start tuple record for this tuple variation …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Tightly packed array of bits (8K bytes total) indicating …","true if the data has a length of zero bytes.","true if the array is empty","true if the array is empty","Returns true if the collection is empty.","Set to 0 if the font is proportionally spaced, non-zero if …","","Italic angle in counter-clockwise degrees from the …","The number of delta sets for distinct items.","Attempt to resolve item_var_store_offset.","Attempt to resolve item_var_store_offset.","Offset to the Item Variation Store table, from beginning of","Offset to Item Variation Store table, from beginning of …","A dynamically resolving wrapper for …","The number of item variation data subtables.","Offsets in bytes from the start of the item variation …","Attempt to resolve item_variation_store_offset.","Attempt to resolve item_variation_store_offset.","Attempt to resolve item_variation_store_offset.","Attempt to resolve item_variation_store_offset.","Offset in bytes from the start of this table to the item …","Offset to ItemVariationStore (may be NULL).","Offset in bytes from the start of this table to the item …","Offset in bytes from the start of this table to the item …","Iterate over all of the offset targets.","Iterate over all of the offset targets.","Returns an iterator over all (codepoint, glyph identifier) …","Returns an iterator over all (codepoint, glyph identifier) …","Returns an iterator over all (codepoint, selector, mapping …","Iterate over each glyph and its class.","Iterate over each glyph and its class.","Iterate over the decoded values for this device","Returns an iterator over the fonts in the collection.","Number of LangSysRecords for this script — excluding the …","Array of LangSysRecords, listed alphabetically by LangSys …","Number of language-tag records.","The language-tag records where langTagCount is the number …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","Last glyph ID of this range (inclusive).","Attempt to resolve layer_list_offset.","Offset to LayerList table (may be NULL).","Attempt to resolve layer_records_offset.","Offset to layerRecords array (may be NULL).","Leading (left/top) side bearings for glyph IDs greater …","The length of the data, in bytes","The number of offsets in the array","The number of offsets in the array","Returns the number of fonts in the collection.","This is the length in bytes of the subtable.","This is the length in bytes of the subtable.","Byte length of this subtable (including the header)","Byte length of this subtable (including the header)","This is the length in bytes of the subtable.","Byte length of this subtable (including this header)","This is the length in bytes of the subtable.","Byte length of this subtable (including the header)","Byte length of this subtable (including the header)","Length of the table.","Length of the table.","Attempt to resolve lig_caret_list_offset.","Offset to ligature caret list table, from beginning of GDEF","Number of ligature glyphs","Array of offsets to LigGlyph tables, from beginning of …","A dynamically resolving wrapper for lig_glyph_offsets.","Attempt to resolve ligature_array_offset.","Offset to LigatureArray table, from beginning of MarkLigPos","Array of offsets to LigatureAttach tables. Offsets are from","A dynamically resolving wrapper for ligature_attach_offsets…","Number of Ligature tables","Number of LigatureAttach table offsets","Attempt to resolve ligature_coverage_offset.","Offset to ligatureCoverage table, from beginning of …","glyph ID of ligature to substitute","Array of offsets to Ligature tables. Offsets are from …","Number of LigatureSet tables","Array of offsets to LigatureSet tables. Offsets are from …","A dynamically resolving wrapper for ligature_set_offsets.","A dynamically resolving wrapper for ligature_offsets.","Typographic line gap. Negative LineGap values are treated …","Typographic line gap. Negative LineGap values are treated …","The numeric value for a style-linked mapping from this …","is_long can be optionally provided, if known, otherwise we …","is_long can be optionally provided, if known, otherwise we …","Attempt to resolve lookahead_class_def_offset.","Offset to ClassDef table containing lookahead sequence …","Array of offsets to coverage tables for the lookahead …","Array of offsets to coverage tables in lookahead sequence, …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for …","Number of glyphs in the lookahead sequence","Number of glyphs in the lookahead sequence","Number of glyphs in the lookahead sequence","Number of glyphs in lookahead sequence.","Array of lookahead-sequence classes","Array of lookahead glyph IDs","Number of lookups in this table","Lookup qualifiers","Number of LookupList indices for this feature","Attempt to resolve lookup_list_offset.","Attempt to resolve lookup_list_offset.","Array of indices into the LookupList — zero-based (first …","Offset to LookupList table, from beginning of GSUB table","Offset to LookupList table, from beginning of GPOS table","Array of offsets to Lookup tables, from beginning of …","Different enumerations for GSUB and GPOS","A dynamically resolving wrapper for lookup_offsets.","Smallest readable size in pixels.","Returns the left side bearing delta for the specified …","Attempt to resolve lsb_mapping_offset.","Offset in bytes from the start of this table to the …","see somewhere else","Set to 0x5F0F3CF5.","Format major version (starting at 1).","Format major version (set to 2).","Major version of the CBLC table, = 3.","Major version of the CBDT table, = 3.","Major version of the EBDT table, = 2.","Major version of the EBLC table, = 2.","Map a codepoint to a nominal glyph identifier","Maps a codepoint to a nominal glyph identifier.","Maps a codepoint to a nominal glyph identifier.","The number of mapping entries.","The number of mapping entries.","The delta-set index mapping data. See details below.","The delta-set index mapping data. See details below.","Maps a codepoint and variation selector to a nominal glyph …","Attempt to resolve mark1_array_offset.","Offset to MarkArray table for mark1, from beginning of …","Attempt to resolve mark1_coverage_offset.","Offset to Combining Mark Coverage table, from beginning of …","Attempt to resolve mark2_array_offset.","Offset to Mark2Array table for mark2, from beginning of …","Number of Mark2 records","Attempt to resolve mark2_coverage_offset.","Offset to Base Mark Coverage table, from beginning of …","Array of Mark2Records, in Coverage order.","Attempt to resolve mark_array_offset.","Attempt to resolve mark_array_offset.","Offset to MarkArray table, from beginning of MarkBasePos …","Offset to MarkArray table, from beginning of MarkLigPos …","Attempt to resolve mark_attach_class_def_offset.","Offset to class definition table for mark attachment type, …","Number of Combining Mark classes defined","Number of classes defined for marks","Number of defined mark classes","Number of MarkRecords","Attempt to resolve mark_coverage_offset.","Attempt to resolve mark_coverage_offset.","Offset to markCoverage table, from beginning of MarkBasePos","Offset to markCoverage table, from beginning of MarkLigPos …","Index (base 0) into GDEF mark glyph sets structure. This …","Number of mark glyph sets defined","Attempt to resolve mark_glyph_sets_def_offset.","Offset to the table of mark glyph set definitions, from …","Array of MarkRecords, ordered by corresponding glyphs in …","Maximum levels of recursion; 1 for simple components.","Maximum number of components referenced at “top level” …","Maximum contours in a composite glyph.","Maximum points in a composite glyph.","Maximum contours in a non-composite glyph.","Attempt to resolve max_coord_offset.","Offset to BaseCoord table that defines maximum extent …","Number of FDEFs, equal to the highest function number + 1.","Number of IDEFs.","Maximum memory usage when an OpenType font is downloaded …","Maximum memory usage when an OpenType font is downloaded.","Maximum points in a non-composite glyph.","Maximum byte count for glyph instructions.","Maximum stack depth across Font Program (‘fpgm’ …","Number of Storage Area locations.","Maximum points used in Z0.","1 if instructions do not use the twilight zone (Z0), or 2 …","","","0 for current format.","0 for current format.","Returns the metric delta for the specified tag and …","Minimum bottom sidebearing value","Attempt to resolve min_coord_offset.","Offset to BaseCoord table that defines the minimum extent …","Minimum left sidebearing value in ‘hmtx’ table for …","Minimum memory usage when an OpenType font is downloaded …","Minimum memory usage when an OpenType font is downloaded.","Minimum right sidebearing value; calculated as min(aw - …","Minimum top sidebearing value in ‘vmtx’ table for …","Format minor version (starting at 0).","Minor version of EBLC table, = 0.","Format minor version (set to 0).","Minor version of CBLC table, = 0.","Minor version of EBDT table, = 0.","Minor version of CBDT table, = 0.","Number of seconds since 12:00 midnight that started …","","","Number of ranges.","Number of ranges.","","","The third value enables applications to use a single name …","The name records where count is the number of records.","Create a new FontData with these bytes.","Creates a new reference to a file representing a font or …","Creates a new reference to a font collection.","Creates a new reference to an in-memory font backed by the …","A nominal numeric value for this attribute value.","","","","Number of BaseGlyph records; may be 0 in a version 1 table.","Number of character codes covered","Number of Clip records.","Total number of color records, combined for all palettes.","Number of fonts in TTC","Number of fonts in TTC","The number of glyphs in the font.","Number of glyphs (this should be the same as numGlyphs in …","Array length.","Array length.","Number of groupings which follow","Number of groupings which follow","Number of groupings which follow","Number of Layer records; may be 0 in a version 1 table.","","Number of offsets to paint tables to read from LayerList.","Number of named parameters. (May be zero.)","The number of glyph names covered by this table","Number of palette entries in each palette.","Number of palettes in the table.","Returns the total number of points.","Number of records to follow","Number of BitmapSize records.","Number of BitmapSize records.","Number of ColorStop records.","Number of ColorStop records.","Number of bitmap strikes.","Number of encoding tables that follow.","Number of tables.","Number of tables.","Number of Unicode character ranges.","","Number of variation Selector Records","If the number of contours is greater than or equal to zero,","If the number of contours is greater than or equal to zero,","Number of LongMetric entries in ‘hmtx’/‘vmtx’ table","Number of LongMetric entries in ‘hmtx’/‘vmtx’ table","Absolute offset size.","Object array element size.","Object array element size.","Offset from the beginning of the font data.","Offset from the beginning of the font data.","Return a reference to this table’s raw data.","Offset in bytes from the beginning of the STAT table to the","Attempt to resolve offset_to_axis_value_offsets.","Bytes containing count + 1 offsets each of off_size.","Bytes containing count + 1 offsets each of off_size.","The horizontal (x-axis) position of the left edge of the …","The vertical (y-axis) position of the bottom edge of the …","","","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint table.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offsets to Paint tables.","A dynamically resolving wrapper for paint_offsets.","Number of PairSet tables","Array of offsets to PairSet tables. Offsets are from …","A dynamically resolving wrapper for pair_set_offsets.","Number of PairValueRecords","Array of PairValueRecords, ordered by glyph ID of the …","Attempt to resolve palette_entry_labels_array_offset.","Offset from the beginning of CPAL table to the Palette …","Index for a CPAL palette entry.","Index for a CPAL palette entry.","Attempt to resolve palette_labels_array_offset.","Offset from the beginning of CPAL table to the Palette …","Attempt to resolve palette_types_array_offset.","Offset from the beginning of CPAL table to the Palette …","PANOSE classification number.","","Peak tuple record for this tuple variation table — …","Number of attachment points on this glyph","Array of contour point indices -in increasing numerical …","Returns an iterator over the points in the glyph.","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 1","","","The PPEM size for which this strike was designed.","The device pixel density (in PPI) for which this strike …","Start circle radius.","Start circle radius. For variation, use varIndexBase + 2.","End circle radius. For variation, use varIndexBase + 5.","End circle radius.","Number of RangeRecords","","The maximum value for a range associated with the specified","The minimum value for a range associated with the specified","Array of glyph ranges — ordered by startGlyphID.","","segCount times 2, minus searchRange ((segCount * 2) - …","","The fourth and fifth values represent the small end of the …","Array of UnicodeRange records.","Range4 array.","Range3 array.","Read an instace of Self from the provided data, performing …","","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","","","Interpret the bytes at the provided offset as a slice of T.","Read a scalar at the provided location in the data.","Read a big-endian value at the provided location in the …","Reads points and flags into the provided buffers.","Interpret the bytes at the provided offset as a reference …","read an item, using the provided args.","","","","Glyph ID of control glyph","The number of variation region tables in the variation …","The number of variation regions referenced.","Array of indices into the variation region list for the …","Index of a feature required for this language system; if no","","","Resolve the provided offset from the start of this table.","","","Returns the left side bearing delta for the specified …","Attempt to resolve rsb_mapping_offset.","Offset in bytes from the start of this table to the …","This metric specifies the distance between the baseline …","Font-family class and subclass. This parameter is a …","The typographic ascender for this font.","The typographic descender for this font.","The typographic line gap for this font.","The ‘name’ table name ID that specifies sample text …","","","","","Scale factor in x and y directions.","Scale factor in x and y directions. For variation, use …","Scale factor in x and y directions.","Scale factor in x and y directions. For variation, use …","Scale factor in x direction. For variation, use …","Scale factor in x direction.","Scale factor in x direction.","Scale factor in x direction. For variation, use …","Scale factor in y direction.","Scale factor in y direction. For variation, use …","Scale factor in y direction.","Scale factor in y direction. For variation, use …","Number of ScriptRecords","Attempt to resolve script_list_offset.","Attempt to resolve script_list_offset.","Offset to ScriptList table, from beginning of GSUB table","Offset to ScriptList table, from beginning of GPOS table","Array of ScriptRecords, listed alphabetically by script tag","Maximum power of 2 less than or equal to segCount, times 2 …","","","2 × segCount.","Sentinel GID. Set equal to the number of glyphs in the …","Sentinel GID. Set equal to the number of glyphs in the …","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Array of Sequence lookup records","Number of SequenceRule tables","Array of offsets to SequenceRule tables, from beginning of …","Number of SequenceRuleSet tables","Array of offsets to SequenceRuleSet tables, from beginning …","A dynamically resolving wrapper for seq_rule_set_offsets.","A dynamically resolving wrapper for seq_rule_offsets.","Number of Sequence table offsets in the sequenceOffsets …","Array of offsets to Sequence tables. Offsets are from …","A dynamically resolving wrapper for sequence_offsets.","Attempt to resolve serialized_data_offset.","Offset from the start of the GlyphVariationData table to …","0x00010000 or 0x4F54544F","0x00010000 or 0x4F54544F","The number of shared tuple records. Shared tuple records …","Attempt to resolve shared_tuples_offset.","Offset from the start of this table to the shared tuple …","Returns the left side bearing for the given glyph …","Returns the top side bearing for the given glyph identifer.","Returns the total size in bytes of the index table.","Returns the total size in bytes of the index table.","","Attempt to resolve source_paint_offset.","Offset to a source Paint table.","Returns self[pos..]","Start of the angular range of the gradient, 180° in …","Start of the angular range of the gradient, 180° in …","First character code covered","Start character code for each segment.","First glyph ID of the classValueArray","Smallest size to correct, in ppem","","","Offset to start of string storage (from start of table).","Offsets from the beginning of the ‘sbix’ table to data …","A dynamically resolving wrapper for strike_offsets.","The FontData containing the encoded name strings.","Storage for the string data.","Array that maps high bytes to subHeaders: value is …","Number of subtables for this lookup","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 1","Format identifier. Set to 1.","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","String of glyph IDs to substitute","Array of substitute glyph IDs — ordered by Coverage …","Array of substitute glyph IDs — ordered by Coverage index","Number of feature table substitution records.","Array of feature table substitution records.","Array of offsets to lookup subtables, from beginning of …","A dynamically resolving wrapper for subtable_offsets.","This metric specifies the distance between the baseline …","Returns the data for the table with the specified tag, if …","","Array of offsets to the TableDirectory for each font from …","Array of offsets to the TableDirectory for each font from …","Table records array—one for each top-level table in the …","Table records array—one for each top-level table in the …","The various font tables","Table identifier.","Table identifier.","returns self[..pos], and updates self to = self[pos..];","","","","","","","","","","","","Data containing the Top DICT.","Length of Top DICT structure in bytes.","Top side bearings for glyph IDs greater than or equal to …","Remaining table data.","Remaining table data.","Attempt to resolve transform_offset.","Attempt to resolve transform_offset.","Offset to an Affine2x3 table.","Offset to a VarAffine2x3 table.","","","","","","","","","","","","","","","","","","","Returns the top side bearing delta for the specified glyph …","Attempt to resolve tsb_mapping_offset.","Offset in bytes from the start of this table to the …","Font Collection ID string: "ttcf"","Font Collection ID string: "ttcf"","A packed field. The high 4 bits are flags (see below). The …","A packed field. The high 4 bits are flags, and the low 12 …","A packed field. The high 4 bits are flags, and the low 12 …","Array of tuple variation headers.","Array of tuple variation headers.","","","","","","","","","","","Public re-export of the font-types crate.","The ‘name’ table name ID that specifies a string (or …","Code page character range bits 0-31.","Code page character range bits 32-63.","Unicode Character Range.","Unicode Character Range (bits 32-63).","Unicode Character Range (bits 64-95).","Unicode Character Range (bits 96-127).","This is the suggested distance of the top of the underline …","Suggested values for the underline thickness. In general, …","Set to a value from 16 to 16384. Any value in this range is","his is the Unicode code point, in UTF-16 encoding, of a …","This is the Unicode code point, in UTF-16 encoding, of a …","The minimum Unicode index (character code) in this font.","The maximum Unicode index (character code) in this font.","This field is used for fonts with multiple optical styles.","This field is used for fonts with multiple optical styles.","This field is used for fonts with multiple optical styles.","Weight class.","Width class.","The “Windows ascender” metric.","The “Windows descender” metric.","","Returns the COLRv0 base glyph for the given glyph …","Returns the COLRv0 layer at the given index.","Returns the COLRv1 base glyph for the given glyph …","Returns the COLRv1 clip box for the given glyph identifier.","Returns the COLRv1 layer at the given index.","Paired advance height and top side bearing values for each …","Returns the vertical origin delta for the specified glyph …","Attempt to resolve v_org_mapping_offset.","Offset in bytes from the start of this table to the …","A numeric value for this attribute value.","A numeric value for this attribute value.","Number of ValueRecords — must equal glyphCount in the …","Defines the types of data in the ValueRecords.","Defines the types of data in the ValueRecord.","ValueRecord definition — for the first glyph of the pair …","Defines the types of data in valueRecord1 — for the first","Defines the types of data in valueRecord2 — for the …","ValueRecord definition — for the second glyph of the pair","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","Defines positioning value(s) — applied to all glyphs in …","The number of value records — may be zero.","The size in bytes of each value record — must be greater …","Array of value records that identify target items and the …","Array of ValueRecords — positioning values applied to …","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Attempt to resolve var_index_map_offset.","Offset to DeltaSetIndexMap table (may be NULL).","Array of VariationSelector records.","Returns the variation data containing the tuples and …","The size in bytes of the serialized data for this tuple …","Attempt to resolve variation_region_list_offset.","Offset in bytes from the start of the item variation store …","Array of variation regions.","The major/minor version (1, 0)","Major version number of the font variations table — set …","The major and minor version of the GSUB table, as a tuple …","Major version number of the horizontal metrics variations …","Table version number - set to 0 or 1.","Major/minor version number of the CVT variations table — …","(major, minor) Version for the BASE table (1,0) or (1,1)","0x00010000 for version 1.0 0x00020000 for version 2.0 …","","Major version number of the axis variations table — set …","The major/minor version of the GDEF table","Version number of the font header table, set to (1, 0)","Table version number — set to 1.","Major/minor version number of the glyph variations table …","Major version number of the horizontal metrics variations …","The major and minor version of the GPOS table, as a tuple …","Major/minor version number. Set to 1.2 for new fonts.","","The major/minor version (1, 1)","Major/minor version of the TTC Header","Table version number (0 or 1)","Major & minor version of the table: (1, 0)","Table version number (0).","Table version number (=0).","","Version number (set to 1)","The version: 0x00005000 for version 0.5, 0x00010000 for …","Major version number of the horizontal metrics variations …","Major/minor version of the TTC Header","Attempt to resolve vert_axis_offset.","Offset to vertical Axis table, from beginning of BASE …","","","","","","","A packed field: the high bit is a flag—see details below.","Start point (p₀) x coordinate.","Start point (p₀) x coordinate. For variation, use …","Start circle center x coordinate. For variation, use …","Start circle center x coordinate.","End circle center x coordinate. For variation, use …","End point (p₁) x coordinate.","End point (p₁) x coordinate. For variation, use …","End circle center x coordinate.","Rotation point (p₂) x coordinate.","Rotation point (p₂) x coordinate. For variation, use …","Average weighted escapement.","Horizontal value, in design units","Horizontal value, in design units","Horizontal value, in design units","Attempt to resolve x_device_offset.","Offset to Device table (non-variable font) / VariationIndex","Maximum x for coordinate data.","Maximum x coordinate across all glyph bounding boxes.","Maximum x of clip box. For variation, use varIndexBase + 2.","Maximum x for coordinate data.","Maximum x of clip box.","Max(lsb + (xMax-xMin))","Minimum x of clip box. For variation, use varIndexBase + 0.","Minimum x of clip box.","Minimum x coordinate across all glyph bounding boxes.","Minimum x for coordinate data.","Minimum x for coordinate data.","Angle of skew in the direction of the x-axis, 180° in …","Angle of skew in the direction of the x-axis, 180° ┬░ …","Angle of skew in the direction of the x-axis, 180° in …","Angle of skew in the direction of the x-axis, 180° in …","x-component of transformed x-basis vector.","x-component of transformed x-basis vector. For variation, …","x-component of transformed y-basis vector. For variation, …","x-component of transformed y-basis vector.","Start point (p₀) y coordinate. For variation, use …","Start point (p₀) y coordinate.","Start circle center y coordinate. For variation, use …","Start circle center y coordinate.","End point (p₁) y coordinate. For variation, use …","End circle center y coordinate.","End circle center y coordinate. For variation, use …","End point (p₁) y coordinate.","Rotation point (p₂) y coordinate. For variation, use …","Rotation point (p₂) y coordinate.","Vertical value, in design units","Vertical value, in design units","Vertical value, in design units","Attempt to resolve y_device_offset.","Offset to Device table (non-variable font) / VariationIndex","Maximum y coordinate across all glyph bounding boxes.","Maximum y of clip box. For variation, use varIndexBase + 3.","Maximum y for coordinate data.","Maximum y of clip box.","Maximum y for coordinate data.","Defined as max( tsb + (yMax-yMin)).","Minimum y coordinate across all glyph bounding boxes.","Minimum y of clip box. For variation, use varIndexBase + 1.","Minimum y of clip box.","Minimum y for coordinate data.","Minimum y for coordinate data.","Angle of skew in the direction of the y-axis, 180° in …","Angle of skew in the direction of the y-axis, 180° in …","Angle of skew in the direction of the y-axis, 180° in …","Angle of skew in the direction of the y-axis, 180° in …","The position of the top of the strikeout stroke relative …","Thickness of the strikeout stroke in font design units.","The recommended horizontal offset in font design units for …","The recommended horizontal size in font design units for …","The recommended vertical offset in font design units for …","The recommended vertical size in font design units for …","The recommended horizontal offset in font design units for …","The recommended horizontal size in font design units for …","The recommended vertical offset in font design units for …","The recommended vertical size in font design units for …","y-component of transformed x-basis vector. For variation, …","y-component of transformed x-basis vector.","y-component of transformed y-basis vector. For variation, …","y-component of transformed y-basis vector.","An array whose items size is not known at compile time.","An array of items of non-uniform length.","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Return the item at the provided index.","","Calls U::from(self).","Calls U::from(self).","","Return an iterator over this array’s items.","","The number of items in the array","","","","","","","","","","","","The Axis Variations table","The BASE table","Common bitmap (EBLC/EBDT/CBLC/CBDT) types.","The CBDT (Color Bitmap Data) table","The CBLC (Color Bitmap Location) table","The CFF table","The CFF2 table","The cmap table","The COLR table","The CPAL table","The cvar (CVT Variations) table.","The EBDT (Embedded Bitmap Data) table","The EBLC (Embedded Bitmap Location) table","The Font Variations table","The gasp table","the GDEF table","The glyf (Glyph Data) table","the GPOS table","the GSUB table","The gvar (Glyph Variations) table","The head table","the hhea (Horizontal Header) table","The hmtx (Horizontal Metrics) table","The HVAR (Horizontal Metrics Variation) table","OpenType Layout common table formats","The loca (Index to Location) table","The maxp table","The MVAR (Metrics Variation) table","The name (Naming) table","The os2 table","the post (PostScript) table","PostScript (CFF and CFF2) common tables.","The sbix (Standard Bitmap Graphics) table","The STAT table","OpenType font variations common tables.","the vhea (Horizontal Header) table","The vmtx (Vertical Metrics) table","The VVAR (Vertical Metrics Variation) table","The avar (Axis Variations) table","AxisValueMap record","SegmentMaps record","Applies the piecewise linear mapping to the specified …","The number of variation axes for this font. This must be …","The segment maps array — one segment map for each axis, …","The array of axis value map records for this axis.","The array of axis value map records for this axis.","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","A normalized coordinate value obtained using default …","A normalized coordinate value obtained using default …","","","Calls U::from(self).","Calls U::from(self).","","","","The number of correspondence pairs for this axis.","The number of correspondence pairs for this axis.","","","","The modified, normalized coordinate value.","The modified, normalized coordinate value.","","","","","","","","","Major version number of the axis variations table — set …","Axis Table","The BASE (Baseline) table","","BaseCoordFormat1","BaseCoordFormat2","BaseCoordFormat3","BaseLangSysRecord","BaseScript Table","BaseScriptList Table","BaseScriptRecord","BaseTagList Table","BaseValues table","FeatMinMaxRecord","","","","MinMax table","Number of BaseCoord tables defined — should equal …","Format identifier — format = 1","Format identifier — format = 2","Format identifier — format = 3","Format identifier — format = 1","Array of offsets to BaseCoord tables, from beginning of …","Index of contour point on the reference glyph","A dynamically resolving wrapper for base_coord_offsets.","Number of BaseLangSysRecords defined — may be zero (0)","Array of BaseLangSysRecords, in alphabetical order by …","4-byte language system identification tag","4-byte language system identification tag","Offset to BaseScript table, from beginning of …","Number of BaseScriptRecords defined","Attempt to resolve base_script_list_offset.","Offset to BaseScriptList table, from beginning of Axis …","Offset to BaseScript table, from beginning of …","Offset to BaseScript table, from beginning of …","Array of BaseScriptRecords, in alphabetical order by …","4-byte script identification tag","4-byte script identification tag","Number of baseline identification tags in this text …","Attempt to resolve base_tag_list_offset.","Offset to BaseTagList table, from beginning of Axis table …","Attempt to resolve base_values_offset.","Offset to BaseValues table, from beginning of BaseScript …","Array of 4-byte baseline identification tags — must be in","","","","","","","","","","","","","","","","","X or Y value, in design units","X or Y value, in design units","X or Y value, in design units","X or Y value, in design units","Index number of default baseline for this script — equals","Attempt to resolve default_min_max_offset.","Offset to MinMax table, from beginning of BaseScript table …","Attempt to resolve device_offset.","Offset to Device table (non-variable font) / Variation …","Number of FeatMinMaxRecords — may be zero (0)","Array of FeatMinMaxRecords, in alphabetical order by …","4-byte feature identification tag — must match feature …","4-byte feature identification tag — must match feature …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Attempt to resolve horiz_axis_offset.","Offset to horizontal Axis table, from beginning of BASE …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","Attempt to resolve item_var_store_offset.","Offset to Item Variation Store table, from beginning of …","Attempt to resolve max_coord_offset.","Offset to BaseCoord table that defines the maximum extent …","Offset to BaseCoord table that defines maximum extent …","Offset to BaseCoord table that defines the maximum extent …","Offset to BaseCoord table that defines the maximum extent …","Attempt to resolve min_coord_offset.","Offset to BaseCoord table that defines the minimum extent …","Offset to BaseCoord table that defines the minimum extent …","Offset to BaseCoord table that defines the minimum extent …","Offset to BaseCoord table that defines the minimum extent …","Offset to MinMax table, from beginning of BaseScript table","Offset to MinMax table, from beginning of BaseScript table","Offset to MinMax table, from beginning of BaseScript table","","","","","","","","","","","","","Glyph ID of control glyph","","","","","","","","","","","","","","","","","(major, minor) Version for the BASE table (1,0) or (1,1)","Attempt to resolve vert_axis_offset.","Offset to vertical Axis table, from beginning of BASE …","EbdtComponent record.","","BigGlyphMetrics record.","The full bitmap is tightly packed according to the bit …","","","","Bitmap flags.","","","BitmapSize record.","Each row of the data is aligned to a byte boundary.","","","","","","","","GlyphIdOffsetPair record.","Horizontal","IndexSubtables format type.","IndexSubTable1: variable-metrics glyphs with 4-byte …","IndexSubTable2: all glyphs have identical metrics.","IndexSubTable3: variable-metrics glyphs with 2-byte …","IndexSubTable4: variable-metrics glyphs with sparse glyph …","IndexSubTable5: constant-metrics glyphs with sparse glyph …","IndexSubtableArray table.","","SbitLineMetrics record.","","SmallGlyphMetrics record.","Vertical","Add to indexSubTableArrayOffset to get offset from …","Horizontal or vertical advance width in pixels.","Horizontal or vertical advance width in pixels.","Returns the set containing all flags.","","","Distance in pixels from the horizontal origin to the left …","Distance in pixels from the horizontal origin to the left …","Distance in pixels from the horizontal origin to the top …","Distance in pixels from the horizontal origin to the top …","All glyphs have the same metrics; glyph data may be …","All glyphs have the same metrics.","The Microsoft rasterizer v.1.7 or greater supports the …","The Microsoft rasterizer v.1.7 or greater supports the …","Bit depth from the associated size. Required for computing …","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Not used; set to 0.","Not used; set to 0.","Returns true if all of the flags in other are contained …","","Offset in bytes from the start of the EBDT/CBDT table.","Size of the image data in bytes.","","","","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","Highest glyph index for this size.","Highest glyph index for this size.","","","","","","","","","First glyph ID of this range.","Vertical or horizontal.","Vertical or horizontal.","","","","","","","","","","","","","Format of EBDT/CBDT image data.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","One per glyph.","One per glyph, sorted by glyhph ID.","Glyph ID of glyph present.","Component glyph ID.","Glyph ID of glyph present.","Component glyph ID.","","","","","","","","Number of rows of data.","Number of rows of data.","Number of rows of data.","Number of rows of data.","Line metrics for text rendered horizontally.","Line metrics for text rendered horizontally.","Horizontal advance width in pixels.","Horizontal advance width in pixels.","Distance in pixels from the horizontal origin to the left …","Distance in pixels from the horizontal origin to the left …","Distance in pixels from the horizontal origin to the top …","Distance in pixels from the horizontal origin to the top …","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Offset to image data in EBDT table.","Format of EBDT image data.","Format of EBDT image data.","Format of EBDT image data.","Format of EBDT image data.","Format of EBDT image data.","Format of EBDT image data.","All the glyphs are of the same size.","All glyphs have the same data size.","Format of this IndexSubTable.","Format of this IndexSubTable.","Format of this IndexSubTable.","Format of this IndexSubTable.","Format of this IndexSubTable.","Format of this IndexSubTable.","Offset to index subtable from beginning of EBLC/CBLC.","Offset to index subtable from beginning of EBLC/CBLC.","Number of bytes in corresponding index subtables and array.","Number of bytes in corresponding index subtables and array.","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if no flags are currently stored.","Returns true if the location references an empty bitmap …","","","","","","","","Last glyph ID of this range (inclusive).","Returns the bitmap location information for the given …","","","Full metrics, if present in the EBLC/CBLC table.","","","","","","","","Returns the complement of this set of flags.","Array length.","Array length.","There is an index subtable for each range or format change.","There is an index subtable for each range or format change.","","","","","","","","","","","","Horizontal pixels per em.","Horizontal pixels per em.","Vertical pixels per em.","Vertical pixels per em.","","","","","","","","","Removes the specified flags in-place.","Location in EBDT.","Location in EBDT.","","","Lowest glyph index for this size.","Lowest glyph index for this size.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","","","","","","","","","","","","","Toggles the specified flags in-place.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","Line metrics for text rendered vertically.","Line metrics for text rendered vertically.","Vertical advance width in pixels.","Vertical advance width in pixels.","Distance in pixels from the vertical origin to the left …","Distance in pixels from the vertical origin to the left …","Distance in pixels from the vertical origin to the top …","Distance in pixels from the vertical origin to the top …","Number of columns of data.","Number of columns of data.","Number of columns of data.","Number of columns of data.","","","Position of component left.","Position of component left.","Position of component top.","Position of component top.","The Color Bitmap Data table","","Major version of the CBDT table, = 3.","Minor version of CBDT table, = 0.","","The Color Bitmap Location table","BitmapSize records array.","Major version of the CBLC table, = 3.","Minor version of CBLC table, = 0.","Number of BitmapSize records.","","The Compact Font Format table.","Compact Font Format table header","Padding bytes before the start of the Name INDEX.","","","","","Returns the argument unchanged.","Returns the global subroutine index.","Header size (bytes).","","Calls U::from(self).","Format major version (starting at 1).","Format minor version (starting at 0).","Returns the PostScript name for the font in the font set …","Returns the name index.","Absolute offset size.","","","","","Returns the associated string for the given identifier.","Returns the string index.","","Returns the top dict index.","Remaining table data.","","","","The Compact Font Format (CFF) version 2 table","Compact Font Format (CFF) version 2 table header","Padding bytes before the start of the Top DICT.","","","","","Returns the argument unchanged.","Returns the global subroutine index.","","Header size (bytes).","Calls U::from(self).","Format major version (set to 2).","Format minor version (set to 0).","","","","","","Data containing the Top DICT.","Returns the raw data containing the top dict.","Length of Top DICT structure in bytes.","Remaining table data.","","","","cmap","cmap Format 0: Byte encoding table","cmap Format 10: Tr","cmap Format 12: Segmented coverage","Iterator over all (codepoint, glyph identifier) pairs in …","cmap Format 13: Many-to-one range mappings","cmap Format 14: Unicode Variation Sequences","Iterator over all (codepoint, selector, mapping variant) …","cmap Format 2: High-byte mapping through table","cmap Format 4: Segment mapping to delta values","Iterator over all (codepoint, glyph identifier) pairs in …","cmap Format 6: Trimmed table mapping","cmap Format 8: mixed 16-bit and 32-bit coverage","The different cmap subtable formats.","Part of Cmap13","","Default UVS table","Encoding Record","","","","","","","","","","","","Result of mapping a codepoint with a variation selector.","Non-Default UVS table","…","Used in Cmap8 and Cmap12","Part of Cmap2","","Part of Cmap14","The variation selector should be ignored and the default …","Part of Cmap14","The variant glyph mapped by a codepoint and associated …","Part of Cmap14","","Number of additional values in this range","Number of additional values in this range","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Offset from the start of the Cmap14 subtable to Default UVS","Offset from the start of the Cmap14 subtable to Default UVS","Offset from the start of the Cmap14 subtable to Default UVS","Platform-specific encoding ID.","Platform-specific encoding ID.","","Last character code in this group; same condition as listed","Last character code in this group","Last character code in this group; same condition as listed","Last character code in this group","End characterCode for each segment, last=0xFFFF.","Number of character codes in subrange.","Number of valid low bytes for this SubHeader.","Number of valid low bytes for this SubHeader.","Log2 of the maximum power of 2 less than or equal to …","","","","","","","","First character code of subrange.","First valid low byte for this SubHeader.","First valid low byte for this SubHeader.","","","","","","","","","","Format number is set to 0.","Format number is set to 2.","Format number is set to 4.","Format number is set to 6.","Subtable format; set to 8.","Subtable format; set to 10.","Subtable format; set to 12.","Subtable format; set to 13.","Subtable format. Set to 14.","Format number is set to 0.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Glyph index to be used for all the characters in the …","Glyph ID of the UVS","Glyph index to be used for all the characters in the …","Glyph ID of the UVS","An array that maps character codes to glyph index values.","Glyph index array (arbitrary length)","Array of glyph index values for character codes in the …","Array of glyph indices for the character codes covered","Array of SequentialMapGroup records.","Array of SequentialMapGroup records.","Array of ConstantMapGroup records.","","","","","","","Delta for all character codes in segment.","See text below.","See text below.","See text below.","See text below.","Offsets into glyphIdArray or 0","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","Tightly packed array of bits (8K bytes total) indicating …","","","","","","","","Returns an iterator over all (codepoint, glyph identifier) …","Returns an iterator over all (codepoint, glyph identifier) …","Returns an iterator over all (codepoint, selector, mapping …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","For requirements on use of the language field, see “Use …","This is the length in bytes of the subtable.","This is the length in bytes of the subtable.","This is the length in bytes of the subtable.","This is the length in bytes of the subtable.","Byte length of this subtable (including the header)","Byte length of this subtable (including the header)","Byte length of this subtable (including the header)","Byte length of this subtable (including the header)","Byte length of this subtable (including this header)","Map a codepoint to a nominal glyph identifier","Maps a codepoint to a nominal glyph identifier.","Maps a codepoint to a nominal glyph identifier.","Maps a codepoint and variation selector to a nominal glyph …","Create from a raw scalar.","","","","Offset from the start of the Cmap14 subtable to Non-Default","Offset from the start of the Cmap14 subtable to Non-Default","Offset from the start of the Cmap14 subtable to Non-Default","Number of character codes covered","Number of groupings which follow","Number of groupings which follow","Number of groupings which follow","Number of encoding tables that follow.","Number of Unicode character ranges.","","Number of variation Selector Records","","","","","","","Platform ID.","Platform ID.","segCount times 2, minus searchRange ((segCount * 2) - …","Array of UnicodeRange records.","","","","","","","","","","","","","","","Maximum power of 2 less than or equal to segCount, times 2 …","2 × segCount.","First character code covered","First character code in this group; note that if this …","First character code in this group","First character code in this group; note that if this …","First character code in this group","Start character code for each segment.","Glyph index corresponding to the starting character code","Glyph index corresponding to the starting character code","First value in this range","First value in this range","Array that maps high bytes to subHeaders: value is …","Byte offset from beginning of the Cmap table to the …","Byte offset from beginning of the Cmap table to the …","Byte offset from beginning of the Cmap table to the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Base Unicode value of the UVS","Base Unicode value of the UVS","","Array of VariationSelector records.","Variation selector","Variation selector","Table version number (0).","Affine2x3 record","BaseGlyph record","BaseGlyphList table","BaseGlyphPaint record","","Clip record","ClipBox table","ClipBoxFormat1 record","ClipBoxFormat2 record","ClipList table","","","ColorIndex record","ColorLine table","ColorStop record","COLR (Color) table","","","","CompositeMode enumeration","","","","","","","","","Extend enumeration","","","","","","","","","Layer record","LayerList table","","","","","","Paint tables","PaintColrGlyph table","PaintColrLayers table","PaintComposite table","PaintGlyph table","Unique paint identifier used for detecting cycles in the …","PaintLinearGradient table","PaintRadialGradient table","PaintRotate table","PaintRotateAroundCenter table","PaintScale table","PaintScaleAroundCenter table","PaintScaleUniform table","PaintScaleUniformAroundCenter table","PaintSkew table","PaintSkewAroundCenter table","PaintSolid table","PaintSweepGradient table","PaintTransform table","PaintTranslate table","PaintVarLinearGradient table","PaintVarRadialGradient table","PaintVarRotate table","PaintVarRotateAroundCenter table","PaintVarScale table","PaintVarScaleAroundCenter table","PaintVarScaleUniform table","PaintVarScaleUniformAroundCenter table","PaintVarSkew table","PaintVarSkewAroundCenter table","PaintVarSolid table","PaintVarSweepGradient table","PaintVarTransform table","PaintVarTranslate table","","","","","","","","","","","","","","","","","","","","","","","","VarAffine2x3 record","VarColorIndex record","VarColorLine table","VarColorStop record","","","","","","","","","","","","","","","","Alpha value.","Alpha value. For variation, use varIndexBase + 0.","Alpha value.","Alpha value. For variation, use varIndexBase + 0.","Alpha value.","Alpha value. For variation, use varIndexBase + 1.","Alpha value.","Alpha value. For variation, use varIndexBase + 0.","Alpha value.","Alpha value. For variation, use varIndexBase + 1.","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Rotation angle, 180° in counter-clockwise degrees per 1.0 …","Attempt to resolve backdrop_paint_offset.","Offset to a backdrop Paint table.","Attempt to resolve base_glyph_list_offset.","Offset to BaseGlyphList table.","","Attempt to resolve base_glyph_records_offset.","Offset to baseGlyphRecords array (may be NULL).","","","","","","","","","","","","","","","","","","","","","","","","","Center x coordinate.","Center x coordinate. For variation, use varIndexBase + 0.","x coordinate for the center of scaling.","x coordinate for the center of scaling. For variation, use …","x coordinate for the center of scaling.","x coordinate for the center of scaling. For variation, use …","x coordinate for the center of rotation.","x coordinate for the center of rotation. For variation, use","x coordinate for the center of rotation.","x coordinate for the center of rotation. For variation, use","Center y coordinate.","Center y coordinate. For variation, use varIndexBase + 1.","y coordinate for the center of scaling.","y coordinate for the center of scaling. For variation, use …","y coordinate for the center of scaling.","y coordinate for the center of scaling. For variation, use …","y coordinate for the center of rotation.","y coordinate for the center of rotation. For variation, use","y coordinate for the center of rotation.","y coordinate for the center of rotation. For variation, use","Offset to a ClipBox table, from the beginning of the …","Offset to a ClipBox table, from the beginning of the …","Offset to a ClipBox table, from the beginning of the …","Attempt to resolve clip_list_offset.","Offset to ClipList table (may be NULL).","Clip records. Sorted by startGlyphID.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Attempt to resolve color_line_offset.","Offset to ColorLine table.","Offset to VarColorLine table.","Offset to ColorLine table.","Offset to VarColorLine table.","Offset to ColorLine table.","Offset to VarColorLine table.","","Allows for variations.","A CompositeMode enumeration value.","","","Translation in x direction.","Translation in x direction. For variation, use …","Translation in x direction.","Translation in x direction. For variation, use …","Translation in y direction.","Translation in y direction. For variation, use …","Translation in y direction.","Translation in y direction. For variation, use …","End of the angular range of the gradient, 180° in …","End of the angular range of the gradient, 180° in …","Last glyph ID in the range.","Last glyph ID in the range.","","","","","","","","","An Extend enum value.","An Extend enum value.","Index (base 0) into the LayerList.","Index (base 0) into the layerRecords array.","Index (base 0) into the layerRecords array.","","","","","","","","","","","Set to 1.","Set to 1.","Set to 2.","Set to 1.","Set to 2.","Set to 3.","Set to 4.","Set to 5.","Set to 6.","Set to 7.","Set to 8.","Set to 9.","Set to 10.","Set to 11.","Set to 12.","Set to 13.","Set to 14.","Set to 15.","Set to 16.","Set to 17.","Set to 18.","Set to 19.","Set to 20.","Set to 21.","Set to 22.","Set to 23.","Set to 24.","Set to 25.","Set to 26.","Set to 27.","Set to 28.","Set to 29.","Set to 30.","Set to 31.","Set to 32.","Set to 1.","Set to 1.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Glyph ID for the source outline.","Glyph ID for a BaseGlyphList base glyph.","Glyph ID of the base glyph.","Glyph ID of the glyph used for a given layer.","Glyph ID of the base glyph.","Glyph ID of the base glyph.","Glyph ID of the glyph used for a given layer.","Glyph ID of the base glyph.","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","Attempt to resolve item_variation_store_offset.","Offset to ItemVariationStore (may be NULL).","Attempt to resolve layer_list_offset.","Offset to LayerList table (may be NULL).","Attempt to resolve layer_records_offset.","Offset to layerRecords array (may be NULL).","Create from a raw scalar.","Create from a raw scalar.","","Number of BaseGlyph records; may be 0 in a version 1 table.","Number of Clip records.","Number of Layer records; may be 0 in a version 1 table.","","Number of offsets to paint tables to read from LayerList.","Number of color layers associated with this glyph.","Number of color layers associated with this glyph.","Number of ColorStop records.","Number of ColorStop records.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Attempt to resolve paint_offset.","Offset to a Paint table, from the beginning of the …","Offset to a Paint table.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint subtable.","Offset to a Paint table, from the beginning of the …","Offset to a Paint table, from the beginning of the …","Offsets to Paint tables.","A dynamically resolving wrapper for paint_offsets.","Index for a CPAL palette entry.","Index for a CPAL palette entry.","Index (base 0) for a palette entry in the CPAL table.","Index for a CPAL palette entry.","Index for a CPAL palette entry.","Index for a CPAL palette entry.","Index for a CPAL palette entry.","Index (base 0) for a palette entry in the CPAL table.","Index for a CPAL palette entry.","Index for a CPAL palette entry.","Index for a CPAL palette entry.","Index for a CPAL palette entry.","","","","","","","","","Start circle radius.","Start circle radius. For variation, use varIndexBase + 2.","End circle radius.","End circle radius. For variation, use varIndexBase + 5.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Scale factor in x and y directions.","Scale factor in x and y directions. For variation, use …","Scale factor in x and y directions.","Scale factor in x and y directions. For variation, use …","Scale factor in x direction.","Scale factor in x direction. For variation, use …","Scale factor in x direction.","Scale factor in x direction. For variation, use …","Scale factor in y direction.","Scale factor in y direction. For variation, use …","Scale factor in y direction.","Scale factor in y direction. For variation, use …","Attempt to resolve source_paint_offset.","Offset to a source Paint table.","Start of the angular range of the gradient, 180° in …","Start of the angular range of the gradient, 180° in …","First glyph ID in the range.","First glyph ID in the range.","Position on a color line.","Position on a color line. For variation, use varIndexBase …","Position on a color line.","Position on a color line. For variation, use varIndexBase …","","","","","","","","","","","","","","","Attempt to resolve transform_offset.","Attempt to resolve transform_offset.","Offset to an Affine2x3 table.","Offset to a VarAffine2x3 table.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the COLRv0 base glyph for the given glyph …","Returns the COLRv0 layer at the given index.","Returns the COLRv1 base glyph for the given glyph …","Returns the COLRv1 clip box for the given glyph identifier.","Returns the COLRv1 layer at the given index.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Base index into DeltaSetIndexMap.","Attempt to resolve var_index_map_offset.","Offset to DeltaSetIndexMap table (may be NULL).","Table version number - set to 0 or 1.","Start point (p₀) x coordinate.","Start point (p₀) x coordinate. For variation, use …","Start circle center x coordinate.","Start circle center x coordinate. For variation, use …","End point (p₁) x coordinate.","End point (p₁) x coordinate. For variation, use …","End circle center x coordinate.","End circle center x coordinate. For variation, use …","Rotation point (p₂) x coordinate.","Rotation point (p₂) x coordinate. For variation, use …","Maximum x of clip box.","Maximum x of clip box. For variation, use varIndexBase + 2.","Maximum x of clip box.","Minimum x of clip box.","Minimum x of clip box. For variation, use varIndexBase + 0.","Minimum x of clip box.","Angle of skew in the direction of the x-axis, 180° in …","Angle of skew in the direction of the x-axis, 180° ┬░ …","Angle of skew in the direction of the x-axis, 180° in …","Angle of skew in the direction of the x-axis, 180° in …","x-component of transformed x-basis vector.","x-component of transformed x-basis vector. For variation, …","x-component of transformed y-basis vector.","x-component of transformed y-basis vector. For variation, …","Start point (p₀) y coordinate.","Start point (p₀) y coordinate. For variation, use …","Start circle center y coordinate.","Start circle center y coordinate. For variation, use …","End point (p₁) y coordinate.","End point (p₁) y coordinate. For variation, use …","End circle center y coordinate.","End circle center y coordinate. For variation, use …","Rotation point (p₂) y coordinate.","Rotation point (p₂) y coordinate. For variation, use …","Maximum y of clip box.","Maximum y of clip box. For variation, use varIndexBase + 3.","Maximum y of clip box.","Minimum y of clip box.","Minimum y of clip box. For variation, use varIndexBase + 1.","Minimum y of clip box.","Angle of skew in the direction of the y-axis, 180° in …","Angle of skew in the direction of the y-axis, 180° in …","Angle of skew in the direction of the y-axis, 180° in …","Angle of skew in the direction of the y-axis, 180° in …","y-component of transformed x-basis vector.","y-component of transformed x-basis vector. For variation, …","y-component of transformed y-basis vector.","y-component of transformed y-basis vector. For variation, …","CPAL (Color Record) record","CPAL (Color Palette Table) table","The PaletteType flags.","Bit 1: palette is appropriate to use when displaying the …","Bit 0: palette is appropriate to use when displaying the …","Returns the set containing all flags.","Alpha value (B3).","Alpha value (B3).","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","Blue value (B0).","Blue value (B0).","","","","","","","","","","","Index of each palette’s first color record in the …","Attempt to resolve color_records_array_offset.","Offset from the beginning of CPAL table to the first …","Returns true if all of the flags in other are contained …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","Green value (B1).","Green value (B1).","","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Returns true if no flags are currently stored.","","","Returns the complement of this set of flags.","Total number of color records, combined for all palettes.","Number of palette entries in each palette.","Number of palettes in the table.","Attempt to resolve palette_entry_labels_array_offset.","Offset from the beginning of CPAL table to the Palette …","Attempt to resolve palette_labels_array_offset.","Offset from the beginning of CPAL table to the Palette …","Attempt to resolve palette_types_array_offset.","Offset from the beginning of CPAL table to the Palette …","","","","Red value (B2).","Red value (B2).","Removes the specified flags in-place.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","","Toggles the specified flags in-place.","","","","","","","Returns the union of between the flags in self and other.","Table version number (=0).","The cvar table.","Delta for an entry in the control value table.","Variation data specialized for the CVT variation table.","Applies a tuple scalar to this delta.","","","","","Attempt to resolve data_offset.","Offset from the start of the ‘cvar’ table to the …","Computes the accumulated deltas for the given set of …","","","Returns the argument unchanged.","Calls U::from(self).","","","The index in the CVT.","","","","","A packed field. The high 4 bits are flags, and the low 12 …","Array of tuple variation headers.","","The delta to apply to the value in the CVT.","Returns the variation data containing the tuples and …","Major/minor version number of the CVT variations table — …","The Embedded Bitmap Data table","","Major version of the EBDT table, = 2.","Minor version of EBDT table, = 0.","","The Embedded Bitmap Location table","BitmapSize records array.","Major version of the EBLC table, = 2.","Minor version of EBLC table, = 0.","Number of BitmapSize records.","","Shim table to handle combined axis and instance arrays.","The fvar (Font Variations) table","The InstanceRecord","The VariationAxisRecord","Returns the array of variation axis records.","Variation axis record array.","The number of variation axes in the font (the number of …","Attempt to resolve axis_instance_arrays_offset.","Offset in bytes from the beginning of the table to the …","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","The size in bytes of each VariationAxisRecord — set to …","Tag identifying the design variation for the axis.","Tag identifying the design variation for the axis.","","","","","","","","","","","The coordinates array for this instance.","The default coordinate value for the axis.","The default coordinate value for the axis.","","Axis qualifiers — see details below.","Axis qualifiers — see details below.","Reserved for future use — set to 0.","","","Returns the argument unchanged.","Returns the argument unchanged.","","The number of named instances defined in the font (the …","The size in bytes of each InstanceRecord — set to either …","Returns the array of instance records.","Instance record array.","Calls U::from(self).","Calls U::from(self).","","The maximum coordinate value for the axis.","The maximum coordinate value for the axis.","The minimum coordinate value for the axis.","The minimum coordinate value for the axis.","Returns a normalized coordinate for the given value.","","Optional. The name ID for entries in the ‘name’ table …","","A constructor that requires additional arguments.","Parse an instance record with a known axis_count and …","","","The name ID for entries in the ‘name’ table that …","","","","","","","","","Major version number of the font variations table — set …","Use grayscale rendering","Use gridfitting","Use gridfitting with ClearType symmetric smoothing Only …","Use smoothing along multiple axes with ClearType® Only …","gasp","","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","Returns true if all of the flags in other are contained …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","Sorted by ppem","","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Returns true if no flags are currently stored.","","","Returns the complement of this set of flags.","Number of records to follow","","","Flags describing desired rasterizer behavior.","Flags describing desired rasterizer behavior.","Upper limit of range, in PPEM","Upper limit of range, in PPEM","","Removes the specified flags in-place.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","","Toggles the specified flags in-place.","","","","","","","Returns the union of between the flags in self and other.","Version number (set to 1)","Attachment Point List Table","Part of AttachList","","Caret Value Tables","CaretValue Format 1","CaretValue Format 2","CaretValue Format 3","","","","","","","","","","","","GDEF 1.0","Used in the Glyph Class Definition Table","Ligature Caret List Table","Ligature Glyph Table","","","","","Mark Glyph Sets Table","","","Attempt to resolve attach_list_offset.","Offset to attachment point list table, from beginning of …","Array of offsets to AttachPoint tables-from beginning of …","A dynamically resolving wrapper for attach_point_offsets.","","","","","Number of CaretValue tables for this ligature (components …","Format identifier: format = 1","Format identifier: format = 2","Format identifier-format = 3","Format identifier: format = 1","Array of offsets to CaretValue tables, from beginning of …","Contour point index on glyph","A dynamically resolving wrapper for caret_value_offsets.","","","","","","X or Y value, in design units","X or Y value, in design units","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Offset to Coverage table - from beginning of AttachList …","Offset to Coverage table - from beginning of LigCaretList …","Array of offsets to mark glyph set coverage tables, from …","A dynamically resolving wrapper for coverage_offsets.","","Attempt to resolve device_offset.","Offset to Device table (non-variable font) / Variation …","","","Format identifier == 1","Returns the argument unchanged.","Returns the argument unchanged.","","Attempt to resolve glyph_class_def_offset.","Offset to class definition table for glyph type, from …","Number of glyphs with attachment points","","Calls U::from(self).","Calls U::from(self).","Attempt to resolve item_var_store_offset.","Offset to the Item Variation Store table, from beginning of","Attempt to resolve lig_caret_list_offset.","Offset to ligature caret list table, from beginning of GDEF","Number of ligature glyphs","Array of offsets to LigGlyph tables, from beginning of …","A dynamically resolving wrapper for lig_glyph_offsets.","Attempt to resolve mark_attach_class_def_offset.","Offset to class definition table for mark attachment type, …","Number of mark glyph sets defined","Attempt to resolve mark_glyph_sets_def_offset.","Offset to the table of mark glyph set definitions, from …","Create from a raw scalar.","","Number of attachment points on this glyph","Array of contour point indices -in increasing numerical …","","","","","","","","","","","","","","","","","","","","","The major/minor version of the GDEF table","Bit 1: If this is set, the arguments are signed xy values; …","Bit 0: If this is set, the arguments are 16-bit (uint16 or …","Anchor position for a composite component.","A reference to another glyph. Part of CompositeGlyph.","","CompositeGlyph","Flags used in CompositeGlyph","Contour end point at this index was less than its …","Point with an associated on-curve flag in a simple glyph.","Expected a cubic off-curve point at this index.","Expected a quadratic off-curve point at this index.","Expected a quadratic off-curve or on-curve point at this …","If the first point is off-curve, check if the last is …","The glyf (Glyph Data) table","Simple or composite glyph.","Marker for points that have an explicit delta in a glyph …","If the first point is off-curve, check if the second is …","Bit 5: Indicates at least one more glyph after this one.","Bit 0: If set, the point is on the curve; otherwise, it is …","Bit 10: If set, the components of the compound glyph …","Bit 6: If set, contours in the glyph description may …","","","Trait for types that are usable for TrueType point …","Expected number of points to == number of flags","Flags describing the properties of a point.","Marker bits for point flags that are set during variation …","Bit 3: If set, the next byte (read as unsigned) specifies …","Bit 2: If set and ARGS_ARE_XY_VALUES is also set, the xy …","Bit 11: The composite is designed to have the component …","","The Glyph Header","Flags used in SimpleGlyph","Marker that signifies that the both coordinates of a point …","Marker that signifies that the x coordinate of a point has …","Marker that signifies that the y coordinate of a point has …","Errors that can occur when converting an outline to a path.","The order to process points in a glyf point stream is …","Transform for a composite component.","Bit 12: The composite is designed not to have the component","Bit 9: If set, this forces the aw and lsb (and rsb) for the","Bit 6: The x direction will use a different scale from the …","Bit 3: This indicates that there is a simple scale for the …","Bit 7: There is a 2 by 2 transformation that will be used …","Bit 8: Following the last component are instructions for …","Bit 4: This flag has two meanings, depending on how the …","Bit 1: If set, the corresponding x-coordinate is 1 byte …","Bit 5: This flag has two meanings, depending on how the …","Bit 2: If set, the corresponding y-coordinate is 1 byte …","Returns the set containing all flags.","Returns the set containing all flags.","Anchor for component placement.","Returns the intersection between the two sets of flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Returns the union of the two sets of flags.","Adds the set of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Returns the left flags, but with all the right flags …","Toggles the set of flags.","Toggles the set of flags.","","","","","","","","","","","","","","","","","","","","","","","TrueType hinting bytecode.","Clears the given marker for this point.","Disables the on curve flag.","","","","","","","","","","","","","","","","","","","","","","","","","component flag glyph index of component","Returns an iterator that yields the glyph identifier and …","Returns an iterator over the components of the composite …","Compute the flags that describe this transform","Compute the flags that describe this anchor","Returns true if all of the flags in other are contained …","Returns true if all of the flags in other are contained …","Returns the component count and TrueType interpreter …","","","","","","","Returns the difference between the flags in self and other.","Returns the difference between the flags in self and other.","Returns an empty set of flags.","Returns an empty set of flags.","Array of point indices for the last point of each contour, …","","","","","","","","","Component flags.","Flips the state of the on curve flag.","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, unless that …","Creates a point flag from the given bits. These are …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, dropping any …","","","","","Glyph identifier.","the raw data for flags & x/y coordinates","Returns true if the given marker is set for this point.","Returns true if the contours in the simple glyph may …","","","Inserts the specified flags in-place.","Inserts the specified flags in-place.","Total number of bytes for instructions. If …","Array of instruction byte code for the glyph.","Returns the TrueType interpreter instructions.","Returns the intersection between the flags in self and …","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if no flags are currently stored.","Returns true if no flags are currently stored.","","Returns true if this is an off curve cubic point.","Returns true if this is an off curve quadratic point.","Returns true if this is an on curve point.","","","","","Construct a new CurvePoint","Returns the complement of this set of flags.","Returns the complement of this set of flags.","Returns the total number of points.","If the number of contours is greater than or equal to zero,","If the number of contours is greater than or equal to zero,","If the number of contours is greater than or equal to zero,","Convenience method to construct an off-curve point","Creates a new off curve cubic point flag.","Creates a new off curve quadratic point flag.","Creates a new on curve point flag.","Convenience method to construct an on-curve point","True if this is an on-curve point.","","","Returns an iterator over the points in the glyph.","","","","","Reads points and flags into the provided buffers.","","Removes the specified flags in-place.","Removes the specified flags in-place.","Applies the given marker to this point.","Enables the on curve flag.","Returns the set difference of the two sets of flags.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Disables all flags enabled in the set.","","","","","","","","","","","","","Converts a glyf outline described by points, flags and …","","","","Toggles the specified flags in-place.","Toggles the specified flags in-place.","Component transformation matrix.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","Returns the union of between the flags in self and other.","X cooordinate.","Maximum x for coordinate data.","Maximum x for coordinate data.","Maximum x for coordinate data.","Minimum x for coordinate data.","Minimum x for coordinate data.","Minimum x for coordinate data.","X scale factor.","XY skew factor.","Y cooordinate.","Maximum y for coordinate data.","Maximum y for coordinate data.","Maximum y for coordinate data.","Minimum y for coordinate data.","Minimum y for coordinate data.","Minimum y for coordinate data.","YX skew factor.","Y scale factor.","","","","","","","","","","","","","","","","","","","","","","","","","","","An error returned by Decoder::decode if the end of the …","Decodes instructions from TrueType bytecode.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Sequence of instruction operands that are encoded directly …","Decoded TrueType instruction.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Operation code for a TrueType instruction.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bytecode for the program.","","","","","","","","","","","","Decodes the next instruction.","Returns an iterator that yields all instructions in the …","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates an opcode from the given byte.","","Instruction operands that were decoded from the bytecode.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if there are no operands.","Returns true if this is an instruction that pushes values …","Returns the number of operands.","Returns a more descriptive name for the opcode.","Creates a new decoder for the given bytecode and program …","Operation code.","","The “program counter” or current offset into the …","Program counter – offset into the bytecode where this …","","","","","","","","","","","","","","","","","","","","","","","","Returns an iterator over the operand values.","A mask with all the device/variation index bits set","Anchor Table Format 1: Design Units","Anchor Table Format 2: Design Units Plus Contour Point","Anchor Table Format 3: Design Units Plus Device or …","Anchor Tables position one glyph with respect to another.","Part of MarkBasePosFormat1","Part of BaseArray","","","","Part of PairPosFormat2","Part of PairPosFormat2","reexport stuff from layout that we use","Part of MarkLigPosFormat1","","","","reexport stuff from layout that we use","","","","Cursive Attachment Positioning Format 1: Cursvie attachment","reexport stuff from layout that we use","reexport stuff from layout that we use","Part of CursivePosFormat1","","Extension Positioning Subtable Format 1","A GPOS Extension Positioning subtable","reexport stuff from layout that we use","reexport stuff from layout that we use","","","","","","","","","","","","","","Class Definition Table Format 1 GPOS Version 1.0","Part of MarkLigPosFormat1","Part of MarkLigPosFormat1","reexport stuff from layout that we use","Part of MarkMarkPosFormat1Class2Record","Part of MarkMarkPosFormat1","Mark Array Table","Mark-to-Base Attachment Positioning Format 1: Mark-to-base …","Mark-to-Ligature Positioning Format 1: Mark-to-Ligature …","Mark-to-Mark Attachment Positioning Format 1: Mark-to-Mark …","Part of MarkArray","","","","","","","","","","","","","Lookup Type 1: Single Adjustment Positioning Subtable","Pair Adjustment Positioning Format 1: Adjustments for …","Pair Adjustment Positioning Format 2: Class Pair Adjustment","Part of PairPosFormat1","Part of PairSet","A GPOS ChainedSequenceContext","A GPOS Lookup subtable.","A typed GPOS LookupList table","A GPOS SequenceContext","The subtables from a GPOS lookup.","reexport stuff from layout that we use","","","","Lookup Type 1: Single Adjustment Positioning Subtable","Single Adjustment Positioning Format 1: Single Positioning …","Single Adjustment Positioning Format 2: Array of …","See ValueRecord","A Positioning ValueRecord.","Includes horizontal adjustment for advance","Includes Device table (non-variable font) / VariationIndex …","Includes horizontal adjustment for placement","Includes Device table (non-variable font) / VariationIndex …","Includes vertical adjustment for advance","Includes Device table (non-variable font) / VariationIndex …","Includes vertical adjustment for placement","Includes Device table (non-variable font) / VariationIndex …","Returns the set containing all flags.","Format identifier, = 1","Format identifier, = 2","Format identifier, = 3","Format identifier, = 1","Index to glyph contour point","Array of offsets (one per mark class) to Anchor tables. …","Array of offsets (one per mark class) to Anchor tables. …","Array of offsets (one per mark class) to Anchor tables. …","Attempt to resolve base_array_offset.","Offset to BaseArray table, from beginning of MarkBasePos …","Number of BaseRecords","Attempt to resolve base_coverage_offset.","Offset to baseCoverage table, from beginning of MarkBasePos","Array of BaseRecords, in order of baseCoverage Index.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Number of classes in classDef1 table — includes Class 0.","Array of Class1 records, ordered by classes in classDef1.","Number of classes in classDef2 table — includes Class 0.","Array of Class2 records, ordered by classes in classDef2.","Array of Class2 records, ordered by classes in classDef2.","Attempt to resolve class_def1_offset.","Offset to ClassDef table, from beginning of PairPos …","Attempt to resolve class_def2_offset.","Offset to ClassDef table, from beginning of PairPos …","","","","","","","","","","","","","","","","","","","","","","","","","","","","Number of ComponentRecords in this ligature","Array of Component records, ordered in writing direction.","","","","","","","","Returns true if all of the flags in other are contained …","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Offset to Coverage table, from beginning of SinglePos …","Offset to Coverage table, from beginning of SinglePos …","Offset to Coverage table, from beginning of PairPos …","Offset to Coverage table, from beginning of PairPos …","Offset to Coverage table, from beginning of CursivePos …","Offset to Coverage table, from beginning of SinglePos …","Offset to Coverage table, from beginning of PairPos …","","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","Offset to entryAnchor table, from beginning of CursivePos …","Offset to entryAnchor table, from beginning of CursivePos …","Offset to entryAnchor table, from beginning of CursivePos …","Number of EntryExit records","Array of EntryExit records, in Coverage index order.","","","Offset to exitAnchor table, from beginning of CursivePos …","Offset to exitAnchor table, from beginning of CursivePos …","Offset to exitAnchor table, from beginning of CursivePos …","","Attempt to resolve extension_offset.","Lookup type of subtable referenced by extensionOffset …","Offset to the extension subtable, of lookup type …","Attempt to resolve feature_list_offset.","Offset to FeatureList table, from beginning of GPOS table","Attempt to resolve feature_variations_offset.","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if no flags are currently stored.","","","","Array of offsets (one per class) to Anchor tables. Offsets …","Array of offsets (one per class) to Anchor tables. Offsets …","Array of offsets (one per class) to Anchor tables. Offsets …","Attempt to resolve ligature_array_offset.","Offset to LigatureArray table, from beginning of MarkLigPos","Array of offsets to LigatureAttach tables. Offsets are from","A dynamically resolving wrapper for ligature_attach_offsets…","Number of LigatureAttach table offsets","Attempt to resolve ligature_coverage_offset.","Offset to ligatureCoverage table, from beginning of …","","Attempt to resolve lookup_list_offset.","Offset to LookupList table, from beginning of GPOS table","Different enumerations for GSUB and GPOS","Attempt to resolve mark1_array_offset.","Offset to MarkArray table for mark1, from beginning of …","Attempt to resolve mark1_coverage_offset.","Offset to Combining Mark Coverage table, from beginning of …","Array of offsets (one per class) to Anchor tables. Offsets …","Array of offsets (one per class) to Anchor tables. Offsets …","Array of offsets (one per class) to Anchor tables. Offsets …","Attempt to resolve mark2_array_offset.","Offset to Mark2Array table for mark2, from beginning of …","Number of Mark2 records","Attempt to resolve mark2_coverage_offset.","Offset to Base Mark Coverage table, from beginning of …","Array of Mark2Records, in Coverage order.","Offset to Anchor table, from beginning of MarkArray table.","Offset to Anchor table, from beginning of MarkArray table.","Offset to Anchor table, from beginning of MarkArray table.","Attempt to resolve mark_array_offset.","Attempt to resolve mark_array_offset.","Offset to MarkArray table, from beginning of MarkBasePos …","Offset to MarkArray table, from beginning of MarkLigPos …","Class defined for the associated mark.","Class defined for the associated mark.","Number of classes defined for marks","Number of defined mark classes","Number of Combining Mark classes defined","Number of MarkRecords","Attempt to resolve mark_coverage_offset.","Attempt to resolve mark_coverage_offset.","Offset to markCoverage table, from beginning of MarkBasePos","Offset to markCoverage table, from beginning of MarkLigPos …","","Array of MarkRecords, ordered by corresponding glyphs in …","Returns the complement of this set of flags.","Number of PairSet tables","Array of offsets to PairSet tables. Offsets are from …","A dynamically resolving wrapper for pair_set_offsets.","Number of PairValueRecords","Array of PairValueRecords, ordered by glyph ID of the …","","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","","","","","","","","","","","A constructor that requires additional arguments.","","","","A constructor that requires additional arguments.","","A constructor that requires additional arguments.","A constructor that requires additional arguments.","","A constructor that requires additional arguments.","","","","","","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","A constructor that requires additional arguments.","","","","","","","","","","","","","","","","","","Return the number of bytes required to store a ValueRecord …","Removes the specified flags in-place.","Attempt to resolve script_list_offset.","Offset to ScriptList table, from beginning of GPOS table","Glyph ID of second glyph in the pair (first glyph is …","Glyph ID of second glyph in the pair (first glyph is …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Return the subtables for this lookup.","","","","","","","","","","","","","","","Toggles the specified flags in-place.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","Number of ValueRecords — must equal glyphCount in the …","Defines the types of data in the ValueRecord.","Defines the types of data in the ValueRecords.","Defines the types of data in the ValueRecord.","Defines the types of data in valueRecord1 — for the first","ValueRecord definition — for the first glyph of the pair …","Defines the types of data in valueRecord1 — for the first","Defines the types of data in valueRecord2 — for the …","ValueRecord definition — for the second glyph of the pair","Defines the types of data in valueRecord2 — for the …","Defines positioning value(s) — applied to all glyphs in …","Positioning data for the first glyph in the pair.","Positioning for first glyph — empty if valueFormat1 = 0.","Positioning data for the first glyph in the pair.","Positioning for first glyph — empty if valueFormat1 = 0.","Positioning data for the second glyph in the pair.","Positioning for second glyph — empty if valueFormat2 = 0.","Positioning data for the second glyph in the pair.","Positioning for second glyph — empty if valueFormat2 = 0.","Array of ValueRecords — positioning values applied to …","The major and minor version of the GPOS table, as a tuple …","","","","","Horizontal value, in design units","Horizontal value, in design units","Horizontal value, in design units","Horizontal value, in design units","Attempt to resolve x_device_offset.","Attempt to resolve the Device or VariationIndex table for …","Offset to Device table (non-variable font) / VariationIndex","","","","","","","","","Vertical value, in design units","Vertical value, in design units","Vertical value, in design units","Vertical value, in design units","Attempt to resolve y_device_offset.","Attempt to resolve the Device or VariationIndex table for …","Offset to Device table (non-variable font) / VariationIndex","","","","","","","","Part of AlternateSubstFormat1","Alternate Substitution Format 1","","","","","","","","","","","","Extension Substitution Subtable Format 1","A GSUB Extension Substitution subtable","","","","","","","","","","","GSUB","Part of LigatureSubstFormat1","","","","Part of LigatureSubstFormat1","Ligature Substitution Format 1","","","","","","Multiple Substitution Format 1","","","","Reverse Chaining Contextual Single Substitution Format 1","","Part of MultipleSubstFormat1","","","","","LookupType 1: Single Substitution Subtable","Single Substitution Format 1","Single Substitution Format 2","A GSUB ChainedSequenceContext","A GSUB Lookup subtable.","A typed GSUB LookupList table","A GSUB SequenceContext","The subtables from a GPOS lookup.","Array of alternate glyph IDs, in arbitrary order","Number of AlternateSet tables","Array of offsets to AlternateSet tables. Offsets are from …","A dynamically resolving wrapper for alternate_set_offsets.","Array of offsets to coverage tables in backtrack sequence, …","A dynamically resolving wrapper for …","Number of glyphs in the backtrack sequence.","","","","","","","","","","","Number of components in the ligature","Array of component glyph IDs — start with the second …","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of substitution …","Offset to Coverage table, from beginning of substitution …","Add to original glyph ID to get substitute glyph ID","","Attempt to resolve extension_offset.","Lookup type of subtable referenced by extensionOffset …","Offset to the extension subtable, of lookup type …","Attempt to resolve feature_list_offset.","Offset to FeatureList table, from beginning of GSUB table","Attempt to resolve feature_variations_offset.","Offset to FeatureVariations table, from beginning of the …","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Number of glyph IDs in the substituteGlyphIDs array","Number of glyph IDs in the substituteGlyphIDs array. This …","Number of glyph IDs in the alternateGlyphIDs array","Number of glyph IDs in the substituteGlyphIDs array.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Number of Ligature tables","glyph ID of ligature to substitute","Array of offsets to Ligature tables. Offsets are from …","Number of LigatureSet tables","Array of offsets to LigatureSet tables. Offsets are from …","A dynamically resolving wrapper for ligature_set_offsets.","A dynamically resolving wrapper for ligature_offsets.","Array of offsets to coverage tables in lookahead sequence, …","A dynamically resolving wrapper for …","Number of glyphs in lookahead sequence.","","Attempt to resolve lookup_list_offset.","Offset to LookupList table, from beginning of GSUB table","Different enumerations for GSUB and GPOS","","","","","","","","","","","","","","","","","","","","Attempt to resolve script_list_offset.","Offset to ScriptList table, from beginning of GSUB table","Number of Sequence table offsets in the sequenceOffsets …","Array of offsets to Sequence tables. Offsets are from …","A dynamically resolving wrapper for sequence_offsets.","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 1","Format identifier: format = 1","Format identifier: format = 1","Format identifier. Set to 1.","Format identifier: format = 1","Format identifier: format = 1","Array of substitute glyph IDs — ordered by Coverage index","String of glyph IDs to substitute","Array of substitute glyph IDs — ordered by Coverage …","Return the subtables for this lookup.","","","","","","","","","","","","","","The major and minor version of the GSUB table, as a tuple …","Delta information for a single point or component in a …","Variation data specialized for the glyph variations table.","The GlyphVariationData table","The ‘gvar’ header","","If set, offsets to GlyphVariationData are 32 bits","Array of tuple records shared across all glyph variation …","","Returns the set containing all flags.","Applies a tuple scalar to this delta.","The number of variation axes for this font. This must be …","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","Returns true if all of the flags in other are contained …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","Bit-field that gives the format of the offset array that …","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","","The number of glyphs in this font. This must match the …","Get the variation data for a specific glyph.","Offset from the start of this table to the array of …","Offsets from the start of the GlyphVariationData array to …","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if no flags are currently stored.","","","","Returns the complement of this set of flags.","","The point or component index.","","A constructor that requires additional arguments.","","","","Removes the specified flags in-place.","Attempt to resolve serialized_data_offset.","Offset from the start of the GlyphVariationData table to …","The number of shared tuple records. Shared tuple records …","Attempt to resolve shared_tuples_offset.","Offset from the start of this table to the shared tuple …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","","","Toggles the specified flags in-place.","","","","","","","A packed field. The high 4 bits are flags, and the low 12 …","Array of tuple variation headers.","","","","","Returns the union of between the flags in self and other.","Major/minor version number of the glyph variations table …","The x delta.","The y delta.","Bit 0: Bold (if set to 1)","Bit 5: Condensed (if set to 1)","Bit 6: Extended (if set to 1)","The head (font header) table.","Bit 1: Italic (if set to 1)","The macStyle field for the head table.","Bit 3: Outline (if set to 1)","Bit 4: Shadow (if set to 1)","Bit 2: Underline (if set to 1)","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","To compute: set it to 0, sum the entire font as uint32, …","","","","Returns true if all of the flags in other are contained …","Number of seconds since 12:00 midnight that started …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","See the flags enum","","","","","","Deprecated (Set to 2).","Set by font manufacturer.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","0 for current format.","","0 for short offsets (Offset16), 1 for long (Offset32).","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Returns true if no flags are currently stored.","","Smallest readable size in pixels.","see somewhere else","Set to 0x5F0F3CF5.","Number of seconds since 12:00 midnight that started …","Returns the complement of this set of flags.","","","Removes the specified flags in-place.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","Toggles the specified flags in-place.","","","","Returns the union of between the flags in self and other.","Set to a value from 16 to 16384. Any value in this range is","Version number of the font header table, set to (1, 0)","Maximum x coordinate across all glyph bounding boxes.","Minimum x coordinate across all glyph bounding boxes.","Maximum y coordinate across all glyph bounding boxes.","Minimum y coordinate across all glyph bounding boxes.","hhea Horizontal Header Table","Maximum advance width value in ‘hmtx’ table.","Typographic ascent.","The amount by which a slanted highlight on a glyph needs …","Used to calculate the slope of the cursor (rise/run); 1 for","0 for vertical caret, 1 for horizontal.","Typographic descent.","Typographic line gap. Negative LineGap values are treated …","0 for current format.","Minimum left sidebearing value in ‘hmtx’ table for …","Minimum right sidebearing value; calculated as min(aw - …","Number of LongMetric entries in ‘hmtx’/‘vmtx’ table","","The major/minor version (1, 0)","Max(lsb + (xMax-xMin))","The hmtx (Horizontal Metrics) table","","Returns the advance width for the given glyph identifier.","Advance width/height, in font design units.","Advance width/height, in font design units.","","","","","","","","Returns the argument unchanged.","Paired advance width/height and left/top side bearing …","","Calls U::from(self).","","Leading (left/top) side bearings for glyph IDs greater …","","A constructor that requires additional arguments.","","Returns the left side bearing for the given glyph …","Glyph leading (left/top) side bearing, in font design …","Glyph leading (left/top) side bearing, in font design …","","","","","The HVAR (Horizontal Metrics Variations) table","Returns the advance width delta for the specified glyph …","Attempt to resolve advance_width_mapping_offset.","Offset in bytes from the start of this table to the …","Attempt to resolve item_variation_store_offset.","Offset in bytes from the start of this table to the item …","Returns the left side bearing delta for the specified …","Attempt to resolve lsb_mapping_offset.","Offset in bytes from the start of this table to the …","","Returns the left side bearing delta for the specified …","Attempt to resolve rsb_mapping_offset.","Offset in bytes from the start of this table to the …","Major version number of the horizontal metrics variations …","Part of ChainedSequenceContextFormat2","Part of ChainedSequenceContextFormat2","","Chained Sequence Context Format 1","Chained Sequence Context Format 2","Chained Sequence Context Format 3","Part of ChainedSequenceContextFormat1","Part of ChainedSequenceContextFormat1","","featureParams for ‘cv01’-‘cv99’","A Class Definition Table","Class Definition Table Format 1","Class Definition Table Format 2","Used in ClassDefFormat2","Part of SequenceContextFormat2","Part of SequenceContextFormat2","Condition Table Format 1: Font Variation Axis Range","ConditionSet Table","Coverage Format 1","Coverage Format 2","Coverage Table","Device delta formats","Device Table","","Either a Device table (in a non-variable font) or a …","","A trait that abstracts the behaviour of an extension …","Feature Table","Feature List Table","An enum for different possible tables referenced by …","Part of FeatureList","FeatureTableSubstitution Table","Used in FeatureTableSubstitution","Part of FeatureVariations","FeatureVariations Table","","","","","","","","","","","If set, skips over base glyphs","If set, skips over ligatures","If set, skips over all combining marks","Language System Table","","Signed 2-bit value, 8 values per uint16","Signed 4-bit value, 4 values per uint16","Signed 8-bit value, 2 values per uint16","Lookup Table","The LookupFlag bit enumeration.","Lookup List Table","This bit relates only to the correct processing of GPOS …","Used in CoverageFormat2","Script Table","Script List Table","Script Record","","Sequence Context Format 1","Sequence Context Format 2","Sequence Context Format 3","Sequence Lookup Record","Part of SequenceContextFormat1","Part of SequenceContextFormat1","","","","","","an array of subtables, maybe behind extension lookups","If set, indicates that the lookup table structure is …","Variation index table","VariationIndex table, contains a delta-set index pair.","","","Offset to an alternate feature table, from start of the …","Offset to an alternate feature table, from start of the …","Index (zero-based) for the variation axis within the ‘…","Attempt to resolve backtrack_class_def_offset.","Offset to ClassDef table containing backtrack sequence …","Array of offsets to coverage tables for the backtrack …","A dynamically resolving wrapper for …","Number of glyphs in the backtrack sequence","Number of glyphs in the backtrack sequence","Number of glyphs in the backtrack sequence","Array of backtrack glyph IDs","Array of backtrack-sequence classes","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Number of ChainedClassSequenceRule tables","Array of offsets to ChainedClassSequenceRule tables, from …","Number of ChainedClassSequenceRuleSet tables","Array of offsets to ChainedClassSequenceRuleSet tables, …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for …","Number of ChainedSequenceRule tables","Array of offsets to ChainedSequenceRule tables, from …","Number of ChainedSequenceRuleSet tables","Array of offsets to ChainedSeqRuleSet tables, from …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for …","The count of characters for which this feature provides …","The Unicode Scalar Value of the characters for which this …","Applied to all glyphs in the range","Applied to all glyphs in the range","Attempt to resolve class_def_offset.","Offset to ClassDef table, from beginning of …","Format identifier — format = 1","Format identifier — format = 2","Format identifier — format = 1","Number of ClassRangeRecords","Array of ClassRangeRecords — ordered by startGlyphID","Number of ClassSequenceRule tables","Array of offsets to ClassSequenceRule tables, from …","Number of ClassSequenceRuleSet tables","Array of offsets to ClassSequenceRuleSet tables, from …","A dynamically resolving wrapper for …","A dynamically resolving wrapper for class_seq_rule_offsets.","Array of Class Values — one per glyph ID","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Number of conditions for this condition set.","Array of offsets to condition tables, from beginning of the","Offset to a condition set table, from beginning of …","Offset to a condition set table, from beginning of …","Offset to a condition set table, from beginning of …","A dynamically resolving wrapper for condition_offsets.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Attempt to resolve coverage_offset.","Format identifier — format = 1","Format identifier — format = 2","Format identifier — format = 1","Offset to Coverage table, from beginning of …","Offset to Coverage table, from beginning of …","Offset to Coverage table, from beginning of …","Offset to Coverage table, from beginning of …","Array of offsets to Coverage tables, from beginning of …","A dynamically resolving wrapper for coverage_offsets.","","","Attempt to resolve default_lang_sys_offset.","Offset to default LangSys table, from beginning of Script …","Format of deltaValue array data: 0x0001, 0x0002, or 0x0003","Format, = 0x8000","A delta-set inner index — used to select a delta-set row …","A delta-set outer index — used to select an item …","Array of compressed data","The first value represents the design size in 720/inch …","Return new, empty flags","Last glyph ID in the range","Last glyph ID in the range","Last glyph ID in the range","Last glyph ID in the range","Largest size to correct, in ppem","","","","","","","The ‘name’ table name ID that specifies a string (or …","The ‘name’ table name ID that specifies a string (or …","Offset to Feature table, from beginning of FeatureList","Number of FeatureRecords in this table","The feature table index to match.","The feature table index to match.","Number of feature index values for this language system —","Array of indices into the FeatureList, in arbitrary order","Offset to Feature table, from beginning of FeatureList","Offset to Feature table, from beginning of FeatureList","Attempt to resolve feature_params_offset.","Offset from start of Feature table to FeatureParams table, …","Array of FeatureRecords — zero-based (first feature has …","Offset to a feature table substitution table, from …","Offset to a feature table substitution table, from …","Offset to a feature table substitution table, from …","4-byte feature identification tag","4-byte feature identification tag","Number of feature variation records.","Array of feature variation records.","Maximum value of the font variation instances that satisfy …","Minimum value of the font variation instances that satisfy …","The first ‘name’ table name ID used to specify strings …","","","","","","","","","","","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 3","Format identifier: format = 1","Format identifier: format = 2","Format identifier: format = 3","Format, = 1","Format number is set to 0.","Format identifier: format = 1","Format identifier: format = 1","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Construct a LookupFlag from a raw value, discarding …","","","Return the subtable at the given index","If this glyph is in the coverage table, returns its index","If this glyph is in the coverage table, returns its index","Get the class for this glyph id","Get the class for this glyph id","If this glyph is in the coverage table, returns its index","Get the class for this glyph id","","Array of glyph IDs — in numerical order","Number of glyphs in the glyph array","Size of the classValueArray","Number of glyphs in the input glyph sequence","Number of glyphs to be matched","Number of glyphs in the input sequence","","","","","","The second value has no independent meaning, but serves as …","If set, skips over base glyphs","If set, skips over ligatures","If set, skips over all combining marks","Attempt to resolve input_class_def_offset.","Offset to ClassDef table containing input sequence context,","Array of offsets to coverage tables for the input sequence","A dynamically resolving wrapper for input_coverage_offsets.","Number of glyphs in the input sequence","Total number of glyphs in the input sequence","Number of glyphs in the input sequence","Array of input glyph IDs—starting with the second glyph","Sequence of classes to be matched to the input glyph …","Array of input glyph IDs—start with second glyph","Array of input sequence classes, beginning with the second …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","Return an iterator over all the subtables in the collection","Iterate over each glyph and its class.","Iterate over each glyph and its class.","Iterate over the decoded values for this device","","Iterate over each glyph and its class.","Offset to LangSys table, from beginning of Script table","Number of LangSysRecords for this script — excluding the …","Offset to LangSys table, from beginning of Script table","Offset to LangSys table, from beginning of Script table","Array of LangSysRecords, listed alphabetically by LangSys …","4-byte LangSysTag identifier","4-byte LangSysTag identifier","The number of subtables in this collection","Attempt to resolve lookahead_class_def_offset.","Offset to ClassDef table containing lookahead sequence …","Array of offsets to coverage tables for the lookahead …","A dynamically resolving wrapper for …","Number of glyphs in the lookahead sequence","Number of glyphs in the lookahead sequence","Number of glyphs in the lookahead sequence","Array of lookahead glyph IDs","Array of lookahead-sequence classes","Number of lookups in this table","Lookup qualifiers","Number of LookupList indices for this feature","Index (zero-based) into the LookupList","Index (zero-based) into the LookupList","Array of indices into the LookupList — zero-based (first …","Array of offsets to Lookup tables, from beginning of …","Different enumerations for GSUB and GPOS","A dynamically resolving wrapper for lookup_offsets.","If not zero, skips over all marks of attachment type …","Index (base 0) into GDEF mark glyph sets structure. This …","The third value enables applications to use a single name …","Create from a raw scalar.","Number of named parameters. (May be zero.)","","","","","","Number of RangeRecords","","Array of glyph ranges — ordered by startGlyphID.","The fourth and fifth values represent the small end of the …","","","","","A constructor that requires additional arguments.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Index of a feature required for this language system; if no","This bit relates only to the correct processing of the …","The ‘name’ table name ID that specifies sample text …","Offset to Script table, from beginning of ScriptList","Number of ScriptRecords","Offset to Script table, from beginning of ScriptList","Offset to Script table, from beginning of ScriptList","Array of ScriptRecords, listed alphabetically by script tag","4-byte script tag identifier","4-byte script tag identifier","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Number of SequenceLookupRecords","Array of Sequence lookup records","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Array of SequenceLookupRecords","Number of SequenceRule tables","Array of offsets to SequenceRule tables, from beginning of …","Number of SequenceRuleSet tables","Array of offsets to SequenceRuleSet tables, from beginning …","A dynamically resolving wrapper for seq_rule_set_offsets.","A dynamically resolving wrapper for seq_rule_offsets.","Index (zero-based) into the input glyph sequence","Index (zero-based) into the input glyph sequence","If set, skips over base glyphs","If set, skips over ligatures","If set, skips over all combining marks","If not zero, skips over all marks of attachment type …","This bit relates only to the correct processing of the …","If set, indicates that the lookup table structure is …","Coverage Index of first glyph ID in range","Coverage Index of first glyph ID in range","First glyph ID of the classValueArray","First glyph ID in the range","First glyph ID in the range","First glyph ID in the range","First glyph ID in the range","Smallest size to correct, in ppem","Number of subtables for this lookup","Number of feature table substitution records.","Array of feature table substitution records.","Array of offsets to lookup subtables, from beginning of …","A dynamically resolving wrapper for subtable_offsets.","Raw transmutation to u16.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The ‘name’ table name ID that specifies a string (or …","If set, indicates that the lookup table structure is …","","Major & minor version of the table: (1, 0)","","The loca table.","","","","","","","Returns the argument unchanged.","","Attempt to return the offset for a given glyph id.","Calls U::from(self).","","","","","","","","","maxp","Maximum levels of recursion; 1 for simple components.","Maximum number of components referenced at “top level” …","Maximum contours in a composite glyph.","Maximum points in a composite glyph.","Maximum contours in a non-composite glyph.","Number of FDEFs, equal to the highest function number + 1.","Number of IDEFs.","Maximum points in a non-composite glyph.","Maximum byte count for glyph instructions.","Maximum stack depth across Font Program (‘fpgm’ …","Number of Storage Area locations.","Maximum points used in Z0.","1 if instructions do not use the twilight zone (Z0), or 2 …","The number of glyphs in the font.","","The version: 0x00005000 for version 0.5, 0x00010000 for …","The MVAR (Metrics Variations) table","ValueRecord metrics variation record","","","","","","A delta-set inner index — used to select a delta-set row …","A delta-set inner index — used to select a delta-set row …","A delta-set outer index — used to select an item …","A delta-set outer index — used to select an item …","","","Returns the argument unchanged.","","Calls U::from(self).","","Attempt to resolve item_variation_store_offset.","Offset in bytes from the start of this table to the item …","Returns the metric delta for the specified tag and …","","","Four-byte tags used to represent particular metric or …","","","","","The number of value records — may be zero.","The size in bytes of each value record — must be greater …","Array of value records that identify target items and the …","Four-byte tag identifying a font-wide measure.","Four-byte tag identifying a font-wide measure.","Major version number of the horizontal metrics variations …","Cap height.","GaspRange[0]","GaspRange[1]","GaspRange[2]","GaspRange[3]","GaspRange[4]","GaspRange[5]","GaspRange[6]","GaspRange[7]","GaspRange[8]","GaspRange[9]","Horizontal ascender.","Horizontal clipping ascent.","Horizontal clipping descent.","Horizontal caret offset.","Horizontal caret run.","Horizontal caret rise.","Horizontal descender.","Horizontal line gap.","Subscript em x-offset.","Subscript em x-size.","Subscript em y-offset.","Subscript em y-size.","Superscript em x-offset.","Superscript em x-size.","Superscript em y-offset.","Superscript em y-size.","Strikeout offset.","Strikeout size.","Underline offset.","Underline size.","Vertical ascender.","Vertical caret offset.","Vertical caret run.","Vertical caret rise.","Vertical descender.","Vertical line gap.","X-height.","Compatible full (Macintosh only).","Copyright notice.","An iterator over the chars of a name record.","Dark background palette.","Description of the typeface.","Name of the designer of the typeface.","URL of typeface designer (with protocol, e.g., http://, …","The encoding used by the name table.","Font family name.","Full font name that reflects all family and relevant …","License description.","URL where additional licensing information can be found.","Light background palette.","Part of Name","Manufacturer name.","","A helper for encoding and decoding Mac OS Roman encoded …","Naming table version 1","Identifier for an informational string (or name).","Name Records","Entry for a name in the naming table.","PostScript CID findfont name.","PostScript name for the font.","Sample text.","Font subfamily name.","Trademark; this is used to save any trademark …","Typographic family name.","Typographic subfamily name.","Unique font identifier.","","","Variations PostScript name prefix.","URL of font vendor (with protocol, e.g., http://, ftp://).","Version string.","WWS family name.","WWS subfamily name.","","","","","","","","","","","","","","","An iterator over the chars in this name.","","","","","","","","","","","","","","Number of name records.","Convert from a mac-roman encoded byte to a char","","convert from a char to a mac-roman encoded byte, if the …","Platform-specific encoding ID.","Platform-specific encoding ID.","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","Return a type that can decode the string data for this …","Number of language-tag records.","Language-tag string offset from start of storage area (in …","Language-tag string offset from start of storage area (in …","The language-tag records where langTagCount is the number …","Language ID.","Language ID.","Language-tag string length (in bytes)","String length (in bytes).","Language-tag string length (in bytes)","String length (in bytes).","Name ID.","Name ID.","The name records where count is the number of records.","Create a new identifier from a raw u16 value.","Determine the coding from the platform and encoding id.","","","Platform ID.","Platform ID.","Returns an iterator over the set of predefined identifiers …","","Offset to start of string storage (from start of table).","Return a type that can decode the string data for this …","The FontData containing the encoded name strings.","String offset from start of storage area (in bytes).","String offset from start of storage area (in bytes).","Return the memory representation of this identifier as a …","","","","","","","","","","Return the identifier as a u16.","","","","","","","","","","","","","","","","","","","","","","Table version number (0 or 1)","Bit 5: Glyphs are emboldened.","Bit 0: Font contains italic or oblique glyphs, otherwise …","Bit 2: Glyphs have their foreground and background …","Bit 9: Font contains oblique glyphs.","Bit 3: Outline (hollow) glyphs, otherwise they are solid.","OS/2","Bit 6: Glyphs are in the standard weight/style for the …","Bit 4: Glyphs are overstruck.","OS/2 selection flags","Bit 1: Glyphs are underscored.","Bit 7: If set, it is strongly recommended that …","Bit 8: The font has ‘name’ table strings consistent …","Font Vendor Identification.","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","Returns true if all of the flags in other are contained …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","Font selection flags.","Type flags.","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Returns true if no flags are currently stored.","","Returns the complement of this set of flags.","PANOSE classification number.","","","Removes the specified flags in-place.","This metric specifies the distance between the baseline …","Font-family class and subclass. This parameter is a …","The typographic ascender for this font.","The typographic descender for this font.","The typographic line gap for this font.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","This metric specifies the distance between the baseline …","","","Toggles the specified flags in-place.","","","","Code page character range bits 0-31.","Code page character range bits 32-63.","Unicode Character Range.","Unicode Character Range (bits 32-63).","Unicode Character Range (bits 64-95).","Unicode Character Range (bits 96-127).","Returns the union of between the flags in self and other.","his is the Unicode code point, in UTF-16 encoding, of a …","This is the Unicode code point, in UTF-16 encoding, of a …","The minimum Unicode index (character code) in this font.","The maximum Unicode index (character code) in this font.","This field is used for fonts with multiple optical styles.","This field is used for fonts with multiple optical styles.","This field is used for fonts with multiple optical styles.","Weight class.","Width class.","The “Windows ascender” metric.","The “Windows descender” metric.","","Average weighted escapement.","The position of the top of the strikeout stroke relative …","Thickness of the strikeout stroke in font design units.","The recommended horizontal offset in font design units for …","The recommended horizontal size in font design units for …","The recommended vertical offset in font design units for …","The recommended vertical size in font design units for …","The recommended horizontal offset in font design units for …","The recommended horizontal size in font design units for …","The recommended vertical offset in font design units for …","The recommended vertical size in font design units for …","The 258 glyph names defined for Macintosh TrueType fonts","A string in the post table.","post (PostScript) table","","","","","","","","","","Returns the argument unchanged.","","Array of indices into the string data. See below for …","Calls U::from(self).","Set to 0 if the font is proportionally spaced, non-zero if …","Italic angle in counter-clockwise degrees from the …","Maximum memory usage when an OpenType font is downloaded …","Maximum memory usage when an OpenType font is downloaded.","Minimum memory usage when an OpenType font is downloaded …","Minimum memory usage when an OpenType font is downloaded.","Number of glyphs (this should be the same as numGlyphs in …","The number of glyph names covered by this table","","","","Storage for the string data.","","","","","This is the suggested distance of the top of the underline …","Suggested values for the underline thickness. In general, …","0x00010000 for version 1.0 0x00020000 for version 2.0 …","State for processing the blend operator for DICTs and …","","Errors that are specific to PostScript processing.","","Associates a glyph identifier with a Font DICT.","FdSelect format 0.","FdSelect format 3.","FdSelect format 4.","Range struct for FdSelect format 3.","Range struct for FdSelect format 4.","","","","","","","","Common type for uniform access to CFF and CFF2 index …","An array of variable-sized objects in a CFF table.","An array of variable-sized objects in a CFF2 table.","","","","","","","Reference to a Latin-1 encoded string.","","","","","Either a signed 32-bit integer or a 16.16 fixed point …","","The PostScript standard string set.","Operand stack for DICTs and charstrings.","","","PostScript string identifier (SID).","","Apply the blend operator.","Apply a prefix sum to decode delta-encoded numbers.","","","","","","","","","","","","","","","","","","","","","Returns an iterator over the characters of the string.","Parsing for PostScript charstrings.","","","","","","","","","","","","","","","","","","","","","Returns the number of objects in the index.","Number of objects stored in INDEX.","Number of objects stored in INDEX.","Array containing the object data.","Array containing the object data.","","Parsing for PostScript DICTs.","","","","","","","FD index for all glyphs in range.","FD index for all glyphs in range.","FD index for all glyphs in range.","FD index for all glyphs in range.","FD selector array (one entry for each glyph).","First glyph index in range.","First glyph index in range.","First glyph index in range.","First glyph index in range.","Returns an array of N 16.16 fixed point values starting at …","Returns an iterator yielding all elements on the stack as …","","","","","","","","","","Returns the associated font DICT index for the given glyph …","Format = 0.","Format = 3.","Format = 4.","Format = 0.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the data for the object at the given index.","Returns the data for the object at the given index.","Returns the data for the object at the given index.","Returns the 16.16 fixed point value at the given index on …","Returns the 32-bit integer at the given index on the stack.","Returns the offset at the given index.","Returns the offset of the object at the given index.","Returns the offset of the object at the given index.","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","Returns true if the number of elements on the stack is odd.","Number of ranges.","Number of ranges.","","","Creates a new index from the given data.","Creates an identifier from a 16-bit unsigned integer.","Creates a new Latin-1 encoded string reference from the …","Returns an iterator yielding all elements on the stack as …","Object array element size.","Object array element size.","Bytes containing count + 1 offsets each of off_size.","Bytes containing count + 1 offsets each of off_size.","","","","Pops a 16.16 fixed point value from the top of the stack.","Pops a 32-bit integer from the top of stack.","","Range3 array.","Range4 array.","","","","","","","","Returns the number of variation regions for the currently …","Reverse the order of all elements on the stack.","Returns an iterator yielding scalars for each variation …","Sentinel GID. Set equal to the number of glyphs in the …","Sentinel GID. Set equal to the number of glyphs in the …","Sets the active variation store index.","Returns the total size in bytes of the index table.","Returns the total size in bytes of the index table.","Returns the total size in bytes of the index table.","Resolves the identifier as a standard string.","Computes a bias that is added to a subroutine operator in a","","","","","","","","","","","","Returns the underlying identifier as a 16-bit unsigned …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Trait for processing commands resulting from charstring …","Maximum nesting depth for subroutine calls.","Command sink that sends the results of charstring …","","","","","Bitmask defining the counter hints that should be made …","","","Evaluates the given charstring and emits the resulting …","Returns the argument unchanged.","Bitmask defining the hints that should be made active for …","Horizontal stem hint at y with height dy.","Calls U::from(self).","","","","","","","","","Vertical stem hint at x with width dx.","","","","","","","","","","","","","","Operand for the BlueValues, OtherBlues, FamilyBlues and …","","","","","","","","","","","","","","","","","","","","","PostScript DICT Operator with its associated operands.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","PostScript DICT operator.","","","","","","","","","","","","","","","","","","","","Operand for the StemSnapH and StemSnapV operators.","","","","","","","Either a PostScript DICT operator or a (numeric) operand.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Given a byte slice containing DICT data, returns an …","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","Given a byte slice containing DICT data, returns an …","","","","","","","","","","","","","","","","","","","","","Bit 0: Set to 1.","Bit 1: Draw outlines.","Glyph data table","Sbix header flags.","The sbix (Standard Bitmap Graphics) table","Strike header table","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","Returns true if all of the flags in other are contained …","The actual embedded graphic data. The total length is …","","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","Bit 0: Set to 1. Bit 1: Draw outlines. Bits 2 to 15: …","","","","","","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","","Offset from the beginning of the strike data header to …","Indicates the format of the embedded graphic data: one of …","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Returns true if no flags are currently stored.","","Returns the complement of this set of flags.","Number of bitmap strikes.","The horizontal (x-axis) position of the left edge of the …","The vertical (y-axis) position of the bottom edge of the …","","The PPEM size for which this strike was designed.","The device pixel density (in PPI) for which this strike …","A constructor that requires additional arguments.","A constructor that requires additional arguments.","","","","Removes the specified flags in-place.","Offsets from the beginning of the ‘sbix’ table to data …","A dynamically resolving wrapper for strike_offsets.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","Toggles the specified flags in-place.","","","","Returns the union of between the flags in self and other.","Table version number — set to 1.","Axis Records","Axis Value Tables","An array of AxisValue tables.","Axis value table format 1","Axis value table format 2","Axis value table format 3","Axis value table format 4","Part of AxisValueFormat4","Axis value table flags.","If set, it indicates that the axis value represents the …","","","","","If set, this axis value table provides axis value …","STAT (Style Attributes Table)","Returns the set containing all flags.","The total number of axes contributing to this axis-values …","Zero-base index into the axis record array identifying the …","Zero-base index into the axis record array identifying the …","Zero-base index into the axis record array identifying the …","Zero-base index into the axis record array identifying the …","Zero-base index into the axis record array identifying the …","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","A value that applications can use to determine primary …","A value that applications can use to determine primary …","A tag identifying the axis of design variation.","A tag identifying the axis of design variation.","The number of axis value tables.","Array of offsets to axis value tables, in bytes from the …","A dynamically resolving wrapper for axis_value_offsets.","Array of AxisValue records that provide the combination of …","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","","","","","Returns true if all of the flags in other are contained …","","Attempt to resolve design_axes_offset.","Offset in bytes from the beginning of the STAT table to the","The number of axis records. In a font with an ‘fvar’ …","The size in bytes of each axis record.","Returns the difference between the flags in self and other.","Name ID used as fallback when projection of names into a …","Returns an empty set of flags.","","","","Flags — see below for details.","Flags — see below for details.","Flags — see below for details.","Flags — see below for details.","Flags — see below for details.","","","","","","","","Format identifier — set to 1.","Format identifier — set to 2.","Format identifier — set to 3.","Format identifier — set to 4.","Format identifier — set to 1.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","","","","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if no flags are currently stored.","","","","The numeric value for a style-linked mapping from this …","A nominal numeric value for this attribute value.","Returns the complement of this set of flags.","Offset in bytes from the beginning of the STAT table to the","Attempt to resolve offset_to_axis_value_offsets.","","","","The maximum value for a range associated with the specified","The minimum value for a range associated with the specified","","A constructor that requires additional arguments.","","","","","","","","Removes the specified flags in-place.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","","","","Toggles the specified flags in-place.","","","","","","","","","","","","","Returns the union of between the flags in self and other.","A numeric value for this attribute value.","A numeric value for this attribute value.","A numeric value for this attribute value.","A numeric value for this attribute value.","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","The name ID for entries in the ‘name’ table that …","Major/minor version number. Set to 1.2 for new fonts.","Mask for the low 12 bits to give the shared tuple records …","Implements the logic for iterating over the individual runs","Outer and inner indices for reading from an …","The DeltaSetIndexMap table","The DeltaSetIndexMap table format 0","The DeltaSetIndexMap table format 1","Flag indicating that this tuple variation header includes …","Entry format for a DeltaSetIndexMap.","Floating point item delta computed by an item variation …","Trait for applying floating point item deltas to target …","","","Mask for the low 4 bits, which give the count of bits …","Flag indicating that this tuple variation table applies to …","The ItemVariationData subtable","The ItemVariationStore table","Mask for bits that indicate the size in bytes minus one of …","Flag indicating that the serialized data for this tuple …","Packed Deltas","Packed “Point” Numbers","An iterator over the packed point numbers data.","The RegionAxisCoordinates record","Flag indicating that some or all tuple variation tables …","Mask for the low 12 bits to give the shared tuple records …","A Tuple Record","Trait for deltas that are computed in a tuple variation …","An iterator over the deltas for a glyph.","","A single set of tuple variation data","The ‘tupleVariationCount’ field of the Tuple Variation …","","TupleVariationHeader","A helper type for iterating over TupleVariationHeaders.","An iterator over the TupleVariations for a specific glyph.","The VariationRegion record","The VariationRegionList table","","Returns an iterator over all of the pairs of (variation …","Returns the set containing all flags.","","The number of variation axes for this font. This must be …","","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Computes the delta value for the specified index and set …","Computes the delta value in floating point for the …","Computes a scalar value for this region and the specified …","Compute the fixed point scalar for this tuple at the given …","Computes a floating point scalar value for this region and …","Compute the floating point scalar for this tuple at the …","","","Returns true if all of the flags in other are contained …","","The number of points in this set","","","","","","","","Returns an iterator over the per-region delta values for …","Delta-set rows.","Iterate over the deltas for this tuple.","Returns the difference between the flags in self and other.","true if the header includes an embedded peak tuple.","Returns an empty set of flags.","The region end coordinate value for the current axis.","The region end coordinate value for the current axis.","A packed field that describes the compressed …","A packed field that describes the compressed …","A packed field that describes the compressed …","","","","","","","","","","","","","","","","","","","","","","","","","","DeltaSetIndexMap format: set to 0.","DeltaSetIndexMap format: set to 1.","Format— set to 1","DeltaSetIndexMap format: set to 0.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","","","Convert from underlying bit representation, dropping any …","","","","","Returns the delta set index for the specified value.","Returns true if this tuple provides deltas for all points …","","","","","","","","Inner delta set index.","Inserts the specified flags in-place.","Intermediate end tuple record for this tuple variation …","true if the header includes the two intermediate region …","Intermediate start tuple record for this tuple variation …","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","Returns true if no flags are currently stored.","Returns true if the delta is a point and requires reading …","","","The number of delta sets for distinct items.","A dynamically resolving wrapper for …","The number of item variation data subtables.","Offsets in bytes from the start of the item variation …","Iterate over the packed points","","The number of mapping entries.","The number of mapping entries.","The delta-set index mapping data. See details below.","The delta-set index mapping data. See details below.","The delta-set index mapping data. See details below.","Creates a new delta for the given position and …","","","","","","Returns the complement of this set of flags.","Outer delta set index.","","","","","","","","Returns the ‘peak’ tuple for this variation","The region peak coordinate value for the current axis.","The region peak coordinate value for the current axis.","Peak tuple record for this tuple variation table — …","","true if the data for this table includes packed point …","A constructor that requires additional arguments.","","","","","","A constructor that requires additional arguments.","","A constructor that requires additional arguments.","","","","","Array of region axis coordinates records, in the order of …","Array of region axis coordinates records, in the order of …","The number of variation region tables in the variation …","The number of variation regions referenced.","Array of indices into the variation region list for the …","Removes the specified flags in-place.","true if any tables reference a shared set of point numbers","","read point numbers off the front of this data, returning …","The region start coordinate value for the current axis.","The region start coordinate value for the current axis.","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","","","","","","","","","","","","","","","","","","","","Toggles the specified flags in-place.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A packed field. The high 4 bits are flags (see below). The …","","","","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","Coordinate array specifying a position within the font’s …","Coordinate array specifying a position within the font’s …","The size in bytes of the serialized data for this tuple …","Attempt to resolve variation_region_list_offset.","Offset in bytes from the start of the item variation store …","Array of variation regions.","A packed field: the high bit is a flag—see details below.","The vhea Vertical Header Table","Maximum advance height value in ‘vmtx’ table.","Typographic ascent.","The amount by which a slanted highlight on a glyph needs …","Used to calculate the slope of the cursor (rise/run); 1 for","0 for vertical caret, 1 for horizontal.","Typographic descent.","Typographic line gap. Negative LineGap values are treated …","0 for current format.","Minimum bottom sidebearing value","Minimum top sidebearing value in ‘vmtx’ table for …","Number of LongMetric entries in ‘hmtx’/‘vmtx’ table","","The major/minor version (1, 1)","Defined as max( tsb + (yMax-yMin)).","","The vmtx (Vertical Metrics) table","Returns the advance height for the given glyph identifier.","A constructor that requires additional arguments.","","Returns the top side bearing for the given glyph identifer.","Top side bearings for glyph IDs greater than or equal to …","Paired advance height and top side bearing values for each …","The VVAR (Vertical Metrics Variations) table","Returns the advance height delta for the specified glyph …","Attempt to resolve advance_height_mapping_offset.","Offset in bytes from the start of this table to the …","Returns the bottom side bearing delta for the specified …","Attempt to resolve bsb_mapping_offset.","Offset in bytes from the start of this table to the …","Attempt to resolve item_variation_store_offset.","Offset in bytes from the start of this table to the item …","","Returns the top side bearing delta for the specified glyph …","Attempt to resolve tsb_mapping_offset.","Offset in bytes from the start of this table to the …","Returns the vertical origin delta for the specified glyph …","Attempt to resolve v_org_mapping_offset.","Offset in bytes from the start of this table to the …","Major version number of the horizontal metrics variations …"],"i":[71,0,0,73,0,0,21,0,73,0,0,0,0,11,11,11,11,11,11,11,11,0,11,0,0,0,0,243,116,0,0,11,0,0,0,0,11,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,21,21,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,20,58,11,1,63,73,74,75,21,20,58,11,1,63,73,74,75,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,63,63,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,20,58,11,1,63,73,74,75,21,20,58,11,1,63,73,74,75,25,25,63,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,244,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,1,25,25,1,1,1,1,1,1,25,75,1,21,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,107,1,107,1,107,1,1,1,1,1,1,1,1,25,25,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,114,63,25,25,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,11,11,63,1,1,73,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,21,20,58,11,1,63,73,74,75,75,1,1,25,25,1,25,25,20,58,1,1,1,1,1,1,74,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,1,1,1,1,25,25,25,25,1,1,63,1,25,25,1,25,25,25,25,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,20,58,11,1,63,73,74,75,1,21,20,58,74,1,63,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,20,58,1,1,1,1,1,1,74,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,21,20,58,74,1,1,1,1,1,1,1,1,1,63,63,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,1,1,25,25,1,1,21,73,74,75,1,135,135,1,1,1,1,1,1,107,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,114,1,1,1,1,1,1,1,1,1,1,63,63,1,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,63,1,1,1,1,1,1,1,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,114,1,1,1,1,117,21,1,1,1,1,1,1,1,1,1,1,1,1,1,1,114,107,21,21,21,1,21,134,21,21,1,1,1,1,1,1,207,208,1,207,208,1,1,1,1,1,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,114,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,114,1,1,1,1,1,1,1,21,1,1,21,1,1,1,1,1,1,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,75,75,1,107,1,114,0,63,63,21,21,20,58,11,1,63,73,74,75,11,135,1,1,1,1,1,1,1,1,1,21,20,58,11,1,63,73,74,75,21,20,58,11,1,63,73,74,75,1,1,1,1,107,1,1,1,1,1,1,21,20,58,11,1,63,73,74,75,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,107,1,1,25,25,25,25,25,25,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,30,44,30,44,44,44,44,30,44,30,44,30,44,44,30,44,44,44,30,30,44,44,30,44,30,44,30,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,26,26,29,29,29,245,29,245,29,245,29,245,29,245,29,245,29,245,29,245,245,245,29,245,29,245,245,29,245,29,29,26,29,29,245,245,29,245,29,245,29,245,29,245,26,0,0,0,0,0,0,0,0,0,0,0,0,0,38,38,38,0,48,246,247,248,38,48,247,48,249,249,42,42,46,45,153,153,46,46,45,46,46,47,153,153,249,249,47,46,42,119,38,46,42,119,38,46,42,119,38,46,42,119,38,246,247,248,38,48,249,249,248,248,103,103,119,119,46,42,119,46,42,119,38,250,250,46,42,119,38,46,42,119,250,250,103,119,103,119,119,103,119,103,119,119,42,42,42,250,153,47,45,249,48,103,246,247,248,38,38,247,46,42,119,38,46,42,119,38,46,42,119,38,46,42,119,38,250,250,250,0,260,0,259,0,0,0,0,0,0,0,259,261,261,257,257,257,257,257,0,253,0,0,0,0,0,0,0,259,0,260,0,253,251,252,252,253,254,254,252,252,252,252,255,256,50,50,100,253,253,253,253,253,253,253,50,254,253,49,252,257,138,258,100,259,260,101,261,50,254,253,49,252,257,138,258,100,259,260,101,261,254,254,254,254,254,254,50,254,253,49,252,257,138,258,100,259,260,101,261,50,254,253,49,252,257,138,258,100,259,260,101,261,50,254,253,49,252,138,258,50,50,253,101,100,100,253,100,254,254,253,253,50,50,50,254,253,49,252,138,258,259,251,50,50,50,254,253,253,253,253,253,49,252,138,258,259,100,50,254,253,49,252,257,138,258,100,259,260,101,261,253,253,253,262,256,138,258,138,258,50,254,253,49,252,138,258,49,252,49,252,50,50,49,49,49,49,49,49,263,255,264,262,256,257,263,255,264,262,256,257,255,256,263,255,264,262,256,257,50,50,50,50,253,253,253,50,254,253,49,252,257,138,258,100,259,260,101,261,253,100,50,254,253,49,252,138,258,251,50,254,254,100,101,254,254,254,254,254,254,253,262,256,50,50,254,254,254,254,50,254,253,49,252,138,258,50,50,50,50,251,263,255,264,262,256,257,257,253,138,138,263,264,50,50,253,253,50,254,253,49,252,257,138,258,100,259,260,101,261,253,253,50,254,253,49,252,257,138,258,100,259,260,101,261,50,254,253,49,252,257,138,258,100,259,260,101,261,50,254,253,49,252,257,138,258,100,259,260,101,261,253,50,50,49,49,49,49,49,49,49,252,49,252,254,254,258,258,258,258,0,53,53,53,53,0,54,54,54,54,54,0,0,265,55,55,55,55,55,55,265,55,55,265,265,55,55,265,55,265,55,55,55,55,55,55,265,55,55,55,0,0,269,56,56,56,56,56,56,56,269,56,269,269,56,269,56,56,56,269,56,269,269,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,271,0,0,272,272,272,272,272,272,272,272,272,271,271,0,0,0,0,0,271,0,179,0,179,0,271,197,197,111,271,272,273,144,145,234,229,197,179,160,159,161,111,271,272,273,144,145,234,229,197,179,160,159,161,111,271,272,273,144,145,234,229,197,179,160,159,161,111,271,272,273,144,145,234,229,197,179,160,159,161,271,273,144,145,229,197,271,234,234,234,111,111,77,144,145,144,145,275,276,273,273,275,271,273,144,145,229,197,179,276,273,273,111,271,273,144,145,234,229,197,179,277,278,275,276,279,280,281,282,283,272,111,271,272,273,144,145,234,229,197,179,160,159,161,271,145,229,145,229,277,275,276,280,279,281,282,271,273,144,145,229,197,275,273,273,273,273,275,111,271,272,273,144,145,234,229,197,179,160,159,161,160,159,161,279,111,273,144,145,234,229,197,275,281,283,277,278,275,276,279,280,281,282,277,278,275,276,279,280,281,282,283,77,275,281,283,271,160,159,161,234,234,234,280,279,281,282,77,274,284,283,271,273,144,145,229,197,111,111,275,274,77,277,278,275,276,279,280,281,282,283,274,284,272,272,275,275,280,144,145,144,145,275,144,144,197,197,278,111,111,111,111,271,272,273,144,145,234,229,197,179,160,159,161,271,111,271,272,273,144,145,234,229,197,179,160,159,161,111,271,272,273,144,145,234,229,197,179,160,159,161,111,271,272,273,144,145,234,229,197,179,160,159,161,229,229,284,283,234,234,77,0,0,0,0,91,0,0,0,0,0,91,91,0,0,0,0,33,33,33,0,91,91,91,91,91,91,91,91,0,231,231,33,91,91,91,91,91,0,0,91,33,91,91,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,91,33,118,118,33,33,33,33,33,33,91,33,33,91,33,91,91,91,91,91,33,33,33,0,0,0,0,33,33,33,33,33,33,33,33,33,33,33,33,33,33,91,285,286,287,288,82,83,287,288,82,83,289,290,291,292,293,293,84,84,39,84,84,41,166,40,69,231,287,288,82,83,118,33,91,41,166,40,69,231,287,288,82,83,118,33,91,294,295,296,297,298,299,291,292,300,301,294,295,296,297,298,299,291,292,300,301,69,69,69,84,84,68,41,166,40,69,231,287,288,82,83,118,33,91,41,166,40,69,231,287,288,82,83,118,33,91,41,166,287,288,82,83,118,91,302,303,304,305,294,295,302,303,304,305,294,295,80,79,293,118,91,223,224,306,307,223,224,306,307,294,295,69,69,41,166,287,288,82,83,118,91,80,79,308,41,41,41,166,40,69,287,288,82,83,118,91,68,309,310,308,285,286,302,303,304,305,294,295,311,312,313,314,306,307,315,316,296,297,317,318,298,299,289,290,291,292,319,320,300,301,293,231,33,41,166,40,69,231,287,288,82,83,118,33,91,118,91,311,312,41,166,40,41,166,40,41,166,287,288,82,83,118,91,41,166,40,69,231,287,288,82,83,118,33,91,41,166,40,69,287,288,82,83,84,84,84,84,84,84,118,91,39,84,68,84,165,308,41,41,80,79,311,313,314,306,307,315,316,296,297,317,318,298,299,289,290,291,292,319,320,300,301,40,311,313,314,306,307,315,316,296,297,317,318,298,299,289,290,291,292,319,320,300,301,40,40,165,165,285,286,166,287,288,82,83,166,287,288,82,83,41,166,287,288,82,83,118,91,304,305,304,305,84,39,165,68,309,310,80,79,308,285,286,302,303,304,305,294,295,311,312,313,314,223,224,306,307,315,316,296,297,317,318,298,299,289,290,291,292,319,320,300,301,293,231,33,231,33,317,318,298,299,315,316,296,297,315,316,296,297,293,293,294,295,69,69,82,83,82,83,41,166,40,69,231,287,288,82,83,118,33,91,118,91,313,314,313,314,41,166,40,69,231,287,288,82,83,118,33,91,41,166,40,69,231,287,288,82,83,118,33,91,41,166,40,69,231,287,288,82,83,118,33,91,84,84,84,84,84,310,286,303,305,295,224,307,316,297,318,299,290,292,320,301,288,83,288,83,84,84,84,302,303,304,305,302,303,304,305,302,303,309,310,231,309,310,231,319,320,300,301,223,224,223,224,302,303,304,305,302,303,304,305,302,303,309,310,231,309,310,231,319,320,300,301,223,224,223,224,0,0,0,193,193,193,81,81,193,193,193,193,193,193,193,81,81,193,81,193,81,193,81,193,81,193,81,97,97,97,193,193,193,193,193,81,193,193,193,193,193,81,193,81,193,193,193,81,81,193,81,193,193,193,193,81,193,193,81,193,97,97,97,97,97,97,97,97,97,193,81,97,81,81,193,193,193,193,81,193,193,193,81,193,81,193,81,193,97,0,0,0,321,321,321,321,321,99,99,99,321,321,321,321,321,321,321,99,321,321,321,99,99,321,321,99,99,0,108,108,108,108,0,109,109,109,109,109,0,0,0,0,131,28,131,131,131,27,27,131,27,27,27,155,27,155,27,155,27,155,27,155,155,27,27,27,27,27,155,27,155,27,155,27,131,131,131,28,27,155,27,27,27,27,27,27,27,155,131,28,155,28,155,155,27,155,27,155,27,155,27,155,131,322,322,322,322,0,0,0,322,322,322,322,322,322,322,322,132,322,132,322,132,322,132,322,132,322,322,322,322,322,132,322,132,322,322,322,322,322,132,322,322,322,322,323,132,322,322,322,322,132,322,322,132,322,322,323,132,322,132,132,132,132,323,322,322,322,132,322,322,322,132,322,132,322,132,322,322,323,0,0,327,0,0,0,0,0,0,327,0,0,0,0,0,52,52,52,0,0,0,0,327,0,0,327,0,0,0,133,133,23,23,327,52,327,52,168,324,325,326,52,168,325,168,327,52,327,52,327,324,326,23,167,23,167,183,183,327,326,326,327,327,183,327,52,327,133,133,23,327,327,52,133,133,133,133,167,167,167,133,133,183,133,133,327,327,24,24,133,23,24,167,168,324,325,326,183,52,52,327,52,327,327,52,327,52,327,52,133,86,86,0,0,330,0,0,333,0,333,333,333,334,0,0,329,334,86,328,86,328,332,332,0,333,0,0,328,86,86,330,0,0,329,329,329,0,0,0,86,86,86,86,86,86,328,328,328,328,328,86,90,328,86,328,86,328,86,328,86,328,86,328,86,328,86,328,86,330,329,205,194,331,90,332,333,334,328,86,330,329,205,194,331,90,332,333,334,0,205,205,328,86,330,329,205,194,331,90,332,333,334,328,86,330,329,205,194,331,90,332,333,334,328,86,335,335,335,331,332,328,86,335,328,86,329,205,331,334,328,86,328,86,336,328,86,329,205,194,331,90,332,90,205,328,328,328,328,328,86,86,86,86,86,329,205,194,331,90,332,333,333,334,328,86,330,329,205,194,331,90,332,333,334,328,86,205,328,86,206,206,328,86,90,336,205,336,328,86,328,86,336,336,335,328,86,328,86,328,86,330,329,205,194,331,90,332,333,334,328,86,205,205,205,205,328,86,205,206,194,328,86,336,336,335,330,194,205,205,205,194,194,328,86,336,137,336,335,330,336,330,328,86,205,205,328,86,328,86,206,328,86,330,329,205,194,331,90,332,333,334,0,328,86,333,328,86,90,328,86,330,329,205,194,331,90,332,333,334,328,86,330,329,205,194,331,90,332,333,334,328,86,330,329,205,194,331,90,332,333,334,328,86,194,336,335,330,336,335,330,331,331,194,336,335,330,336,335,330,331,331,442,442,443,443,444,444,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,0,0,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,0,0,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,0,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,339,340,341,342,343,339,340,341,342,343,340,339,340,341,342,343,339,340,341,342,343,343,340,0,342,343,339,339,341,341,342,343,343,339,340,341,342,343,343,343,341,339,340,341,342,343,342,343,342,343,340,341,343,340,341,339,340,341,342,343,339,341,343,339,340,341,342,343,339,340,341,342,343,339,340,341,342,343,342,200,0,0,0,0,0,0,362,359,361,0,0,0,0,362,359,361,0,362,359,361,0,0,0,0,359,0,0,0,0,445,446,347,351,352,445,446,347,351,352,445,446,347,0,0,0,0,0,0,0,0,0,0,0,362,359,361,362,359,361,362,359,361,362,359,361,0,0,0,0,0,0,0,0,0,0,0,362,359,361,0,0,0,0,0,200,200,200,200,200,200,200,200,200,344,345,346,347,345,43,43,43,348,348,37,348,348,37,200,200,200,200,200,200,200,362,232,359,361,200,347,184,351,352,192,64,350,112,43,89,182,362,232,359,361,200,347,184,351,352,192,64,350,112,43,89,182,349,349,349,64,64,349,349,349,349,232,200,347,184,351,352,192,64,350,112,43,89,182,232,200,347,184,351,352,192,64,350,112,43,89,182,200,170,170,232,192,64,350,43,89,182,200,353,354,355,349,356,353,354,355,349,356,351,352,232,200,200,200,112,112,112,356,356,232,200,112,112,112,357,357,357,357,143,143,143,143,232,200,200,200,200,200,184,192,64,350,112,43,89,182,362,232,359,361,200,347,184,351,352,192,64,350,112,43,89,182,200,200,200,200,200,200,200,362,232,359,361,200,347,184,351,352,192,64,350,112,43,89,182,200,200,184,112,89,89,89,358,358,169,169,169,358,358,359,143,143,359,360,360,360,360,182,182,182,360,360,181,360,360,181,184,184,184,348,358,348,358,184,184,348,358,360,180,348,358,348,358,359,180,200,355,355,355,191,191,200,353,354,355,349,356,348,358,360,357,351,352,232,143,359,344,345,346,180,353,354,355,191,349,356,348,37,358,169,170,360,181,357,361,347,351,352,192,64,350,43,89,182,232,359,191,37,169,170,181,361,347,351,352,192,64,350,43,89,182,200,200,143,143,192,192,200,200,359,232,200,347,184,351,352,192,64,350,112,43,89,182,200,200,362,232,359,361,200,347,184,351,352,192,64,350,112,43,89,182,362,232,359,361,200,347,184,351,352,192,64,350,112,43,89,182,362,232,359,361,200,347,184,351,352,192,64,350,112,43,89,182,200,354,353,354,351,355,349,352,355,349,352,353,192,350,192,350,192,350,192,350,354,143,232,232,232,232,344,345,346,347,346,347,346,232,232,232,232,232,232,232,232,344,345,346,347,346,347,346,232,232,232,232,373,371,372,0,0,373,371,372,0,0,373,371,372,0,0,371,0,0,0,0,447,448,365,447,448,365,447,448,0,0,373,371,372,0,0,0,0,373,371,372,0,373,371,372,0,0,0,0,373,371,372,0,0,0,0,0,0,0,0,19,363,363,363,364,364,364,373,371,372,365,373,371,372,365,365,365,172,172,366,367,368,363,369,364,366,367,368,363,369,364,365,366,370,370,370,370,146,146,146,146,373,371,372,365,367,215,19,364,373,371,372,365,171,172,171,369,369,369,171,364,364,364,371,146,146,371,371,146,371,366,367,368,215,363,19,369,171,172,370,372,364,365,371,372,365,146,146,368,368,368,366,367,368,363,369,370,364,365,367,215,364,371,365,373,371,372,365,373,371,372,365,373,371,372,365,146,0,0,0,0,0,127,0,0,127,374,147,127,127,127,127,127,127,127,127,142,374,127,142,374,127,142,374,127,142,374,127,142,127,127,127,127,127,374,147,127,127,127,127,127,142,374,127,142,374,127,127,127,142,147,147,147,147,127,127,127,127,127,142,374,127,374,127,374,127,127,374,147,216,375,216,142,127,375,375,147,147,147,127,127,127,142,374,127,127,127,142,374,127,142,374,375,375,216,127,142,374,127,147,374,374,178,178,178,0,178,0,178,178,178,178,178,178,178,178,178,178,178,178,178,150,178,178,178,178,150,178,178,178,178,150,178,178,178,178,178,150,150,178,178,178,178,150,178,150,178,178,178,178,178,178,150,150,150,150,178,178,150,178,178,178,178,178,178,178,178,178,178,150,150,150,150,150,150,0,151,151,151,151,151,151,151,151,151,151,151,151,151,151,0,0,152,148,148,148,148,148,148,148,148,148,148,152,148,148,148,152,148,152,152,152,148,148,148,148,148,148,0,154,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,106,0,397,0,0,0,0,0,0,0,0,0,36,35,384,385,36,35,384,385,384,385,175,175,175,0,0,104,104,104,0,0,0,175,0,0,0,0,0,0,0,0,0,0,0,121,0,121,0,397,0,175,0,104,106,221,221,221,96,377,377,378,378,61,59,378,61,59,175,175,397,121,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,397,121,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,57,57,377,377,377,57,60,60,379,379,379,60,380,380,65,65,381,381,382,383,35,383,383,66,66,381,381,381,66,382,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,175,196,65,212,104,386,386,123,123,123,386,387,381,379,377,388,389,36,387,381,379,377,390,390,175,104,391,391,392,393,393,393,392,394,175,196,65,196,65,392,175,196,65,212,104,395,380,380,122,120,221,221,102,102,122,122,376,376,120,123,123,123,122,122,124,124,96,96,380,175,211,163,122,196,65,212,104,123,221,387,381,390,379,377,378,96,380,384,385,397,121,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,175,175,104,397,388,389,382,383,36,35,398,388,388,382,214,67,390,175,196,65,212,104,394,175,175,175,377,377,378,378,61,59,378,214,67,61,59,397,121,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,397,211,163,122,196,65,212,123,221,397,382,383,392,36,35,163,391,163,163,391,163,163,397,377,377,378,378,61,59,378,61,59,399,398,376,212,212,376,399,398,399,175,398,394,104,380,175,196,65,212,104,389,394,389,394,210,391,102,120,376,399,398,388,389,382,383,387,213,214,381,66,67,390,379,60,61,377,57,59,378,392,393,124,386,96,396,394,400,380,36,35,384,385,106,121,376,36,35,384,385,106,102,175,380,211,210,211,211,210,211,211,214,67,390,61,59,378,214,67,390,61,59,378,213,213,387,387,387,213,212,212,175,175,175,175,175,175,196,196,382,196,65,196,65,392,398,396,396,398,398,175,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,175,104,397,121,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,397,121,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,397,121,175,211,163,122,196,36,65,35,212,384,385,104,106,123,221,400,175,124,396,400,0,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,0,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,0,0,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,186,186,186,233,186,0,233,233,233,233,186,186,186,233,233,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,110,0,110,110,110,110,0,110,110,110,110,110,0,110,403,0,0,0,0,0,110,110,110,110,110,110,110,110,403,403,110,110,110,110,110,110,404,164,188,401,402,403,110,404,164,188,401,402,403,401,110,164,188,401,402,403,110,164,188,401,402,403,110,187,404,110,404,188,188,110,401,403,110,110,164,188,401,401,110,110,404,164,188,401,402,403,110,110,110,404,164,188,401,402,403,401,402,110,164,188,164,187,164,164,187,188,188,164,188,164,188,188,188,187,110,403,402,110,188,188,110,187,187,188,187,188,188,110,110,164,188,401,402,403,110,110,401,110,110,404,164,188,401,402,403,110,404,164,188,401,402,403,110,404,164,188,401,402,403,187,130,130,130,130,130,0,130,130,0,130,130,130,190,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,190,190,130,130,130,130,130,130,130,130,190,130,190,130,190,190,190,190,190,130,130,190,130,130,130,130,130,130,190,190,190,190,190,190,130,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,0,0,0,220,220,220,220,220,220,220,220,220,220,195,195,220,195,195,195,195,195,195,195,195,195,220,220,195,220,220,220,220,195,195,195,0,136,0,136,0,0,0,0,0,0,411,412,410,410,412,412,411,0,0,0,136,136,136,136,136,136,0,136,136,136,136,0,136,0,0,136,136,0,136,408,408,409,408,410,411,268,267,412,199,198,136,409,408,410,411,268,267,412,199,198,136,267,0,408,410,411,268,267,412,199,198,136,410,411,268,267,412,199,198,136,411,199,198,410,266,270,266,270,408,0,411,268,267,267,199,198,199,198,199,198,413,199,198,199,198,408,408,411,411,268,267,267,199,198,136,136,412,413,414,415,412,409,408,410,411,411,411,268,268,267,412,199,198,136,136,410,266,270,408,408,410,266,270,268,199,198,409,408,410,411,268,267,412,199,198,136,408,199,198,408,408,414,415,409,408,410,268,267,408,266,270,266,270,411,199,198,408,408,408,414,415,266,270,413,414,415,412,412,409,408,409,414,415,409,410,266,270,268,410,410,411,268,267,412,199,198,136,411,267,136,268,409,408,410,411,268,267,412,199,198,136,409,408,410,411,268,267,412,199,198,136,409,408,410,411,268,267,412,199,198,136,408,408,0,0,0,417,417,416,417,416,416,417,0,417,416,416,417,416,417,416,417,417,417,417,417,416,418,420,418,420,418,418,420,418,420,418,420,418,420,0,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,0,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,419,0,419,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,0,418,420,418,420,418,420,0,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,420,418,419,420,421,422,418,419,420,421,422,418,419,420,421,422,418,419,420,421,422,421,422,0,418,419,420,421,422,418,419,420,421,422,418,419,419,419,420,421,422,418,418,419,420,421,422,421,418,419,420,421,422,0,418,419,420,421,422,418,419,420,421,422,418,419,420,421,422,421,422,449,449,449,126,126,0,0,0,0,126,126,126,126,126,126,126,126,126,126,126,126,126,126,139,126,126,126,126,209,126,126,126,126,126,126,126,126,126,219,219,139,126,126,126,126,126,126,126,126,209,139,139,126,219,219,209,219,139,209,219,126,209,209,126,126,126,126,126,126,126,126,126,209,0,0,0,0,0,0,0,0,0,125,31,31,31,31,125,0,125,423,424,425,426,32,32,105,105,105,105,105,105,218,189,189,423,125,125,125,125,125,125,125,105,31,32,125,105,31,32,125,105,31,32,125,105,31,32,125,105,32,125,125,125,218,218,218,218,125,218,125,105,32,125,424,425,426,423,31,105,32,125,125,125,125,125,424,425,426,423,31,105,31,32,125,125,125,125,105,32,125,125,125,125,105,31,32,125,125,105,32,125,426,425,125,218,218,105,32,125,425,425,218,189,424,425,426,423,31,189,31,125,125,125,105,31,32,125,125,125,105,31,32,125,105,31,32,125,105,31,32,125,125,424,426,32,32,424,425,426,423,31,218,226,0,0,0,0,0,225,0,0,0,13,13,113,225,0,0,113,225,0,0,0,0,226,225,0,0,0,0,0,0,0,0,0,0,0,0,94,427,113,430,236,113,113,113,113,113,113,225,226,113,113,440,441,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,440,441,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,156,113,237,431,92,225,226,157,157,237,428,237,428,156,237,113,226,432,436,156,113,92,225,226,94,158,158,428,113,225,113,431,431,437,438,13,113,156,113,237,431,92,225,226,156,113,113,113,113,113,237,431,92,225,226,432,433,434,435,436,94,437,438,157,13,440,441,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,113,225,226,113,113,225,226,156,13,428,156,113,237,431,92,225,226,92,113,227,225,227,113,113,440,441,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,440,441,433,435,436,156,113,429,113,431,158,157,157,157,432,156,437,438,437,438,13,429,440,441,433,435,436,113,92,156,113,237,431,92,225,226,428,431,431,227,428,225,227,437,438,236,157,158,156,13,237,227,156,13,237,237,237,236,158,158,113,226,433,432,431,431,113,113,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,113,225,226,113,440,441,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,440,441,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,227,225,427,440,441,156,13,113,237,431,92,225,226,432,433,434,435,427,428,436,94,113,156,156,227,157,157,236,158,0,240,240,240,240,240,240,240,240,240,240,240,240,240,240,0,0,241,241,241,241,241,241,0,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242],"f":"``````````````````````````````````````{{{b{`}}}{{f{d}}}}0{{{b{`}}}h}{{{b{`}}}j}{{{b{`}}l}{{A`{n}}}}0{{{b{`}}l{f{Ab}}}{{Ah{AdAf}}}}{{{b{`}}}{{A`{{Ah{AjAf}}}}}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}B`}3210{{{b{`}}}Ab}0{{{b{`}}}{{f{{Bb{l}}}}}}{{{b{`}}}n}{{{b{`}}}{{f{{Bb{Bd}}}}}}{{{b{`}}}{{Bh{BfBd}}}}22224444`{Bj{{f{d}}}}0{{{b{`}}}Bl}0{{{b{`}}}{{A`{{Ah{BnAf}}}}}}{{{b{`}}}{{An{Bd}}}}5{{{b{`}}}{{Bh{C`Bd}}}}{Cb{{Ah{CdAf}}}}0{{{b{`}}}{{f{Cf}}}}{{{b{`}}}{{Ah{{f{Cf}}Af}}}}:::::::::{{{b{`}}}{{Ah{ChAf}}}}{{{b{`}}}Bd}{{{b{`}}}{{Cl{Cj}}}}==<{{{b{`}}}{{Bh{CnBd}}}}{{{b{`}}}{{f{D`}}}}{{{b{`}}}{{Ah{DbAf}}}}{{{b{`}}}Dd}{{{b{`}}}{{Ah{DfAf}}}}6{{{b{`}}}{{f{{Bb{Bd}}}}}}0{{{b{`}}}{{Bh{DhBd}}}}0{{{b{`}}}n}000{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}{{f{{Bb{l}}}}}}{{{b{`}}}{{Ah{DjAf}}}}<333353{{{b{`}}}{{Bh{DlBd}}}}4{{{b{`}}}{{Ah{DhAf}}}}>{{{b{`}}}{{A`{{Ah{DnAf}}}}}}{{{b{`}}}{{A`{{An{Al}}}}}}{{{b{`}}}{{f{E`}}}}{{{b{`}}}{{A`{{Ah{{f{Eb}}Af}}}}}}{{{b{`}}}{{An{Al}}}}:{{{b{`}}}{{f{Ed}}}}{{{b{`}}}{{Eh{Ef}}}}<{{{b{`}}}{{Ah{EjAf}}}}{{{b{`}}}Bd}{{{b{`}}}{{f{El}}}}?{{{b{`}}}{{A`{{Ah{EnAf}}}}}}{{{b{`}}}{{An{Bd}}}}{{{b{`}}}{{A`{{Ah{F`Af}}}}}}1{{{b{`}}}{{f{{Bb{h}}}}}}{{{b{`}}}{{f{Fb}}}}0{{{b{`}}}{{f{Fd}}}}0{ce{}{}}00000000000000000{{{b{`}}l{f{Ab}}}{{Ah{AdAf}}}}{{{b{`}}}{{A`{{Ah{AjAf}}}}}}>{{{b{`}}}n}{{{b{`}}}Ff}00000111{{{b{`}}}{{f{{Bb{Bd}}}}}}2{{{b{`}}}{{Bh{FhBd}}}}{Cb{{Ah{FjAf}}}}0{Cb{{Ah{FlAf}}}}0{{{b{`}}}Bl}0000000000000000000{Cb{{Ah{FnAf}}}}0{Cb{{Ah{G`Af}}}}0868{{{b{`}}}{{f{{Bb{{An{Bd}}}}}}}}{{{b{`}}}{{Gd{GbBd}}}}{{{b{`}}}{{Bh{GfBd}}}};9;2{{{b{`}}}{{Gd{GhBd}}}}{{{b{`}}}{{Bh{GjBd}}}}={{{b{`}}}{{f{{Bb{Gl}}}}}}{Gnj}`{{{b{`}}}j}{{{b{`}}}n}{{{b{`}}}{{Eh{H`}}}}1{{{b{`}}}{{Ah{DfAf}}}}0{{{b{`}}}Bd}100333{{{b{`}}}{{f{Hb}}}}4{{{b{`}}}{{f{{Bb{Bd}}}}}}5={{{b{`}}}{{Gd{HdBd}}}}{{{b{`}}}{{Bh{HfBd}}}}{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}{{A`{{Ah{HhAf}}}}}}{{{b{`}}}{{A`{{An{Al}}}}}}{{{b{`}}}{{f{Hj}}}}{BjBj}{{{Bh{ce}}}{{Bh{ce}}}{HlHn}{HlI`}}{{{Gd{ce}}}{{Gd{ce}}}{HlHn}{HlI`}}{AfAf}{{{b{c}}}{{b{c}}}Hl}{GnGn}{IbIb}{IdId}{IfIf}{{ce}Ih{}{}}00000000{Cb{{Ah{IjAf}}}}0{{GnGn}Il}{{{b{`}}}{{Ah{InAf}}}}0{{{b{`}}}{{Ah{J`Af}}}}100{{{b{`}}}Dd}00000{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}{{A`{{Ah{{f{Jb}}Af}}}}}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}{{f{Jd}}}}{{{b{`}}}{{f{Jf}}}}{Cb{{Ah{JhAf}}}}0{{{b{`}}}n}0{{{b{`}}}{{f{d}}}}{{{b{`}}}{{f{{Bb{l}}}}}}{{{b{`}}}{{`{{K`{}{{Jj{{Jn{lJl}}}}}}Hl}}}}{{{b{`}}}{{Eh{Kb}}}}{{{b{`}}}{{`{{K`{}{{Jj{Kd}}}}Hl}}}}{{{b{`}}}Kf}{{{b{`}}Kh{f{Ab}}}{{Ah{KjAf}}}}{{{b{`}}Kh{f{Ab}}}{{Ah{KlAf}}}}{cKn{}}9{{{b{`}}}{{f{{Bb{Al}}}}}}{{{b{`}}}{{Bh{L`Al}}}}{{{b{`}}}Ff}0000<{{{b{`}}}j}={{{b{`}}}{{Jn{Kn{A`{{f{d}}}}}}}}{{{b{`}}}{{Ah{DhAf}}}}0000000000000000??{{{b{`}}}Bd}00000000000000006{{{b{`}}}{{f{{Bb{Bd}}}}}}{{{b{`}}}{{Bh{DhAl}}}}{{{b{`}}}{{Bh{DhBd}}}}{Cb{{Ah{LbAf}}}}0{{{b{`}}}Ld}{Cb{{Ah{LfAf}}}}0{{{b{`}}}{{f{d}}}}0{{{b{`}}Lh}{{Ah{LjAf}}}}{{{b{`}}}{{Ah{BjAf}}}}21{{Cbh}{{A`{Bj}}}}{{Ifh}{{A`{Bj}}}};{{}Bj}{{{b{`}}}n}{{{b{`}}}{{A`{{Ah{LlAf}}}}}}{{{b{`}}}{{An{Bd}}}}{{{b{`}}}{{A`{{Ah{LnAf}}}}}}1{{{b{`}}}M`}0{{{b{`}}}Ff}{{{b{`}}n}{{`{{K`{}{{Jj{Kj}}}}Hl}}}}66<{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}n{f{Ab}}{f{Kj}}}{{Ah{IhAf}}}}{{{b{`}}}Bl}0{{{b{`}}}{{Ah{{f{Mb}}Af}}}}{{{b{`}}}Al};;;{{{b{`}}}{{A`{{Ah{MdAf}}}}}}{{{b{`}}}{{Ah{MdAf}}}}{{{b{`}}}Bd}<{{{b{`}}}{{A`{j}}}}{Mf{{A`{j}}}}1010{{{b{`}}}Ad}0888080{Cb{{Ah{MhAf}}}}0{Cb{{Ah{MjAf}}}}0{{{b{`}}}{{A`{Ml}}}}{{{b{`}}}{{f{Mn}}}}{{{b{`}}}Ab}0??{{{b{`}}}n}00{{{b{`}}}{{f{N`}}}}{{{b{`}}}Nb}022{Ndn}{{GnGn}Nf}{{Cbh}{{Ah{BjAf}}}}0{Cb{{Ah{cAf}}}{NhNj}}0{{{b{`}}}Nl}0{{{b{{`{c}}}}}{{Ah{cAf}}}Nj}0{{{b{{`{c}}}}}n{}}0{{{b{{`{c}}}}}Al{}}0{{{b{`}}}{{f{d}}}};{{{b{`}}}{{f{Nn}}}}{{{b{`}}}Ml}0=={{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}{{Ah{O`Af}}}}0{{{b{`}}}Bd}0{{{b{`}}}{{A`{{Ah{ObAf}}}}}}{{{b{`}}}{{An{Bd}}}}{{{b{`}}}{{f{Od}}}}{{{b{`}}}j}{{{b{`}}}{{f{Of}}}}{{{b{`}}}{{A`{{Ah{OhAf}}}}}}0{{{b{`}}}{{A`{{An{Al}}}}}}0{{{b{`}}}Ab}0{{{b{`}}}n}{{{b{`}}}l}6=1{{{b{`}}}Oj}00{{{b{`}}}Ol}1{{{b{`}}}On}{{BjA`}Ab}{{AfA`}Ab}0{{GnA`}Ab}{{{b{`}}}Ff}{{{b{`}}}Ad}{Ib{{`{{K`{}{{Jj{{Ah{IfAf}}}}}}Hl}}}}{{{b{`}}}d};;00000;;00;0;0;0;000;0000;0;0000000;0000;0;;00;0;0000;;;;;;00{{{f{d}}}Bj}{cc{}}00000000{{{f{d}}j}{{Ah{IfAf}}}}{{{b{`}}}Ad}?{Cb{{Ah{AfAf}}}}0{{{b{`}}}{{f{Ah}}}}{Cb{{Ah{AjAf}}}}0{{{Bh{ce}}Kn}{{Ah{cAf}}}{HnAl}{I`An}}{{{Gd{ce}}Kn}{{A`{{Ah{cAf}}}}}{HnAl}{I`An}}{{{b{`}}l}n}{{{b{`}}l}{{A`{n}}}}{{{b{`}}Kn}{{Ah{{f{d}}AA`}}}}120{{Idj}{{Ah{IfAf}}}}{{{b{`}}Kn}{{Ah{KnAA`}}}}0{{{b{{`{c}}}}Bd}{{Ah{cAf}}}Nj}{Cb{{Ah{AAbAf}}}}0{{{b{`}}}{{f{AAd}}}}{{{b{`}}}{{f{{Bb{l}}}}}}0{{{b{`}}}{{A`{{Ah{DfAf}}}}}}{{{b{`}}}{{An{Bd}}}}{{{b{`}}}n}0000000000{{{b{`}}}{{f{d}}}}{{{b{`}}l}{{Ah{{A`{AAf}}Af}}}}{{{b{`}}}Ff}{{{b{`}}}{{f{{Bb{j}}}}}}{{{b{`}}}l}0{{{b{`}}}{{f{{Bb{n}}}}}}500{{{b{`}}l}{{A`{AAh}}}}{{{b{`}}}{{A`{{f{{Bb{n}}}}}}}}{{{b{`}}l}{{Ah{AAjAf}}}}{{{b{`}}}j}{{{b{`}}}{{Eh{AAl}}}}{Cb{{Ah{AAnAf}}}}0{{{b{`}}}h}{{{b{`}}}{{f{AB`}}}}{{{b{`}}}{{f{ABb}}}}1{Cb{{Ah{ABdAf}}}}0{Cb{{Ah{ABfAf}}}}0{{{b{`}}}{{f{ABh}}}}{{{b{`}}}Nf}{{Gnc}IhABj}{{{b{`}}}d}{Cb{{Ah{ABlAf}}}}01{Cb{{Ah{ABnAf}}}}0{Cb{{Ah{AC`Af}}}}0{{{b{`}}}{{A`{{Ah{ACbAf}}}}}}{{{b{`}}}{{An{Bd}}}}{Cb{{Ah{ACdAf}}}}0{{{b{`}}}{{f{{Bb{Ff}}}}}}{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}n}{{{b{`}}}j}0000111110011111{{{b{`}}}Ff}{{{b{`}}}{{Ah{DfAf}}}}{{{b{`}}}Bd}{{{b{`}}}{{f{{Bb{Bd}}}}}}{{{b{`}}}{{Bh{DhBd}}}}6667{{{b{`}}}{{f{{Bb{l}}}}}}0877{{{b{`}}}{{Eh{ACf}}}}{{{b{`}}}{{Ah{{Eh{ACf}}Af}}}}9{{{b{`}}}{{A`{{f{d}}}}}}{{{b{`}}}{{f{d}}}}{{{b{`}}}{{A`{ACh}}}}0{ce{}{}}000000002{BjNf}{{{Bh{ce}}}Nf{HnAl}{I`An}}{{{Gd{ce}}}Nf{HnAl}{I`An}}{IdNf}{{{b{`}}}j}{cNf{}}{{{b{`}}}Ad}{{{b{`}}}n}{{{b{`}}}{{A`{{Ah{ACjAf}}}}}}0{{{b{`}}}{{A`{{An{Al}}}}}}0{{{b{`}}}{{Gd{AClAl}}}}3{{{b{`}}}{{f{{Bb{{An{Al}}}}}}}}{{{b{`}}}{{Ah{ACjAf}}}}404{{{b{`}}}{{An{Bd}}}}4{{{b{`}}}Al}0{{{Bh{ce}}}{{`{{K`{}{{Jj{{Ah{cAf}}}}}}}}}{HnAl}{I`An}}{{{Gd{ce}}}{{`{{K`{}{{Jj{{A`{{Ah{cAf}}}}}}}}}}}{HnAl}{I`An}}{{{b{`}}}ACn}{{{b{`}}}AD`}{{{b{`}}}ADb}{{{b{`}}}{{`{{K`{}{{Jj{{Jn{ln}}}}}}}}}}0{{{b{`}}}{{`{{K`{}{{Jj{ADd}}}}}}}}{Id{{`{{K`{}{{Jj{{Ah{IfAf}}}}}}Hl}}}}?{{{b{`}}}{{f{ADf}}}}{{{b{`}}}{{A`{n}}}}{{{b{`}}}{{A`{{f{ADh}}}}}}{{{b{`}}}n}0{{{b{`}}}j}01010{{{b{`}}}l}{{{b{`}}}{{A`{{Ah{ADjAf}}}}}}{{{b{`}}}{{A`{{An{Al}}}}}}{{{b{`}}}{{A`{{Ah{{f{ADl}}Af}}}}}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}{{f{{Bb{Ff}}}}}}{BjKn}{{{Bh{ce}}}Kn{HnAl}{I`An}}{{{Gd{ce}}}Kn{HnAl}{I`An}}{Idj};;::;:;::{Gnj}`{{{b{`}}}{{A`{{Ah{ADnAf}}}}}}{{{b{`}}}{{An{Bd}}}}>{{{b{`}}}{{f{{Bb{Bd}}}}}}{{{b{`}}}{{Bh{AE`Bd}}}}{{{b{`}}}{{Ah{AEbAf}}}}{{{b{`}}}Bd}3{{{b{`}}}{{Bh{AEdBd}}}}{{{b{`}}}n}0{{{b{`}}}{{Ah{DhAf}}}}3{{{b{`}}}l}727{{{b{`}}}{{Bh{AEfBd}}}}{{{b{`}}}{{Bh{AEhBd}}}}{{{b{`}}}Bl}0{{{b{`}}}Ad}{{Cbc}{{Ah{AEjAf}}}{{AEl{{A`{Nf}}}}}}0{{{b{`}}}{{Ah{DfAf}}}}:=={{{b{`}}}{{Bh{DhBd}}}}09999{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}{{f{{Bb{l}}}}}}{{{b{{`{c}}}}}n{}}{{{b{{`{c}}}}}AEn{}}={{{b{`}}}{{Ah{AF`Af}}}}{{{b{`}}}{{Ah{AFbAf}}}}5{{{b{`}}}Bd}0{{{b{{`{c}}}}}{{f{{Bb{Bd}}}}}{}}5{{{b{{`{c}}}}}{{Bh{cBd}}}Nj}{{{b{`}}}n}{{{b{`}}l{f{Ab}}}{{Ah{AdAf}}}}{{{b{`}}}{{A`{{Ah{AjAf}}}}}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}AFd}{{{b{`}}}j}{{{b{`}}}d}06666{{{b{`}}c}{{A`{l}}}{{AEl{j}}}}0072{{{b{`}}}{{f{d}}}}0{{{b{`}}ce}{{A`{AFf}}}{{AEl{j}}}{{AEl{j}}}}{{{b{`}}}{{Ah{AFhAf}}}}={{{b{`}}}{{Ah{DhAf}}}}>{{{b{`}}}{{Ah{AFjAf}}}}?<1?{{{b{`}}}{{Eh{AFl}}}}33{{{b{`}}}Bd}0{{{b{`}}}{{A`{{Ah{DfAf}}}}}}{{{b{`}}}{{An{Bd}}}}{{{b{`}}}n}0006633{{{b{{`{c}}}}}n{}}1{{{b{`}}}{{A`{{Ah{AFnAf}}}}}}{{{b{`}}}{{A`{{An{Bd}}}}}}{{{b{`}}}{{f{AG`}}}}{{{b{`}}}{{A`{n}}}}0000{{{b{`}}}{{A`{{Ah{DlAf}}}}}}711{{{b{`}}}j}0222222{Cb{{Ah{AGbAf}}}}0{{{b{`}}}Ff}0{{{b{`}}h{f{Ab}}}{{Ah{AdAf}}}}{{{b{`}}}Bl}5<04400{{{b{`}}}d}<0<<<{{{b{`}}}Ld}{Cb{{Ah{AGdAf}}}}07>{Cb{{Ah{AGfAf}}}}0?{{{b{`}}}{{f{AGh}}}}{{{f{d}}}Bj}{{{f{d}}}{{Ah{IbAf}}}}{{{f{d}}}{{Ah{IdAf}}}}{{{f{d}}}{{Ah{IfAf}}}}{{{b{`}}}Ad}{An{{A`{Kn}}}}0?{{{b{`}}}n}{{{b{`}}}j}010{Mfj}2{{{b{`}}}{{A`{n}}}}2222232>3{{{b{`}}}Kn}44043344344{Ndn}444{{{b{`}}}Ff}066{{{b{`}}}d}00{Gnj}`{{{b{c}}}Bj{}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}{{A`{{Ah{AGjAf}}}}}}{{{b{`}}}{{f{d}}}}066{Cb{{Ah{AGlAf}}}}0{{{b{`}}}{{Ah{DbAf}}}}00000000000000000000{{{b{`}}}Dd}00000000000000000000{{{b{`}}}{{f{{Bb{Al}}}}}}{{{b{`}}}{{Bh{DbAl}}}}{{{b{`}}}n}{{{b{`}}}{{f{{Bb{Bd}}}}}}{{{b{`}}}{{Bh{AGnBd}}}}2{{{b{`}}}{{Eh{AH`}}}}{{{b{`}}}{{A`{{Ah{{f{{Bb{Ml}}}}Af}}}}}}{{{b{`}}}{{A`{{An{Al}}}}}}55{{{b{`}}}{{A`{{Ah{{f{{Bb{n}}}}Af}}}}}}1{{{b{`}}}{{A`{{Ah{{f{{Bb{AHb}}}}Af}}}}}}2={{GnGn}{{A`{Il}}}}{{{b{`}}}{{A`{ACh}}}}9{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}{{`{{K`{}{{Jj{AHd}}}}Hl}}}};;;;;;{{{b{{`{c}}}}}n{}}<<{Cb{{Ah{AHfAf}}}}0=={{{b{`}}}B`}000>>{{{b{`}}}Ad}0{{{b{`}}}{{f{AHh}}}}{{{b{`}}}n}0{Ndn}1{{{b{`}}}{{f{AHj}}}}{{{b{`}}}{{f{AHl}}}}{{{b{`}}}{{f{AHn}}}}{Bj{{Ah{NjAf}}}}{Bj{{Ah{BjAf}}}}{{Bjn}{{Ah{{b{`}}Af}}}}0{{Bjnn}{{Ah{{b{`}}Af}}}}1{{Bjh}{{Ah{{b{`}}Af}}}}2{{BjAI`AI`}{{Ah{{b{`}}Af}}}}333{{Bjnnn}{{Ah{{b{`}}Af}}}}334{Bj{{Ah{NdAf}}}}{Bj{{Ah{MfAf}}}}{{Bj{AIb{Kn}}}{{Ah{{f{c}}Af}}}{AIdAIf}}{{BjKn}{{Ah{cAf}}}I`}{{BjKn}{{Ah{{Bb{c}}Af}}}I`}{{{b{`}}{f{{AIh{c}}}}{f{AIj}}}{{Ah{IhAf}}}AIl}{{BjKn}{{Ah{cAf}}}{AIdAIf}}{{Bjc}{{Ah{AlAf}}}{}}{Bj{{Ah{cAf}}}{}}{{Bj{AIb{Kn}}}{{Ah{cAf}}}Al}1{{{b{`}}}n}00{{{b{`}}}{{f{{Bb{n}}}}}}1{{AInBj}{{Ah{cAf}}}Nj}{{AJ`Bj}{{A`{{Ah{cAf}}}}}Nj}{{{b{c}}e}{{Ah{gAf}}}{}AnNj}{{AInBj}{{Ah{cAf}}}Al}{{AJ`Bj}{{A`{{Ah{cAf}}}}}Al}{{{b{`}}l{f{Ab}}}{{Ah{AdAf}}}}{{{b{`}}}{{A`{{Ah{AjAf}}}}}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}{{A`{Ff}}}}{{{b{`}}}Ff}000{{{b{`}}}Ml}{{{b{`}}}{{f{{Bb{j}}}}}}<{Cb{{Ah{AJbAf}}}}0{{{b{`}}}Ab}00000000000?{{{b{`}}}{{Ah{AJdAf}}}}0{{{b{`}}}Bd}0{{{b{`}}}{{f{AJf}}}}{{{b{`}}}n}0{Ndn}1{{{b{`}}}j}2222222{{{b{`}}}{{f{AJh}}}}000003{{{b{`}}}{{f{{Bb{Bd}}}}}}4{{{b{`}}}{{f{{Bb{{An{Bd}}}}}}}}{{{b{`}}}{{Gd{AJjBd}}}}{{{b{`}}}{{Bh{AJlBd}}}}73{{{b{`}}}{{Bh{AJnBd}}}}{{{b{`}}}{{Ah{BjAf}}}};7{Ndj}:{{{b{`}}}{{Ah{AK`Af}}}}{{{b{`}}}Al}{{{b{`}}l}{{A`{Ff}}}}0{{{b{`}}}{{Ah{KnAf}}}}0{{Bjc}{{A`{Bj}}}{{AKb{Kn}}}}{{{b{`}}}{{Ah{DbAf}}}}{{{b{`}}}Dd}{{BjKn}{{A`{Bj}}}}{{{b{`}}}Ab}0{{{b{`}}}j}{{{b{`}}}{{f{{Bb{n}}}}}}{{{b{`}}}l}{{{b{`}}}n}{Cb{{Ah{AKdAf}}}}01{{{b{`}}}{{f{{Bb{Al}}}}}}{{{b{`}}}{{Bh{AKfAl}}}}{{{b{`}}}Bj}{{{b{`}}}{{A`{{Cl{AKh}}}}}}7{{{b{{`{c}}}}}n{}}6660666{{{b{`}}}{{f{{Bb{l}}}}}}007{{{b{`}}}{{f{AKj}}}}{{{b{{`{c}}}}}{{f{{Bb{Bd}}}}}{}}{{{b{{`{c}}}}}{{Bh{cBd}}}Nj}{{{b{`}}}{{A`{Ff}}}}{{Ifh}{{A`{Bj}}}}`{{{b{`}}}{{f{{Bb{j}}}}}}{Mf{{f{{Bb{j}}}}}}{{{b{`}}}{{f{Gn}}}}{Nd{{f{Gn}}}}`{Gnh}`{{BjKn}{{A`{Bj}}}}{ce{}{}}00000000{cAKl{}}{AnKn}{{{b{`}}}{{f{d}}}}{{{b{`}}}n}{{{b{`}}}{{f{{Bb{Ff}}}}}}22{{{b{`}}}{{Ah{AKnAf}}}}{{{b{`}}}{{Ah{AL`Af}}}}{{{b{`}}}Dd}0{c{{Ah{e}}}{}{}}00000000000000000{{{b{`}}l{f{Ab}}}{{Ah{AdAf}}}}{{{b{`}}}{{A`{{Ah{AjAf}}}}}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}h}{Mfh}{{{b{`}}}ALb}{{{b{`}}}ALd}0{{{b{`}}}{{Cl{ALf}}}}0{{{b{`}}}{{Eh{ACh}}}}{cALh{}}00000000`{{{b{`}}}Ml}{{{b{`}}}{{A`{j}}}}0{{{b{`}}}j}000{{{b{`}}}Bl}0{{{b{`}}}n}{{{b{`}}}{{A`{n}}}}0110001111{{{b{`}}}{{f{ALj}}}}{{{b{`}}l}{{Ah{{A`{{AIb{Kn}}}}Af}}}}{{{b{`}}Kn}{{Ah{{Jn{ln}}Af}}}}{{{b{`}}l}{{Ah{{A`{{Jn{DbALl}}}}Af}}}}{{{b{`}}l}{{Ah{{A`{ALn}}Af}}}}{{{b{`}}Kn}{{Ah{{Jn{DbALl}}Af}}}}{{{b{`}}}{{f{ABh}}}}{{{b{`}}l{f{Ab}}}{{Ah{AdAf}}}}{{{b{`}}}{{A`{{Ah{AjAf}}}}}}{{{b{`}}}{{An{Al}}}}{{{b{`}}}Ad}0<{{{b{`}}}AI`}00000{{{b{`}}}Ml}000{{{b{`}}}AM`}??{{{b{`}}}{{f{AMb}}}}{{{b{`}}}{{Eh{AM`}}}}{{{b{`}}}j}000000000000008{{{b{`}}}{{A`{{An{Al}}}}}}{{{b{`}}}{{f{AMd}}}}{{{b{`}}n}{{Ah{AMfAf}}}}{{{b{`}}}n}{{{b{`}}}{{Ah{AMhAf}}}}{{{b{`}}}Al}{{{b{`}}}{{Eh{AMj}}}}{{{b{`}}}AMl}000400{{{b{`}}}AMn}51115111110151555501{MfAMl}{{{b{`}}}{{A`{{Ah{ACbAf}}}}}}{{{b{`}}}{{An{Bd}}}}{Cb{{Ah{AN`Af}}}}0{Cb{{Ah{ANbAf}}}}0{Cb{{Ah{ANdAf}}}}0;{{{b{`}}}Bl}000000000{{{b{`}}}Ff}000{{{b{`}}}{{A`{{Ah{MdAf}}}}}}611212222111{{{b{`}}}Ab}000{{{b{`}}}Ad}00044444444443332834343434433111133333333330000``{ce{}{}}000{{{Eh{c}}}{{Eh{c}}}{HlHn}}{{ce}Ih{}{}}{{{Eh{c}}A`}AbHn}{cc{}}0{{{Cl{c}}Kn}{{A`{{Ah{cAf}}}}}{NjANf}}{{{Eh{c}}Kn}{{Ah{cAf}}}Al}66{{{Eh{c}}}NfANh}{{{Cl{c}}}{{`{{K`{}{{Jj{{Ah{cAf}}}}}}}}}{NjANf}}{{{Eh{c}}}{{`{{K`{}{{Jj{{Ah{cAf}}}}}}}}}Al}{{{Eh{c}}}KnANh}{Bj{{Eh{c}}}ANh}{Bj{{Ah{{Cl{c}}Af}}}{}}{Bj{{Ah{cAf}}}{}}{{Bjc}{{Ah{{Eh{e}}Af}}}{}{ANhAl}}>{c{{Ah{e}}}{}{}}000{cALh{}}0`````````````````````````````````````````{{CjAd}Ad}{Cdn}{Cd{{Cl{Cj}}}}{Cj{{f{ANj}}}}`{ce{}{}}000{CjCj}{ANjANj}{{ce}Ih{}{}}0{{CjCj}Il}{{ANjANj}Il}{{CjCj}Nf}{{ANjANj}Nf}{{CjA`}Ab}{{ANjA`}Ab}{cc{}}0{ANjAb}`{{Cjc}IhABj}{{ANjc}IhABj}=={cNf{}}{{CjCj}{{A`{Il}}}}{{ANjANj}{{A`{Il}}}}{Cjn}`{Bj{{Ah{CdAf}}}}{Bj{{Ah{CjAf}}}}{Bj{{Ah{cAf}}}{}}9`{ce{}{}}0{c{{Ah{e}}}{}{}}000{cALh{}}0{CdAMl}`````````````````{F`n}{ANln}{ANnn}{AO`n}{Dln}{F`{{f{{Bb{Bd}}}}}}3{F`{{Bh{DlBd}}}}{AObn}{AOb{{f{Ed}}}}{Edh}`{{ElBj}{{Ah{AObAf}}}}{Ejn}{ACb{{Ah{EjAf}}}}{ACbBd}{ElBd}`{Ej{{f{El}}}}{Elh}`{Enn}{ACb{{A`{{Ah{EnAf}}}}}}{ACb{{An{Bd}}}}{AOb{{A`{{Ah{F`Af}}}}}}{AOb{{An{Bd}}}}{En{{f{{Bb{h}}}}}}{ce{}{}}0000000{ElEl}{EdEd}{NnNn}{DlDl}{{ce}Ih{}{}}000{ANlFf}{ANnFf}{AO`Ff}{DlFf}{F`n}{AOb{{A`{{Ah{LnAf}}}}}}={AO`{{A`{{Ah{MdAf}}}}}}{AO`{{An{Bd}}}}{Lnn}{Ln{{f{Nn}}}}{Nnh}`{{ElA`}Ab}{{EdA`}Ab}{{NnA`}Ab}{cc{}}000{AOd{{A`{{Ah{ACbAf}}}}}}{AOd{{An{Bd}}}}{ce{}{}}000{cNf{}}00{AOd{{A`{{Ah{ACjAf}}}}}}{AOd{{A`{{An{Al}}}}}}{Ln{{A`{{Ah{DlAf}}}}}}{{NnBj}{{A`{{Ah{LnAf}}}}}}{Ln{{An{Bd}}}}{Nn{{An{Bd}}}}`3210`{{EdBj}{{Ah{LnAf}}}}{EdBd}`{Bj{{Ah{AOdAf}}}}{Bj{{Ah{ACbAf}}}}{Bj{{Ah{EnAf}}}}{Bj{{Ah{EjAf}}}}{Bj{{Ah{AObAf}}}}{Bj{{Ah{F`Af}}}}{Bj{{Ah{LnAf}}}}{Bj{{Ah{ANlAf}}}}{Bj{{Ah{ANnAf}}}}{Bj{{Ah{AO`Af}}}}{Bj{{Ah{DlAf}}}}{Bj{{Ah{cAf}}}{}}{ANnn}{ce{}{}}000{c{{Ah{e}}}{}{}}0000000{cALh{}}000{AOdAMl}{AOd{{A`{{Ah{ACbAf}}}}}}{AOd{{An{Bd}}}}`````````````````````````````````{AOfj}{AOhd}`{{}AOj}{AOlADd}`{AOhADd}`0`{AOn{{f{Fb}}}}{B`{{f{Fb}}}}{Fdd}``{{AOjAOj}AOj}{{AOjAOj}Ih}10{AOjd}21{ce{}{}}00000000000000000000000008`{AOld}`9`{FdFd}{AOlAOl}{AOjAOj}{FbFb}{AOhAOh}{BbBb}{AAdAAd}{BdBd}{LhLh}{BfBf}{BhBh}{LjLj}{BjBj}{{ce}Ih{}{}}000000000000{{FdFd}Il}{{AOlAOl}Il}{{AOjAOj}Il}{{FbFb}Il}{{AOhAOh}Il}{{AAdAAd}Il}{{BdBd}Il}{Fdj}`{{AOjAOj}Nf}```{{}AOj}{{}Lh}{AOlADd}`{{AOjAOj}AOj}3{Fdl}`{{FdFd}Nf}{{AOlAOl}Nf}7{{FbFb}Nf}{{AOhAOh}Nf}{{AAdAAd}Nf}{{BdBd}Nf}{{BfBf}Nf}{AOfl}{FdAOj}`{{FdA`}Ab}{{AOlA`}Ab}{{AOjA`}Ab}0000{{FbA`}Ab}{{AOhA`}Ab}{{AAdA`}Ab}{{BdA`}Ab}{{BfA`}Ab}`{cc{}}000000000000{d{{A`{AOj}}}}{dAOj}{cAOj{}}{Bl{{f{AAd}}}}{B`{{f{{Bb{l}}}}}}{AAdl}{Bdl}``{{Fdc}IhABj}{{AOlc}IhABj}{{AOjc}IhABj}{{Fbc}IhABj}{{AOhc}IhABj}{{AAdc}IhABj}{{Bdc}IhABj}{Fbd}{AOhd}``{FdAOl}`2`{FbADd}`0`{Bnj}{AOnj}{BA`j}{Blj}{B`j}{Bbj}{Bnn}{AOnn}{BA`n}{Bln}{B`n}{Bbn}:7543210{Fdj}`0`{{AOjAOj}Ih}{{AOjAOj}AOj}{{AOjAOj}Nf}{ce{}{}}000000000000{AOjNf}{LhNf}{cNf{}}000000{AOfl}{{FdBjl}{{Ah{LhAf}}}}{AOlADd}```0`0`0`{AOjAOj}{Blj}{B`j}=`3`3`{{FdFd}{{A`{Il}}}}{{AOlAOl}{{A`{Il}}}}{{AOjAOj}{{A`{Il}}}}{{FbFb}{{A`{Il}}}}{{AOhAOh}{{A`{Il}}}}{{AAdAAd}{{A`{Il}}}}{{BdBd}{{A`{Il}}}}{Fdd}`0`{Bj{{Ah{AOfAf}}}}{Bj{{Ah{BnAf}}}}{Bj{{Ah{AOnAf}}}}{Bj{{Ah{BA`Af}}}}{Bj{{Ah{BlAf}}}}{Bj{{Ah{B`Af}}}}{Bj{{Ah{BbAf}}}}{Bj{{Ah{cAf}}}{}}{{AOjAOj}Ih}{AAdn}`{Bn{{f{{Bb{j}}}}}}{BA`{{f{{Bb{n}}}}}}{Fdl}`{{AOjAOj}AOj}5{ce{}{}}000000000000{AOjc{}}7{c{{Ah{e}}}{}{}}0000000000000000000000000{cALh{}}0000000000004{FdAOl}`{Fbd}`{FbADd}`0`1{AOhd}``{AOld}`{BdADd}`0``{{FjLh}{{Ah{LjAf}}}}{Fjn}0{Bj{{Ah{FjAf}}}}`{Fl{{f{Fd}}}}{Fln}0{Flj}{Bj{{Ah{FlAf}}}}``{BAb{{f{d}}}}{ce{}{}}0{FnFn}{{ce}Ih{}{}}{cc{}}{FnBAd}{BAbd}{FnBAb}611{{FnKn}{{A`{BAf}}}}32{FnBj}{Bj{{Ah{BAbAf}}}}{Bj{{Ah{FnAf}}}}{Bj{{Ah{cAf}}}{}}{{FnBAh}{{A`{BAf}}}}8<8={c{{Ah{e}}}{}{}}0{cALh{}}``{BAj{{f{d}}}}??{G`G`}>={G`BAl}{G`BAj}{BAjd}{ce{}{}}11{G`Bj}{Bj{{Ah{BAjAf}}}}{Bj{{Ah{G`Af}}}}<38{G`{{f{d}}}}{BAjn}:<<;`````````````````````````````````````````{AHjd}`66666666666666666666666666{MnMn}{BAnBAn}{BB`BB`}{BBbBBb}{AB`AB`}{ABbABb}{AMdAMd}{ALjALj}{AHjAHj}{AFfAFf}{AD`AD`}{ACnACn}{ADbADb}{{ce}Ih{}{}}000000000000{{BAnBAn}Il}{{BBbBBb}Il}{{AB`AB`}Il}{{ABbABb}Il}{{ALjALj}Il}{{AHjAHj}Il}{{}BAn}{{AMdBj}{{A`{{Ah{BBdAf}}}}}}{AMd{{An{Al}}}}`{Mnn}`{Ij{{f{Mn}}}}{AB`j}{ABbj}``{BBf{{f{{Bb{n}}}}}}{BBhn}{BBbn}`{BBfn}{{BAnBAn}Nf}{{BBbBBb}Nf}{{AB`AB`}Nf}{{ABbABb}Nf}{{ALjALj}Nf}{{AHjAHj}Nf}{{AFfAFf}Nf}98`{{MnA`}Ab}{{BAnA`}Ab}{{BBbA`}Ab}{{AB`A`}Ab}{{ABbA`}Ab}{{AMdA`}Ab}{{ALjA`}Ab}{{AHjA`}Ab}{{AFfA`}Ab}{BBjn}{BBln}{BBfn}{BBhn}{BBnn}{BC`n}{BCbn}{BCdn}{BCfn}{BB`n}{cc{}}000000000000{cBAn{}}{ABbj}{ALjn}``{BBj{{f{d}}}}{BBf{{f{{Bb{n}}}}}}{BBh{{f{{Bb{n}}}}}}{BC`{{f{{Bb{n}}}}}}{BBn{{f{AB`}}}}{BCb{{f{AB`}}}}{BCd{{f{ABb}}}}{{BAnc}IhABj}{{BBbc}IhABj}{{AB`c}IhABj}{{ABbc}IhABj}{{ALjc}IhABj}{{AHjc}IhABj}{BBf{{f{{Bb{Ff}}}}}}{BBbFf}`{BBbn}`>{ce{}{}}000000000000000{BBn{{f{d}}}}{cNf{}}000000{BBfAD`}{BCbACn}{BCfADb}{BBjn}{BBln}{BBfn}{BBhn}{BBnj}{BC`j}{BCbj}{BCdj}76543210{BCfj}{{Ijc}{{A`{l}}}{{AEl{j}}}}{{BBfc}{{A`{l}}}{{AEl{j}}}}{{BCbc}{{A`{l}}}{{AEl{j}}}}{{BCfce}{{A`{AFf}}}{{AEl{j}}}{{AEl{j}}}}{nBAn}{AD`{{A`{c}}}{}}{ACn{{A`{c}}}{}}{ADb{{A`{c}}}{}}{{AMdBj}{{A`{{Ah{BChAf}}}}}}{AMd{{An{Al}}}}`=><;{Ijn}{BBdj}{BChj}={{BAnBAn}{{A`{Il}}}}{{BBbBBb}{{A`{Il}}}}{{AB`AB`}{{A`{Il}}}}{{ABbABb}{{A`{Il}}}}{{ALjALj}{{A`{Il}}}}{{AHjAHj}{{A`{Il}}}}{MnBAn}`{BBfn}{BBd{{f{AHj}}}}{Bj{{Ah{IjAf}}}}{Bj{{Ah{BBjAf}}}}{Bj{{Ah{BBlAf}}}}{Bj{{Ah{BBfAf}}}}{Bj{{Ah{BBhAf}}}}{Bj{{Ah{BBnAf}}}}{Bj{{Ah{BC`Af}}}}{Bj{{Ah{BCbAf}}}}{Bj{{Ah{BCdAf}}}}{Bj{{Ah{BCfAf}}}}{Bj{{Ah{BBdAf}}}}{Bj{{Ah{BChAf}}}}{Bj{{Ah{BB`Af}}}}{Bj{{Ah{cAf}}}{}}??{BC`j}{AB`j}{ABbj}``{BBf{{f{{Bb{n}}}}}}2`{AHjGl}`{BBl{{f{{Bb{n}}}}}}{{MnBj}{{Ah{BB`Af}}}}{MnAl}`{ce{}{}}000000000000{BAnc{}}{c{{Ah{e}}}{}{}}0000000000000000000000000{cALh{}}000000000000{ALjGl}`{BCh{{f{ALj}}}}{BCf{{f{AMd}}}}{AMdGl}`{Ijn}````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````{BCjAb}{BClAb}{BCnAb}{BD`Ab}{JdAb}{JfAb}````{BDbAb}{BDdAb}{BDfAb}{BDhAb}{BDj{{Ah{DbAf}}}}{BDjDd}{Jh{{A`{{Ah{DnAf}}}}}}{Jh{{A`{{An{Al}}}}}}{Dn{{f{E`}}}}{Jh{{A`{{Ah{{f{Eb}}Af}}}}}}{Jh{{An{Al}}}}{ce{}{}}00000000000000000000000{BDlBl}{BDnBl}{BE`Bl}{BEbBl}{BEdBl}{BEfBl}{BDfBl}{BDhBl}{BEhBl}{BEjBl}9876543210{{HjBj}{{Ah{ALnAf}}}}{HjDd}`{Jh{{A`{{Ah{HhAf}}}}}}{Jh{{A`{{An{Al}}}}}}{Hh{{f{Hj}}}}{EbEb}{ADlADl}{E`E`}{HjHj}{ALnALn}{BCnBCn}{BD`BD`}{JdJd}{JfJf}{NlNl}{DbDb}{KfKf}{{ce}Ih{}{}}00000000000{{EbEb}Il}{{ADlADl}Il}{{BCnBCn}Il}{{BD`BD`}Il}{{JdJd}Il}{{JfJf}Il}{{NlNl}Il}{{KfKf}Il}{BEl{{Ah{J`Af}}}}{BEn{{Ah{InAf}}}}{BF`{{Ah{J`Af}}}}{BFb{{Ah{InAf}}}}{BDl{{Ah{J`Af}}}}{BDn{{Ah{InAf}}}}{BElDd}{BEnDd}{BF`Dd}{BFbDd}{BDlDd}{BDnDd}{J`{{f{Jd}}}}{In{{f{Jf}}}}{BDjKf}{{}Nl}{{}Kf}{AKnAd}{AL`Ad}{BFdBl}{BFfBl}3210{BDlAb}{BDnAb}{Hjl}`{{EbEb}Nf}{{ADlADl}Nf}{{BCnBCn}Nf}{{BD`BD`}Nf}{{JdJd}Nf}{{JfJf}Nf}{{NlNl}Nf}{{KfKf}Nf}{J`Nl}{InNl}{BFhj}{Ebn}`{{EbA`}Ab}{{ADlA`}Ab}{{E`A`}Ab}{{HjA`}Ab}{{BCnA`}Ab}{{BD`A`}Ab}{{JdA`}Ab}{{JfA`}Ab}{{NlA`}Ab}{{KfA`}Ab}{Hhd}{BFjd}{BFld}{BFhd}{BCjd}{BCld}{BEld}{BEnd}{BF`d}{BFbd}{BDld}{BDnd}{BFnd}{BG`d}{BGbd}{BGdd}{BFdd}{BFfd}{BGfd}{BGhd}{BE`d}{BEbd}{BGjd}{BGld}{BEdd}{BEfd}{BDbd}{BDdd}{BDfd}{BDhd}{BGnd}{BH`d}{BEhd}{BEjd}{BDjd}{ALnd}{Dbd}{cc{}}00000000000{cNl{}}{cKf{}}{BFnl}{BG`l}{Ebl}{ADll}{E`l}```{{Ebc}IhABj}{{ADlc}IhABj}{{BCnc}IhABj}{{BD`c}IhABj}{{Jdc}IhABj}{{Jfc}IhABj}{{Nlc}IhABj}{{Kfc}IhABj}{ce{}{}}00000000000{cNf{}}0000000{Jh{{A`{{Ah{ACjAf}}}}}}{Jh{{A`{{An{Al}}}}}}{Jh{{A`{{Ah{ADjAf}}}}}}1{Jh{{A`{{Ah{{f{ADl}}Af}}}}}}{Jh{{An{Al}}}}{dNl}{dKf}{Dnj}{Jhn}{Hhj}1{ADjj}{BFhd}{Ebn}`{J`n}{Inn}{BFn{{Ah{DbAf}}}}{BGb{{Ah{DbAf}}}}{BGd{{Ah{DbAf}}}}{BFd{{Ah{DbAf}}}}{BFf{{Ah{DbAf}}}}{BGf{{Ah{DbAf}}}}{BGh{{Ah{DbAf}}}}{BE`{{Ah{DbAf}}}}{BEb{{Ah{DbAf}}}}{BGj{{Ah{DbAf}}}}{BGl{{Ah{DbAf}}}}{BEd{{Ah{DbAf}}}}{BEf{{Ah{DbAf}}}}{BDb{{Ah{DbAf}}}}{BDd{{Ah{DbAf}}}}{BDf{{Ah{DbAf}}}}{BDh{{Ah{DbAf}}}}{BGn{{Ah{DbAf}}}}{BH`{{Ah{DbAf}}}}{BEh{{Ah{DbAf}}}}{BEj{{Ah{DbAf}}}}{{E`Bj}{{Ah{DbAf}}}}{BFnDd}{BGbDd}{BGdDd}{BFdDd}{BFfDd}{BGfDd}{BGhDd}{BE`Dd}{BEbDd}{BGjDd}{BGlDd}{BEdDd}{BEfDd}{BDbDd}{BDdDd}{BDfDd}{BDhDd}{BGnDd}{BH`Dd}{BEhDd}{BEjDd}{E`Al}`{ADj{{f{{Bb{Al}}}}}}{ADj{{Bh{DbAl}}}}{BCjn}{BCln}{ADln}{BCnn}{BD`n}{Jdn}{Jfn}`````{{EbEb}{{A`{Il}}}}{{ADlADl}{{A`{Il}}}}{{BCnBCn}{{A`{Il}}}}{{BD`BD`}{{A`{Il}}}}{{JdJd}{{A`{Il}}}}{{JfJf}{{A`{Il}}}}{{NlNl}{{A`{Il}}}}{{KfKf}{{A`{Il}}}}{BF`B`}{BFbB`}10{Bj{{Ah{JhAf}}}}{Bj{{Ah{DnAf}}}}{Bj{{Ah{ADjAf}}}}{Bj{{Ah{HhAf}}}}{Bj{{Ah{BFjAf}}}}{Bj{{Ah{BFlAf}}}}{Bj{{Ah{J`Af}}}}{Bj{{Ah{InAf}}}}{Bj{{Ah{BFhAf}}}}{Bj{{Ah{BCjAf}}}}{Bj{{Ah{BClAf}}}}{Bj{{Ah{BElAf}}}}{Bj{{Ah{BEnAf}}}}{Bj{{Ah{BF`Af}}}}{Bj{{Ah{BFbAf}}}}{Bj{{Ah{BDlAf}}}}{Bj{{Ah{BDnAf}}}}{Bj{{Ah{BFnAf}}}}{Bj{{Ah{BG`Af}}}}{Bj{{Ah{BGbAf}}}}{Bj{{Ah{BGdAf}}}}{Bj{{Ah{AKnAf}}}}{Bj{{Ah{AL`Af}}}}{Bj{{Ah{BFdAf}}}}{Bj{{Ah{BFfAf}}}}{Bj{{Ah{BGfAf}}}}{Bj{{Ah{BGhAf}}}}{Bj{{Ah{BE`Af}}}}{Bj{{Ah{BEbAf}}}}{Bj{{Ah{BGjAf}}}}{Bj{{Ah{BGlAf}}}}{Bj{{Ah{BEdAf}}}}{Bj{{Ah{BEfAf}}}}{Bj{{Ah{BDbAf}}}}{Bj{{Ah{BDdAf}}}}{Bj{{Ah{BDfAf}}}}{Bj{{Ah{BDhAf}}}}{Bj{{Ah{BGnAf}}}}{Bj{{Ah{BH`Af}}}}{Bj{{Ah{BEhAf}}}}{Bj{{Ah{BEjAf}}}}{Bj{{Ah{BDjAf}}}}{Bj{{Ah{ALnAf}}}}{Bj{{Ah{DbAf}}}}{Bj{{Ah{cAf}}}{}}0{BGjAb}{BGlAb}{BEdAb}{BEfAb}{BGfAb}{BGhAb}{BE`Ab}{BEbAb}3210{BDj{{Ah{DbAf}}}}{BDjDd}{BDlAb}{BDnAb}{Hjl}`{JdAb}{JfAb}``{ce{}{}}00000000000{Nlc{}}{Kfc{}}{BGb{{Ah{AKnAf}}}}{BGd{{Ah{AL`Af}}}}{BGbDd}{BGdDd}{c{{Ah{e}}}{}{}}00000000000000000000000{cALh{}}00000000000{{Jhl}{{Ah{{A`{{AIb{Kn}}}}Af}}}}{{JhKn}{{Ah{{Jn{ln}}Af}}}}{{Jhl}{{Ah{{A`{{Jn{DbALl}}}}Af}}}}{{Jhl}{{Ah{{A`{ALn}}Af}}}}{{JhKn}{{Ah{{Jn{DbALl}}Af}}}}{BFlj}{BClj}{BEnj}{BFbj}{BDnj}{AL`j}{BFfj}{BGhj}{BEbj}{BGlj}{BEfj}{BDdj}{BDhj}{BH`j}{BEjj}{BD`j}{Jfj}``{Jh{{A`{{Ah{AjAf}}}}}}{Jh{{A`{{An{Al}}}}}}{Jhn}{BElBl}{BEnBl}{BF`Bl}{BFbBl}321032{BFjBl}{BFlBl}{ALnBl}210{BGnAb}{BH`Ab}{BEhAb}{BEjAb}{AKnAd}{AL`Ad}10<;:9<;:9<;87687654321010`````{{}AHb}{Jbd}`{{AHbAHb}AHb}{{AHbAHb}Ih}10{AHbj}213`{ce{}{}}000{AHbAHb}{JbJb}{{ce}Ih{}{}}0{{AHbAHb}Il}{{JbJb}Il}{Lb{{f{{Bb{n}}}}}}{Lb{{A`{{Ah{{f{Jb}}Af}}}}}}{Lb{{An{Al}}}}{{AHbAHb}Nf}><>0{{JbJb}Nf}{{AHbA`}Ab}0000{{JbA`}Ab}{cc{}}0{j{{A`{AHb}}}}{jAHb}{cAHb{}}{Jbd}`{{AHbc}IhABj}{{Jbc}IhABj}{{AHbAHb}Ih}{{AHbAHb}AHb}<{ce{}{}}0{AHbNf}{cNf{}}0{AHbAHb}{Lbn}00{Lb{{A`{{Ah{{f{{Bb{Ml}}}}Af}}}}}}{Lb{{A`{{An{Al}}}}}}{Lb{{A`{{Ah{{f{{Bb{n}}}}Af}}}}}}1{Lb{{A`{{Ah{{f{{Bb{AHb}}}}Af}}}}}}2{{AHbAHb}{{A`{Il}}}}{{JbJb}{{A`{Il}}}}{Bj{{Ah{LbAf}}}}{Jbd}`>=><<{AHbc{}}?{c{{Ah{e}}}{}{}}000{cALh{}}0{{AHbAHb}AHb}<```{{BHbAd}Ad}{ce{}{}}0{BHbBHb}{{ce}Ih{}{}}{Lf{{Ah{BjAf}}}}{LfBd}{{Lfn{f{Ab}}{f{Kj}}}{{Ah{IhAf}}}}{{BHbBHb}Nf}{{BHbA`}Ab}{cc{}}8{{}Nf}{{nFfFf}BHb}`{Bj{{Ah{LfAf}}}};??{LfALd}{Lf{{Cl{ALf}}}}{cALh{}}`{{Lfn}{{Ah{AMfAf}}}}{LfAMl}`{{MhLh}{{Ah{LjAf}}}}{Mhn}0{Bj{{Ah{MhAf}}}}`{Mj{{f{Fd}}}}{Mjn}0{Mjj}{Bj{{Ah{MjAf}}}}````{Af{{Ah{{f{Cf}}Af}}}}{Ch{{f{Cf}}}}{Afn}{Af{{Ah{ChAf}}}}{AfBd}{CfMl}`3{Cfh}`{ce{}{}}000{CfCf}{ACfACf}{{ce}Ih{}{}}0{{CfCf}Il}{{{Jn{nn}}}Kn}`{CfAd}`{{CfCf}Nf}{Cfn}``{{CfA`}Ab}{{ACfA`}Ab}{cc{}}0{{Cfc}IhABj}{Afn}0{Af{{Ah{{Eh{ACf}}Af}}}}{Ch{{Eh{ACf}}}}??{cNf{}}:`:`{{CfAd}Ad}{{CfCf}{{A`{Il}}}}`{Bj{{Ah{AfAf}}}}{{Bjnnn}{{Ah{ChAf}}}}{{Bjnn}{{Ah{ACfAf}}}}{{Bj{Jn{nnn}}}{{Ah{ChAf}}}}{{Bjc}{{Ah{ACfAf}}}{}}`{ce{}{}}0{c{{Ah{e}}}{}{}}000{cALh{}}0{AfAMl}```````{{}BHd}{{BHdBHd}BHd}{{BHdBHd}Ih}10{BHdn}217777{AhAh}{BHdBHd}{{ce}Ih{}{}}0{{AhAh}Il}{{BHdBHd}Il}{{BHdBHd}Nf}989{{AhAh}Nf}1{{AhA`}Ab}{{BHdA`}Ab}0000{cc{}}0{n{{A`{BHd}}}}{nBHd}{cBHd{}}{BHf{{f{Ah}}}}{{Ahc}IhABj}{{BHdc}IhABj}{{BHdBHd}Ih}{{BHdBHd}BHd}<{ce{}{}}0{BHdNf}{cNf{}}0{BHdBHd}{BHfn}{{AhAh}{{A`{Il}}}}{{BHdBHd}{{A`{Il}}}}{AhBHd}`{Ahn}`{Bj{{Ah{BHfAf}}}};:;99{BHdc{}}<{c{{Ah{e}}}{}{}}000{cALh{}}0=8`````````````````````````````{Aj{{A`{{Ah{BnAf}}}}}}{Aj{{An{Bd}}}}{Bn{{f{{Bb{Bd}}}}}}{Bn{{Bh{C`Bd}}}}{ce{}{}}000{AE`n}{BHhn}{BHjn}{BHln}{Fhn}{AE`{{f{{Bb{Bd}}}}}}3{AE`{{Bh{FhBd}}}}{BHnBHn}{FhFh}{{ce}Ih{}{}}0{{BHnBHn}Il}{BHhFf}{BHlFf}{Bn{{Ah{DhAf}}}}{ADn{{Ah{DhAf}}}}{BnBd}{ADnBd}{AFn{{f{{Bb{Al}}}}}}{AFn{{Bh{DhAl}}}}{{}BHn}{BHl{{Ah{MdAf}}}}{BHlBd}{{BHnBHn}Nf}{{BHnA`}Ab}{AFnn}{cc{}}0{cBHn{}}{Aj{{A`{{Ah{DfAf}}}}}}{Aj{{An{Bd}}}}{Bnn}{{BHnc}IhABj}{ce{}{}}0{Aj{{A`{{Ah{ACjAf}}}}}}{Aj{{A`{{An{Al}}}}}}{Aj{{A`{{Ah{ADnAf}}}}}}6{ADnn}{ADn{{f{{Bb{Bd}}}}}}{ADn{{Bh{AE`Bd}}}}:9={Aj{{A`{{Ah{AFnAf}}}}}}{Aj{{A`{{An{Bd}}}}}}{nBHn}{{BHnBHn}{{A`{Il}}}}{C`n}{C`{{f{{Bb{n}}}}}}{Bj{{Ah{AjAf}}}}{Bj{{Ah{BnAf}}}}{Bj{{Ah{C`Af}}}}{Bj{{Ah{ADnAf}}}}{Bj{{Ah{AE`Af}}}}{Bj{{Ah{BHhAf}}}}{Bj{{Ah{BHjAf}}}}{Bj{{Ah{BHlAf}}}}{Bj{{Ah{AFnAf}}}}{Bj{{Ah{FhAf}}}}{Bj{{Ah{cAf}}}{}}{ce{}{}}0{BHnc{}}{c{{Ah{e}}}{}{}}000{cALh{}}0{AjAMl}`````````````````````````````````````````````````{{}BI`}{{}Jl}`{{BI`BI`}BI`}{{JlJl}Jl}{{BI`BI`}Ih}{{JlJl}Ih}3210{BI`d}{Jln}5432<<<<<<<<<<<<<<<<<<<<<<`{{AIjBIb}Ih}{AIjIh}{BI`BI`}{JlJl}{BIdBId}{BIbBIb}{AIjAIj}{AHdAHd}{BIfBIf}{KdKd}{BIhBIh}{BIjBIj}{BIlBIl}{{ce}Ih{}{}}0000000000{{BI`BI`}Il}{{JlJl}Il}{BIn{{f{d}}}}{BIn{{`{{K`{}{{Jj{{Jn{lJl}}}}}}Hl}}}}{BIn{{`{{K`{}{{Jj{Kd}}}}Hl}}}}{BIfJl}{BIhJl}{{BI`BI`}Nf}{{JlJl}Nf}{BIn{{Jn{Kn{A`{{f{d}}}}}}}}{{}BI`}{{}Jl}{{}BIb}{{}AIj}{{}BIf}{{}BIl}{{BI`BI`}BI`}{{JlJl}Jl}76{BJ`{{f{{Bb{n}}}}}};:{{BIbBIb}Nf}{{AIjAIj}Nf}{{AHdAHd}Nf}{{BIfBIf}Nf}{{KdKd}Nf}{{BIhBIh}Nf}`{AIjIh}{{BI`A`}Ab}0000{{JlA`}Ab}0000{{BIbA`}Ab}{{AIjA`}Ab}{{AHdA`}Ab}{{BIfA`}Ab}{{KdA`}Ab}{{BIhA`}Ab}{{BIjA`}Ab}0{{BIlA`}Ab}{cc{}}0000000000{d{{A`{BI`}}}}{n{{A`{Jl}}}}{dAIj}{dBI`}{nJl}{AdAIl}{KjAIl}{cBI`{}}{cJl{}}`{BJ`{{f{d}}}}{{AIjBIb}Nf}{BJ`Nf}{{BI`c}IhABj}{{Jlc}IhABj}{{BI`BI`}Ih}{{JlJl}Ih}{BJ`n}7{BIn{{A`{{f{d}}}}}}{{BI`BI`}BI`}{{JlJl}Jl}{{BI`BI`}Nf}{{JlJl}Nf}{ce{}{}}0000000000{BI`Nf}{JlNf}{AIjNf}000{cNf{}}00{{AIlAIl}AIl}{{FfFfNf}AHd}{BI`BI`}{JlJl}{BJ`Kn}{BJ`Ff}{BInFf}{BIdFf}{{FfFf}AHd}{{}AIj}001`{{BI`BI`}{{A`{Il}}}}{{JlJl}{{A`{Il}}}}{BJ`{{`{{K`{}{{Jj{AHd}}}}Hl}}}}{Bj{{Ah{AAbAf}}}}{Bj{{Ah{BJ`Af}}}}{Bj{{Ah{BInAf}}}}{Bj{{Ah{BIdAf}}}}{{BJ`{f{{AIh{c}}}}{f{AIj}}}{{Ah{IhAf}}}AIl}{Bj{{Ah{cAf}}}{}}{{BI`BI`}Ih}{{JlJl}Ih}{{AIjBIb}Ih}{AIjIh}{{BI`BI`}BI`}{{JlJl}Jl}54{AIlBJb}{ce{}{}}0000000000{{{f{{AIh{c}}}}{f{AIj}}{f{n}}BIle}{{Ah{IhBIj}}}AIlBJd}{BI`c{}}{Jlc{}}{cAKl{}};:`{c{{Ah{e}}}{}{}}000000000000000000000{cALh{}}000000000098`{BJ`Ff}{BInFf}{BIdFf}210```210210`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````9999999999`{BJfBJf}{BJhBJh}{BJjBJj}{BJlBJl}{BJnBJn}{{ce}Ih{}{}}0000{{BJnBJn}Il}{BJh{{A`{{Ah{BJjBJf}}}}}}{{{f{d}}Kn}{{`{{K`{}{{Jj{{Ah{BJjBJf}}}}}}Hl}}}}{{}BJl}{{BJnBJn}Nf}{{BJfA`}Ab}0{{BJjA`}Ab}0{{BJlA`}Ab}{{BJnA`}Ab}0{cc{}}0000{dBJn}{{BJnc}IhABj}`{ce{}{}}0000{BJlNf}{BJnNf}{BJlKn}{BJnAAh}{{{f{d}}Kn}BJh}`{{BJnBJn}{{A`{Il}}}}``66666{cAKl{}}00{c{{Ah{e}}}{}{}}000000000{cALh{}}0000{BJl{{`{{K`{}{{Jj{Kj}}}}Hl}}}}`````````````````````````````````````````````````````````````````````````````````````````````{{}AI`}{BK`n}{BKbn}{BKdn}{BKfn}2{Ef{{f{{Bb{{An{Bd}}}}}}}}`{{EfBj}{{Gd{BKfBd}}}}{BKh{{Ah{DjAf}}}}{BKhBd}{Djn}{BKh{{Ah{DhAf}}}}2{Dj{{Eh{Ef}}}}{{AI`AI`}AI`}{{AI`AI`}Ih}10{AI`n}21{ce{}{}}0000000000000000000000000000000{BKjn}{BKj{{Eh{H`}}}}1{H`{{Eh{BKl}}}}`{BKj{{Ah{DfAf}}}}{BKjBd}10{AM`AM`}{AI`AI`}{BKfBKf}{AG`AG`}{BKnBKn}{BL`BL`}{AH`AH`}{H`H`}{BKlBKl}{N`N`}{EfEf}{KbKb}{AFlAFl}{{ce}Ih{}{}}000000000000{{AI`AI`}Il}{AEdn}{AEd{{Eh{Kb}}}}{AI`Kn}{{{Jn{AI`AI`}}}Kn}{{{Jn{nAI`AI`}}}Kn}1{nKn}00{{AI`AI`}Nf}{BLb{{Ah{DhAf}}}}{BLd{{Ah{DhAf}}}}{BLf{{Ah{DhAf}}}}{BKj{{Ah{DhAf}}}}{BLh{{Ah{DhAf}}}}{BLbBd}{BLdBd}{BLfBd}{BKjBd}{BLhBd}{BKnBd}{BL`Bd}{{}AM`}{{}AI`}{{AI`AI`}AI`}1{{N`Bj}{{A`{{Ah{BKfAf}}}}}}{N`{{An{Bd}}}}`{BLhn}{BLh{{f{N`}}}}{{AM`AM`}Nf}{{AI`AI`}Nf}54`{{{BLj{c}}}{{Ah{cAf}}}Nj}0{{{BLj{c}}}n{}}{{{BLj{c}}}Al{}}{AAn{{Ah{O`Af}}}}{AAnBd}{AAn{{A`{{Ah{OhAf}}}}}}{AAn{{A`{{An{Al}}}}}}{{AM`A`}Ab}{{AI`A`}Ab}0000{{AG`A`}Ab}{{AH`A`}Ab}{{H`A`}Ab}{{BKlA`}Ab}{{N`A`}Ab}{{EfA`}Ab}{{KbA`}Ab}{{AFlA`}Ab}{cc{}}000000000000000{n{{A`{AI`}}}}{nAI`}{cAI`{}}{{AI`c}IhABj}{{AI`AI`}Ih}{{AI`AI`}AI`}{{AI`AI`}Nf}{ce{}{}}000000000000000{AI`Nf}{cNf{}}00{Kb{{f{{Bb{{An{Bd}}}}}}}}`{{KbBj}{{Gd{BKfBd}}}}{BLl{{Ah{AEbAf}}}}{BLlBd}{AEb{{f{{Bb{Bd}}}}}}{AEb{{Bh{AEdBd}}}}{AEbn}{BLl{{Ah{DhAf}}}}4{BLnAEn}{AAn{{Ah{AF`Af}}}}{AAnBd}{BLnn}{BM`{{Ah{AFhAf}}}}{BM`Bd}{BM`{{Ah{DhAf}}}}1{AFl{{f{{Bb{{An{Bd}}}}}}}}`{{AFlBj}{{Gd{BKfBd}}}}{BM`{{Ah{AFjAf}}}}4{AFjn}45{AFj{{Eh{AFl}}}}{{AG`Bj}{{Ah{BKfAf}}}}{AG`Bd}`{BKh{{Ah{AFhAf}}}}{BLl{{Ah{AFhAf}}}}{BKhBd}{BLlBd}{AG`n}`{BKhn}{BLln}{BM`n}{AFhn}{BKh{{Ah{DhAf}}}}{BLl{{Ah{DhAf}}}}87{BLnn}{AFh{{f{AG`}}}}{AI`AI`}{BLfn}{BLf{{f{{Bb{Bd}}}}}}{BLf{{Bh{AGnBd}}}}{AGnn}{AGn{{Eh{AH`}}}}{{AI`AI`}{{A`{Il}}}}{BLbn}{BLdn}7{BKjn}{BLhn}{BKhn}{BLln}{BM`n}{{{BLj{c}}}n{}}{BKnn}{BL`n}{{BjAI`}{{Ah{AM`Af}}}}{Bj{{Ah{AAnAf}}}}{Bj{{Ah{BLnAf}}}}{Bj{{Ah{BK`Af}}}}{Bj{{Ah{BKbAf}}}}{Bj{{Ah{BKdAf}}}}{Bj{{Ah{AFhAf}}}}{Bj{{Ah{BLbAf}}}}{Bj{{Ah{BLdAf}}}}{Bj{{Ah{BLfAf}}}}{{BjAI`AI`}{{Ah{AGnAf}}}}{Bj{{Ah{BKjAf}}}}{Bj{{Ah{BLhAf}}}}{Bj{{Ah{BKhAf}}}}{{Bjn}{{Ah{DjAf}}}}{Bj{{Ah{BLlAf}}}}{{Bjn}{{Ah{AEbAf}}}}{{Bjn}{{Ah{AEdAf}}}}{Bj{{Ah{BM`Af}}}}{{Bjn}{{Ah{AFjAf}}}}{Bj{{Ah{{BLj{c}}Af}}}{}}{Bj{{Ah{BMbAf}}}}{Bj{{Ah{BKfAf}}}}{Bj{{Ah{BKnAf}}}}{Bj{{Ah{BL`Af}}}}{{BjAI`AI`}{{Ah{AH`Af}}}}{{BjnAI`AI`}{{Ah{H`Af}}}}{{BjAI`AI`}{{Ah{BKlAf}}}}{{Bjn}{{Ah{EfAf}}}}{{Bjn}{{Ah{KbAf}}}}{{Bjn}{{Ah{AFlAf}}}}{{Bjc}{{Ah{AM`Af}}}{}}{Bj{{Ah{cAf}}}{}}{{Bj{Jn{AI`AI`}}}{{Ah{AGnAf}}}}{{Bjn}{{Ah{DjAf}}}}{{Bjn}{{Ah{AEbAf}}}}{{Bjn}{{Ah{AEdAf}}}}{{Bjn}{{Ah{AFjAf}}}}5555{{Bj{Jn{AI`AI`}}}{{Ah{AH`Af}}}}{{Bj{Jn{nAI`AI`}}}{{Ah{H`Af}}}}{{Bj{Jn{AI`AI`}}}{{Ah{BKlAf}}}}<;:{AI`Kn}{{AI`AI`}Ih}{AAn{{Ah{AJdAf}}}}{AAnBd}{AH`l}`{{AI`AI`}AI`}4{BLn{{Ah{BMdAf}}}}{ce{}{}}000000000000{AI`c{}}7{c{{Ah{e}}}{}{}}0000000000000000000000000000000{cALh{}}0000000000000005{BLdn}{BLbAI`}{BLdAI`}{BKnAI`}{BLfAI`}{BKjAI`}{BL`AI`}210{BLbAM`}{AH`AM`}{BKlAM`}``10``{BLd{{Eh{AM`}}}}{AAnAMl}{AM`{{A`{Ff}}}}`{{AM`Bj}{{A`{{Ah{MdAf}}}}}}`{BK`Ff}{BKbFf}{BKdFf}{BKfFf}{BKd{{A`{{Ah{MdAf}}}}}}{BKf{{A`{{Ah{MdAf}}}}}}{BKd{{An{Bd}}}}8`7`8`7`65432108`7````````````````````````````````````````````````````````````{Bf{{f{{Bb{l}}}}}}{BMfn}{BMf{{f{{Bb{Bd}}}}}}{BMf{{Bh{BfBd}}}}{BMh{{f{{Bb{Bd}}}}}}{BMh{{Bh{DhBd}}}}{BMhn}{ce{}{}}0000000{BMjBMj}{{ce}Ih{}{}}{AEhn}{AEh{{f{{Bb{l}}}}}}{BMl{{Ah{DhAf}}}}{BMn{{Ah{DhAf}}}}{BN`{{Ah{DhAf}}}}{BMf{{Ah{DhAf}}}}{BNb{{Ah{DhAf}}}}{BMh{{Ah{DhAf}}}}{BMlBd}{BMnBd}{BN`Bd}{BMfBd}{BNbBd}{BMhBd}{BMjBd}{BMlFf}{{{BNd{c}}}{{Ah{cAf}}}Nj}0{{{BNd{c}}}n{}}{{{BNd{c}}}Al{}}{ABd{{Ah{O`Af}}}}{ABdBd}{ABd{{A`{{Ah{OhAf}}}}}}{ABd{{A`{{An{Al}}}}}}{cc{}}000{BMnn}{AJnn}{Bfn}{BMhn}{ce{}{}}000{AEfn}{AEhl}{AEf{{f{{Bb{Bd}}}}}}{BNbn}{BNb{{f{{Bb{Bd}}}}}}{BNb{{Bh{AEfBd}}}}{AEf{{Bh{AEhBd}}}}{BMh{{f{{Bb{Bd}}}}}}{BMh{{Bh{DhBd}}}}:{BNfAEn}{ABd{{Ah{AFbAf}}}}{ABdBd}{BNfn}0{Bj{{Ah{ABdAf}}}}{Bj{{Ah{BNfAf}}}}{Bj{{Ah{BMlAf}}}}{Bj{{Ah{BMnAf}}}}{Bj{{Ah{BN`Af}}}}{Bj{{Ah{AJnAf}}}}{Bj{{Ah{BMfAf}}}}{Bj{{Ah{BfAf}}}}{Bj{{Ah{BNbAf}}}}{Bj{{Ah{AEfAf}}}}{Bj{{Ah{AEhAf}}}}{Bj{{Ah{{BNd{c}}Af}}}{}}{Bj{{Ah{BNhAf}}}}{Bj{{Ah{BMhAf}}}}{Bj{{Ah{BMjAf}}}}{Bj{{Ah{cAf}}}{}}00{ABd{{Ah{AJdAf}}}}{ABdBd}{BN`n}{BN`{{f{{Bb{Bd}}}}}}{BN`{{Bh{AJnBd}}}}{BMln}{BMnn}4{BMfn}{BNbn}{{{BNd{c}}}n{}}{BMhn}{BMjn}{BMn{{f{{Bb{l}}}}}}{AJn{{f{{Bb{l}}}}}}{BMh{{f{{Bb{l}}}}}}{BNf{{Ah{BNjAf}}}}{ce{}{}}{c{{Ah{e}}}{}{}}0000000{cALh{}}000{ABdAMl}````````{{}On}{{BNlAd}{{AIh{c}}}AIl}{ABfn}{{OnOn}On}{{OnOn}Ih}10{Onn}21999999{OnOn}{AAlAAl}{BNlBNl}{{ce}Ih{}{}}00{{OnOn}Il}{OnKn}{{OnOn}Nf}<9<0{{BNlBNl}Nf}{ABfOn}{{OnA`}Ab}0000{{AAlA`}Ab}{{BNlA`}Ab}{cc{}}00{n{{A`{On}}}}{nOn}{cOn{}}{AAlj}{ABfn}{{ABfl}{{Ah{AAjAf}}}}{ABfj}{ABf{{Eh{AAl}}}}{{Onc}IhABj}{{OnOn}Ih}{{OnOn}On}{{OnOn}Nf}{ce{}{}}00{OnNf}{{}Nf}{cNf{}}{{nFfFf}BNl}{OnOn}{{OnOn}{{A`{Il}}}}`{Bj{{Ah{ABfAf}}}}{{Bjnn}{{Ah{AK`Af}}}}{Bj{{Ah{BNnAf}}}}{{Bj{Jn{nn}}}{{Ah{AK`Af}}}}{{Bjc}{{Ah{AAlAf}}}{}}>{BNn{{Ah{BjAf}}}}{BNnBd}{ABfn}{ABf{{Ah{AK`Af}}}}{ABfAl}{{OnOn}On}{{OnOn}Ih}{ce{}{}}00{Onc{}}2{c{{Ah{e}}}{}{}}00000{BNnALd}{BNn{{Cl{ALf}}}}{AK`{{Eh{ACh}}}}{cALh{}}008{ABfAMl}```````````{{}AFd}{{AFdAFd}AFd}{{AFdAFd}Ih}10{AFdn}21;;{ABlj}{AFdAFd}{{ce}Ih{}{}}{{AFdAFd}Il}{{AFdAFd}Nf}{ABlLd}9891{ABln}{{AFdA`}Ab}0000{ABlFf}{ABlAd}{cc{}}{n{{A`{AFd}}}}{nAFd}{cAFd{}}5{{AFdc}IhABj}6{{AFdAFd}Ih}{{AFdAFd}AFd}<{ce{}{}}{AFdNf}{cNf{}}={ABlAFd}{ABlj}{ABlLd}{AFdAFd}{{AFdAFd}{{A`{Il}}}}{Bj{{Ah{ABlAf}}}}:9:8{AFdc{}};{c{{Ah{e}}}{}{}}0{cALh{}}<{ABln}{ABlAMl}{ABlFf}000`{ABnB`}{ABnBl}{ABnFf}0011011{ABnn}{Bj{{Ah{ABnAf}}}}{ABnAMl}4``{{AC`l}{{A`{n}}}}{ABhn}`{ce{}{}}0{ABhABh}{{ce}Ih{}{}}{{ABhABh}Il}{{ABhABh}Nf}{{ABhA`}Ab}{cc{}}{AC`{{f{ABh}}}}{{ABhc}IhABj}8{cNf{}}{AC`{{f{{Bb{Ff}}}}}}{{ABhABh}{{A`{Il}}}}{{Bjnn}{{Ah{AC`Af}}}}{{Bj{Jn{nn}}}{{Ah{AC`Af}}}}{{AC`l}{{A`{Ff}}}}{ABhFf}`?{c{{Ah{e}}}{}{}}0{cALh{}}`{{ACdl{f{Ab}}}{{Ah{AdAf}}}}{ACd{{A`{{Ah{AjAf}}}}}}{ACd{{An{Al}}}}{ACd{{Ah{ACjAf}}}}{ACdAl}432{Bj{{Ah{ACdAf}}}}543{ACdAMl}``````````````````````````````````````````````````````````````````````````````{{AKjBj}{{Ah{BO`Af}}}}{AKjAl}`{L`n}{BOb{{Ah{DfAf}}}}{BObBd}{BOd{{f{{Bb{Bd}}}}}}{BOd{{Bh{DhBd}}}}{Gjn}{Gfn}{BOdn}{Gj{{f{{Bb{l}}}}}}{Gf{{f{{Bb{n}}}}}}{{AEnAEn}c{}}{{AEnAEn}Ih}{ce{}{}}000000000000000000000000000000000{Gbn}{Gb{{f{{Bb{Bd}}}}}}{BObn}{BOb{{f{{Bb{{An{Bd}}}}}}}}{BOb{{Gd{GbBd}}}}{Gb{{Bh{GfBd}}}}{Ghn}{Gh{{f{{Bb{Bd}}}}}}{BOfn}{BOf{{f{{Bb{{An{Bd}}}}}}}}{BOf{{Gd{GhBd}}}}{Gh{{Bh{GjBd}}}}{BOhn}{BOh{{f{{Bb{Gl}}}}}}{Hbn}`{BOj{{Ah{DfAf}}}}{BOjBd}{BOln}{BOnn}{Dfn}1{BOn{{f{Hb}}}}{Hdn}{Hd{{f{{Bb{Bd}}}}}}{BOjn}{BOj{{f{{Bb{{An{Bd}}}}}}}}{BOj{{Gd{HdBd}}}}{Hd{{Bh{HfBd}}}}{BOl{{f{{Bb{n}}}}}}{AEnAEn}{AJfAJf}{ADfADf}{OdOd}{AHhAHh}{DhDh}{HbHb}{DfDf}{AJhAJh}{C`C`}{CbCb}{M`M`}{MdMd}{OfOf}{AKjAKj}{{ce}Ih{}{}}00000000000000{{AEnAEn}Il}{{AHhAHh}Il}{{HbHb}Il}{{AJhAJh}Il}{{M`M`}Il}{Cdn}{Cd{{f{{Bb{Al}}}}}}{{OfBj}{{A`{{Ah{CdAf}}}}}}{Of{{An{Al}}}}`{Cd{{Bh{L`Al}}}}{Cf{{Ah{DhAf}}}}{BOj{{Ah{DhAf}}}}{BOf{{Ah{DhAf}}}}{BOb{{Ah{DhAf}}}}{Chn}{Cjn}{Dhn}{CfBd}{BOjBd}{BOfBd}{BObBd}{Cl{{f{{Bb{Bd}}}}}}{Cl{{Bh{DhBd}}}}{{}AEn}{{}M`}{Cn{{A`{{Ah{LlAf}}}}}}{Cn{{An{Bd}}}}{CA`M`}{CAbM`}{CAbn}0{CA`{{f{{Bb{n}}}}}}{CAdn}8{AHhl}{Hbl}``{CA`n}{{AEnAEn}Nf}{{AHhAHh}Nf}{{HbHb}Nf}{{AJhAJh}Nf}{{M`M`}Nf}{CAf{{Ah{cAf}}}Nj}{BOhMl}0{{OdBj}{{Ah{BO`Af}}}}{O`n}{AKjn}`{Lln}{Ll{{f{{Bb{n}}}}}}{OdBd}`{BO`{{A`{{Ah{ObAf}}}}}}{BO`{{An{Bd}}}}{O`{{f{Od}}}}{{OfBj}{{A`{{Ah{CAhAf}}}}}}{Of{{An{Al}}}}`{Odh}`{Ohj}{Oh{{f{Of}}}}{L`Ab}0?{{AEnA`}Ab}{{AJfA`}Ab}{{ADfA`}Ab}{{OdA`}Ab}{{AHhA`}Ab}{{HbA`}Ab}{{AJhA`}Ab}{{M`A`}Ab}{{OfA`}Ab}{{AKjA`}Ab}{Cfn}{BOjn}{Cln}{BOfn}{BObn}{BOdn}{L`n}{BOhn}{C`n}{Cbn}{cc{}}0000000000000000{nAEn}{cAEn{}}{cM`{}}{{{CAj{ce}}Kn}{{Ah{cAf}}}Nj{{CAf{c}}}}{{Chl}{{A`{n}}}}{{Cjl}{{A`{n}}}}{{BOll}n}{{BOnl}n}{{Dhl}{{A`{n}}}}{{Dfl}n}{{{CAl{c}}Bd}{{Ah{cAf}}}Nj}{Ch{{f{{Bb{l}}}}}}{Chn}{BOln}{AJln}{Hfn}{Cln}{{AEnc}IhABj}{{AHhc}IhABj}{{Hbc}IhABj}{{AJhc}IhABj}{{M`c}IhABj}{CAdn}{AEnNf}00{BOb{{Ah{DfAf}}}}{BObBd}{BOd{{f{{Bb{Bd}}}}}}{BOd{{Bh{DhBd}}}}{Gjn}{Gfn}{BOdn}{AJl{{f{{Bb{l}}}}}}{Hf{{f{{Bb{n}}}}}}{Gj{{f{{Bb{l}}}}}}{Gf{{f{{Bb{n}}}}}}{ce{}{}}0000000000000000{{{CAj{ce}}}NfNj{{CAf{c}}}}{cNf{}}0000000{{{CAj{ce}}}{{`{{K`{}{{Jj{{Ah{cAf}}}}}}}}}Nj{{CAf{c}}}}{BOl{{`{{K`{}{{Jj{{Jn{ln}}}}}}}}}}{BOn{{`{{K`{}{{Jj{{Jn{ln}}}}}}}}}}{CA`{{`{{K`{}{{Jj{ADd}}}}}}}}{Dh{{`{{K`{}{{Jj{l}}}}}}}}{Df{{`{{K`{}{{Jj{{Jn{ln}}}}}}}}}}{{ADfBj}{{Ah{LlAf}}}}{Cnn}{ADfBd}`{Cn{{f{ADf}}}}{ADfh}`{{{CAj{ce}}}KnNj{{CAf{c}}}}{BOb{{Ah{DfAf}}}}{BObBd}{BOd{{f{{Bb{Bd}}}}}}{BOd{{Bh{DhBd}}}}{Gjn}{Gfn}{BOdn}{Gj{{f{{Bb{l}}}}}}{Gf{{f{{Bb{n}}}}}}{{{CAn{c}}}n{}}{{{CAl{c}}}AEn{}}{BO`n}{AJhn}`{BO`{{f{{Bb{n}}}}}}{{{CAn{c}}}{{f{{Bb{Bd}}}}}{}}{{{CAl{c}}}n{}}{{{CAn{c}}}{{Bh{cBd}}}Nj}{AEn{{A`{n}}}}2{CAdn}{nM`}{BOhn}{{AEnAEn}{{A`{Il}}}}{{AHhAHh}{{A`{Il}}}}{{HbHb}{{A`{Il}}}}{{AJhAJh}{{A`{Il}}}}{{M`M`}{{A`{Il}}}}{Cjn}8{Cj{{f{AHh}}}}9{Bj{{Ah{AJdAf}}}}{Bj{{Ah{CnAf}}}}{Bj{{Ah{LlAf}}}}{Bj{{Ah{O`Af}}}}{{Bjh}{{Ah{BO`Af}}}}{Bj{{Ah{{CAn{c}}Af}}}{}}{Bj{{Ah{{CAl{c}}Af}}}{}}{Bj{{Ah{ChAf}}}}{Bj{{Ah{CjAf}}}}{Bj{{Ah{BOlAf}}}}{Bj{{Ah{BOnAf}}}}{Bj{{Ah{CfAf}}}}{Bj{{Ah{AJjAf}}}}{Bj{{Ah{AJlAf}}}}{Bj{{Ah{BOjAf}}}}{Bj{{Ah{HdAf}}}}{Bj{{Ah{HfAf}}}}{Bj{{Ah{ClAf}}}}{Bj{{Ah{BOfAf}}}}{Bj{{Ah{GhAf}}}}{Bj{{Ah{GjAf}}}}{Bj{{Ah{BObAf}}}}{Bj{{Ah{GbAf}}}}{Bj{{Ah{GfAf}}}}{Bj{{Ah{BOdAf}}}}{Bj{{Ah{CA`Af}}}}{Bj{{Ah{CAbAf}}}}{Bj{{Ah{OhAf}}}}{Bj{{Ah{CdAf}}}}{Bj{{Ah{L`Af}}}}{Bj{{Ah{CAhAf}}}}{Bj{{Ah{CAdAf}}}}{Bj{{Ah{CB`Af}}}}{Bj{{Ah{BOhAf}}}}{Bj{{Ah{DhAf}}}}{Bj{{Ah{DfAf}}}}{Bj{{Ah{C`Af}}}}{Bj{{Ah{CbAf}}}}{Bj{{Ah{MdAf}}}}{{Bjh}{{Ah{ObAf}}}}{{Bjh}{{Ah{BO`Af}}}}{Bj{{Ah{cAf}}}{}}0000{Lln}{AEnNf}{BOhMl}{{AJfBj}{{Ah{CnAf}}}}{AJdn}{AJfBd}`{AJd{{f{AJf}}}}{AJfh}`{AJln}{Hfn}{Cln}{Gjn}{Gfn}{BOdn}{AJl{{f{AJh}}}}{Hf{{f{AJh}}}}{Cl{{f{AJh}}}}{Gj{{f{AJh}}}}{Gf{{f{AJh}}}}{BOd{{f{AJh}}}}{AJjn}{AJj{{f{{Bb{Bd}}}}}}{Cfn}{Cf{{f{{Bb{{An{Bd}}}}}}}}{Cf{{Gd{AJjBd}}}}{AJj{{Bh{AJlBd}}}}{AJhn}`{{AEnNf}Ih}00{{AEnn}Ih}11{AHhn}`{BOll}{AHhl}{Hbl}``{CA`n}{{{CAl{c}}}n{}}{CAhn}{CAh{{f{AKj}}}}{{{CAl{c}}}{{f{{Bb{Bd}}}}}{}}{{{CAl{c}}}{{Bh{cBd}}}Nj}{AEnn}{ce{}{}}00000000000000{AEnc{}}{M`c{}}{c{{Ah{e}}}{}{}}000000000000000000000000000000000{cALh{}}0000000000000000{CB`Ml}{AEnNf}{OhAMl}{CAhAMl}{CB`n}```99{AEjAEj}{{ce}Ih{}{}}{cc{}}{{AEjlAAb}{{Ah{{A`{BId}}Af}}}}{{AEjKn}{{A`{j}}}}>{AEjNf}{AEjKn}{{BjNf}{{Ah{AEjAf}}}}{{Bjc}{{Ah{AEjAf}}}{}}{ce{}{}}{c{{Ah{e}}}{}{}}0{cALh{}}`{AGb{{A`{n}}}}000000000000{AGbn}{Bj{{Ah{AGbAf}}}}{AGbAMn}``66{AMbAMb}?{{AMbAMb}Il}{AMbn}`0`{{AMbAMb}Nf}{{AMbA`}Ab}{cc{}}{{AMbc}IhABj}={cNf{}}{AGd{{A`{{Ah{ACjAf}}}}}}{AGd{{An{Bd}}}}{{AGdh{f{Ab}}}{{Ah{AdAf}}}}{{AMbAMb}{{A`{Il}}}}{Bj{{Ah{AGdAf}}}}`{ce{}{}}{c{{Ah{e}}}{}{}}0{cALh{}}{AGdn}0{AGd{{f{AMb}}}}{AMbh}`{AGdAMl}``````````````````````````````````````````````````````````````````````````66666666666666{CBbCBd}{MlMl}{ADhADh}{AGhAGh}{CBbCBb}{CBdCBd}{CBfCBf}{{ce}Ih{}{}}00000{{MlMl}Il}{AGfn}{{CBhd}CBj}{{}Ml}{{CBhCBj}{{A`{d}}}}{AGhn}`{{MlMl}Nf}{{CBbCBb}Nf}{{CBfCBf}Nf}{{MlA`}{{Ah{IhCBl}}}}0{{ADhA`}Ab}{{AGhA`}Ab}{{CBbA`}Ab}0{cc{}}{nMl}111111{{{CBn{d}}}Ml}{{Mlc}IhABj}{ce{}{}}000000{CBbc{}}1{cNf{}}00{{ADhBj}{{Ah{CBbAf}}}}{AGf{{A`{n}}}}{ADhBd}`{AGf{{A`{{f{ADh}}}}}}{AGhn}`{ADhn}1``{AGhMl}`{AGf{{f{AGh}}}}={{nn}CBf}{CBd{{A`{c}}}{}}{{MlMl}{{A`{Il}}}}6`{{}{{`{{K`{}{{Jj{Ml}}}}Hl}}}}{Bj{{Ah{AGfAf}}}}{AGfn}{{AGhBj}{{Ah{CBbAf}}}}{AGfBj}{AGhBd}`{Ml{{CBn{d}}}}{ce{}{}}000001{cAKl{}}0{Mln}{c{{Ah{e}}}{}{}}0000000000000{cALh{}}0000009````````````{AGlh}{{}Ad}{{AdAd}Ad}{{AdAd}Ih}10{Adn}2199{AdAd}{{ce}Ih{}{}}{{AdAd}Il}{{AdAd}Nf}7670{{AdA`}Ab}0000{cc{}}{n{{A`{Ad}}}}{nAd}{cAd{}}{AGlAd}{AGln}{{Adc}IhABj}=>8{ce{}{}}{AdNf}{cNf{}}>{AGl{{f{d}}}}{{AdAd}{{A`{Il}}}}{Bj{{Ah{AGlAf}}}}{{AdAd}Ih}{AGl{{A`{Ff}}}}{AGlFf}000{{AdAd}Ad}329{Adc{}}4{c{{Ah{e}}}{}{}}0{cALh{}}{AGl{{A`{j}}}}0{AGlj}0005{AGl{{A`{n}}}}0{AGln}01110000088888888888```{AKhAAh}{ce{}{}}0{AKhAKh}{{ce}Ih{}{}}{AKhc{}}{{AKhAKh}Nf}{{AKhAAh}Nf}{{AKhA`}Ab}{cc{}}{{AHfl}{{A`{AAh}}}}{AHf{{A`{{f{{Bb{n}}}}}}}}9{AHfj}{AHfAd}1111{AHf{{A`{n}}}}{AHfKn}{Bj{{Ah{AHfAf}}}}{Bj{{Ah{AKhAf}}}}{Bj{{Ah{cAf}}}{}}{AHf{{A`{{Cl{AKh}}}}}}{ce{}{}}{c{{Ah{e}}}{}{}}0{cALh{}}{AHfBl}0{AHfAMn}```````````````````````````````````````{{CC`CCb}{{Ah{IhAA`}}}}{CC`Ih}66666666666666666666{BAf{{`{{K`{}{{Jj{CBj}}}}Hl}}}}`1{CCdCCd}{CCfCCf}{BAhBAh}{BAfBAf}{CChCCh}{AHnAHn}{AHlAHl}{AA`AA`}{{ce}Ih{}{}}0000000{{CCfCCf}Il}{{AHnAHn}Il}{{AHlAHl}Il}{CCdj}{BAdn}{BAlj}{BAd{{f{d}}}}{BAl{{f{d}}}}{{}CC`}`{{CCfCCf}Nf}{{BAhBAh}Nf}{{BAfAAh}Nf}{{BAfBAf}Nf}{{AHnAHn}Nf}{{AHlAHl}Nf}{AHnd}{AHln}``{CCj{{f{d}}}}{AHnn}{AHlj}``{{CC`Kn}{{Ah{{CBn{Ad}}AA`}}}}{CC`{{`{{K`{}{{Jj{Ad}}}}}}}}{{CCfA`}Ab}0{{BAhA`}Ab}{{BAfA`}Ab}0{{AHnA`}Ab}{{AHlA`}Ab}{{AA`A`}Ab}0{{CChl}{{A`{n}}}}{CCjd}{CCld}{CCnd}{CChd}{cc{}}00{AdCCf}1{KjCCf}{KjBAh}33333{AfAA`}4{{CCdKn}{{Ah{{f{d}}AA`}}}}{{BAdKn}{{Ah{{f{d}}AA`}}}}{{BAlKn}{{Ah{{f{d}}AA`}}}}{{CC`Kn}{{Ah{AdAA`}}}}{{CC`Kn}{{Ah{KjAA`}}}}{{CCdKn}{{Ah{KnAA`}}}}{{BAdKn}{{Ah{KnAA`}}}}{{BAlKn}{{Ah{KnAA`}}}}{{BAhc}IhABj}{{AHnc}IhABj}{{AHlc}IhABj}{ce{}{}}000000000{CC`Nf}{cNf{}}0{CC`Kn}2{CCln}{CCnj}{{ACj{f{Ab}}n}{{Ah{CCbAA`}}}}{{}CC`}{{{f{d}}Nf}{{Ah{CCdAA`}}}}{nBAh}{{{f{d}}}BAf}{CC`{{`{{K`{}{{Jj{CCf}}}}}}}}{BAdd}{BAld}{BAd{{f{d}}}}{BAl{{f{d}}}}{{CCfCCf}{{A`{Il}}}}{{AHnAHn}{{A`{Il}}}}{{AHlAHl}{{A`{Il}}}}{CC`{{Ah{AdAA`}}}}{CC`{{Ah{KjAA`}}}}{{CC`c}{{Ah{IhAA`}}}{{AEl{CCf}}}}{CCl{{f{AHn}}}}{CCn{{f{AHl}}}}{Bj{{Ah{BAdAf}}}}{Bj{{Ah{BAlAf}}}}{Bj{{Ah{CCjAf}}}}{Bj{{Ah{CClAf}}}}{Bj{{Ah{CCnAf}}}}{Bj{{Ah{CChAf}}}}{Bj{{Ah{cAf}}}{}}{CCb{{Ah{KnAA`}}}}{CC`Ih}{CCb{{Ah{{`{{K`{}{{Jj{{Ah{AdAA`}}}}}}}}AA`}}}}{CCln}{CCnj}{{CCbn}{{Ah{IhAA`}}}}{CCd{{Ah{KnAf}}}}{BAd{{Ah{KnAf}}}}{BAl{{Ah{KnAf}}}}{BAh{{Ah{BAfKn}}}}{CCdKj}{ce{}{}}0000000{cAKl{}}00{BAhn}{c{{Ah{e}}}{}{}}0000000000000000000{cALh{}}000000000{{CC`Kn}{{Ah{IhAA`}}}}0```55{CD`Ih}{{{CDb{c}}}IhBJd}{{CD`{f{d}}}Ih}{{CD`AdAdAdAdAdAd}Ih}{{{CDb{c}}AdAdAdAdAdAd}IhBJd}{{{f{d}}CCd{A`{CCd}}{A`{CCb}}c}{{Ah{IhAA`}}}CD`}{cc{}}4{{CD`AdAd}Ih}=0{{{CDb{c}}AdAd}IhBJd}10{c{{CDb{c}}}{}}<<;2````````````````````````````````````````````````````````````````````````````````````````````````````````````````````??????????{CDdCDd}{CDfCDf}{CDhCDh}{CDjCDj}{CDlCDl}{{ce}Ih{}{}}0000{{}CDj}{{}CDl}{{{f{d}}{A`{CCb}}}{{`{{K`{}{{Jj{{Ah{CDhAA`}}}}}}}}}}{{CDdCDd}Nf}{{CDfCDf}Nf}{{CDhCDh}Nf}{{CDjCDj}Nf}{{CDlCDl}Nf}{{CDdA`}Ab}{{CDfA`}Ab}{{CDhA`}Ab}{{CDjA`}Ab}{{CDlA`}Ab}{cc{}}0{CDdCDf}{cCDf{{AEl{CCf}}}}222{{CDdc}IhABj}{ce{}{}}0000{cCDj{{K`{}{{Jj{Ad}}}}}}11111{{{f{d}}}{{`{{K`{}{{Jj{{Ah{CDfAA`}}}}}}Hl}}}}{c{{Ah{e}}}{}{}}000000000{cALh{}}0000{CDj{{f{{Jn{AdAd}}}}}}{CDl{{f{Ad}}}}`````````{{}Ol}{{OlOl}Ol}{{OlOl}Ih}10{Oln}21::{OlOl}{{ce}Ih{}{}}{{OlOl}Il}{{OlOl}Nf}{AAf{{f{d}}}}8781{AJbOl}{{OlA`}Ab}0000{cc{}}{n{{A`{Ol}}}}{nOl}{cOl{}}{{AKfl}{{Ah{{A`{AAf}}Af}}}}{AKf{{f{{Bb{j}}}}}}{AAfh}{{Olc}IhABj}{{OlOl}Ih}{{OlOl}Ol}={ce{}{}}{OlNf}{cNf{}}{OlOl}{AJbj}{AAfFf}0{{OlOl}{{A`{Il}}}}{AKfn}0{{Bjn}{{Ah{AJbAf}}}}{{Bjn}{{Ah{AKfAf}}}}{Bj{{Ah{AAfAf}}}}21<{AJb{{f{{Bb{Al}}}}}}{AJb{{Bh{AKfAl}}}}=><{Olc{}}?{c{{Ah{e}}}{}{}}0{cALh{}}{{OlOl}Ol}{AJbn}````````````````{{}Oj}{CDnn}{CE`n}{CEbn}{CEdn}{D`n}`{MbMl}`{Mbn}`{Mbh}`{AKdn}{AGj{{f{{Bb{Bd}}}}}}{AGj{{Bh{CnBd}}}}{CDn{{f{D`}}}}{{OjOj}Oj}{{OjOj}Ih}10{Ojn}21{ce{}{}}0000000{MbMb}{CnCn}{D`D`}{OjOj}{{ce}Ih{}{}}000{{MbMb}Il}{{D`D`}Il}{{OjOj}Il}{{OjOj}Nf}{{}Oj}{AKd{{Ah{{f{Mb}}Af}}}}{AKdAl}{AKdn}0{{OjOj}Oj}{AKd{{A`{Ml}}}}5{{MbMb}Nf}{{D`D`}Nf}8{CE`Oj}{CEbOj}{CEdOj}{CDnOj}{CnOj}{{MbA`}Ab}{{D`A`}Ab}{{OjA`}Ab}0000{CE`n}{CEbn}{CEdn}{CDnn}{Cnn}{cc{}}000{n{{A`{Oj}}}}{nOj}{cOj{}}{{Mbc}IhABj}{{D`c}IhABj}{{Ojc}IhABj}{{OjOj}Ih}{{OjOj}Oj}{{OjOj}Nf}{ce{}{}}000{OjNf}{cNf{}}00{CEdAd}{CEbAd}{OjOj}{AKd{{An{Al}}}}{AKd{{A`{{Ah{AGjAf}}}}}}{{MbMb}{{A`{Il}}}}{{D`D`}{{A`{Il}}}}{{OjOj}{{A`{Il}}}}66{Bj{{Ah{AKdAf}}}}{{Bjn}{{Ah{AGjAf}}}}{Bj{{Ah{CE`Af}}}}{Bj{{Ah{CEbAf}}}}{Bj{{Ah{CEdAf}}}}{Bj{{Ah{CDnAf}}}}{Bj{{Ah{CnAf}}}}5{Bj{{Ah{cAf}}}{}}{{OjOj}Ih}{{OjOj}Oj}1{ce{}{}}000{Ojc{}}3{c{{Ah{e}}}{}{}}0000000{cALh{}}0004{CE`Ad}{CEdAd}{D`Ad}`{CE`Ml}{CEbMl}{CEdMl}{CDnMl}{CnMl}{AKdAMl}`````````````````````````````````````{{{CEf{c}}{f{Ab}}}{{`{{K`{}{{Jj{{Jn{{CEh{c}}Ad}}}}}}}}}CEj}{{}Nb}{{CElKl}BJb}{AMhn}{Nbd}{{NbNb}Nb}{{NbNb}Ih}102{ALbn}{ALdn}32{ce{}{}}00000000000000000000000000000000000{AChACh}{AjAj}{NbNb}{AMjAMj}{CEnCEn}{KhKh}{ALbALb}{ALdALd}{CF`CF`}{CFbCFb}{CFdCFd}{CFfCFf}{{{CEf{c}}}{{CEf{c}}}Hl}{{{CEh{c}}}{{CEh{c}}}Hl}{{{CFh{c}}}{{CFh{c}}}Hl}{KlKl}{{ce}Ih{}{}}000000000000000{{AChACh}Il}{{NbNb}Il}{{AMjAMj}Il}{{CEnCEn}Il}{{KhKh}Il}{{ALbALb}Il}{{ALdALd}Il}{{ACjKh{f{Ab}}}{{Ah{KjAf}}}}{{ACjKh{f{Ab}}}{{Ah{KlAf}}}}{{AMj{f{Ab}}}Ad}{{{CEh{c}}{f{Ab}}}{{A`{Ad}}}CEj}{{AMj{f{Ab}}}BJb}{{{CEh{c}}{f{Ab}}}{{A`{BJb}}}CEj}{nKn}0{{NbNb}Nf}{ALdn}{CF`n}`{{}ACh}{{}Nb}{{}Kh}{{}ALb}{{}ALd}{{}Kl}{{ACln}{{`{{K`{}{{Jj{Kj}}}}Hl}}}}{ACl{{f{d}}}}{{{CEh{c}}}{{CFh{c}}}CEj}{{NbNb}Nb}{ALbNf}9{CEnAb}`{CFjNb}{CFlNb}{AjNb}{Nbd}{{AChACh}Nf}{{NbNb}Nf}{{AMjAMj}Nf}{{CEnCEn}Nf}{{KhKh}Nf}{{ALbALb}Nf}{{ALdALd}Nf}{{AChA`}Ab}{{NbA`}Ab}0000{{AMjA`}Ab}{{CEnA`}Ab}{{KhA`}Ab}{{ALbA`}Ab}{{ALdA`}Ab}{{CF`A`}Ab}{{CFbA`}Ab}{{CFdA`}Ab}{{CFfA`}Ab}{{{CFh{c}}A`}AbCFn}{{KlA`}Ab}{CFjd}{CFld}{ACjn}{Ajd}{cc{}}00000000000000000{d{{A`{Nb}}}}{nALb}{nALd}{dNb}{cNb{}}{cALb{}}{cALd{}}{{AChKn}{{A`{Ab}}}}{{Ajj}{{Ah{KhAf}}}}{{{CEh{c}}}NfCEj}{{AChc}IhABj}{{Nbc}IhABj}{{AMjc}IhABj}{{CEnc}IhABj}{{Khc}IhABj}{{ALbc}IhABj}{{ALdc}IhABj}`{{NbNb}Ih}{ALf{{A`{ACh}}}}{ALbNf}1{{NbNb}Nb}{{NbNb}Nf}{ce{}{}}0000000000000000000000{AChNf}{NbNf}{{}Nf}{cNf{}}0{ACln}{ACj{{Gd{AClAl}}}}{ACjn}{ACj{{f{{Bb{{An{Al}}}}}}}}{CF`CFb}{AChKn}{CFjn}{CFlj}{CFj{{f{d}}}}{CFl{{f{d}}}}{Aj{{f{d}}}}{{nFfFf}CEj}{CG`{{A`{c}}}{}}{{{CGb{c}}}{{A`{e}}}CEj{}}{CFb{{A`{c}}}{}}{CFf{{A`{c}}}{}}{{{CFh{c}}}{{A`{e}}}CEj{}}{NbNb}`{{AChACh}{{A`{Il}}}}{{NbNb}{{A`{Il}}}}{{AMjAMj}{{A`{Il}}}}{{CEnCEn}{{A`{Il}}}}{{KhKh}{{A`{Il}}}}{{ALbALb}{{A`{Il}}}}{{ALdALd}{{A`{Il}}}}{{{CEh{c}}}AChCEj}{CEnAb}`{ALf{{A`{ACh}}}}{{{CEh{c}}}CFbCEj}{ALbNf}{{Bjn}{{Ah{ALfAf}}}}{Bj{{Ah{CFjAf}}}}{Bj{{Ah{CFlAf}}}}{Bj{{Ah{AMhAf}}}}{Bj{{Ah{ACjAf}}}}{Bj{{Ah{AClAf}}}}{{Bjn}{{Ah{AChAf}}}}{Bj{{Ah{AjAf}}}}{{Bjn}{{Ah{AMjAf}}}}82{Bj{{Ah{cAf}}}{}}1{AMj{{f{CEn}}}}`{AMhn}{ACln}{ACl{{f{{Bb{n}}}}}}{{NbNb}Ih}{ALdNf}{CFb{{Jn{Kn{A`{Kn}}}}}}{Bj{{Jn{CF`Bj}}}}{CEnAb}`{{NbNb}Nb}5{ce{}{}}000000000000000{Nbc{}}{ALbc{}}{ALdc{}}9{c{{Ah{e}}}{}{}}00000000000000000000000000000000000{ALfALb}{ALb{{A`{n}}}}{{{CEf{c}}}{{CGb{c}}}CEj}{cALh{}}000000000000000009{ACh{{f{{Bb{Ab}}}}}}`{ALfn}{ACj{{Ah{AMhAf}}}}{ACjAl}{AMh{{Eh{AMj}}}}{ACln}`{AN`B`}{AN`Bl}{AN`Ff}0011011{AN`n}{Bj{{Ah{AN`Af}}}}{AN`AMn}4``{{ANbl}{{A`{n}}}}{{Bjnn}{{Ah{ANbAf}}}}{{Bj{Jn{nn}}}{{Ah{ANbAf}}}}{{ANbl}{{A`{Ff}}}}{ANb{{f{{Bb{Ff}}}}}}{ANb{{f{ABh}}}}`{{ANdl{f{Ab}}}{{Ah{AdAf}}}}{ANd{{A`{{Ah{AjAf}}}}}}{ANd{{An{Al}}}}210{ANd{{Ah{ACjAf}}}}{ANdAl}{Bj{{Ah{ANdAf}}}}543543{ANdAMl}","c":[],"p":[[5,"TableRef",0],[1,"u8"],[1,"slice"],[5,"Tag",7189],[1,"u32"],[5,"GlyphId",7190],[1,"u16"],[6,"Option",7191],[5,"F2Dot14",7192],[5,"Fixed",7192],[6,"ReadError",0],[6,"Result",7193],[6,"DeltaSetIndexMap",6752],[5,"Offset32",7194],[5,"Nullable",7194],[5,"UfWord",7195],[5,"BigEndian",7196],[5,"Offset16",7194],[8,"AlternateSet",4683],[5,"ArrayOfOffsets",0],[5,"FontData",0],[5,"FWord",7195],[8,"AttachList",3386],[8,"AttachPoint",3386],[10,"TableProvider",0],[8,"Avar",1501],[5,"VariationAxisRecord",3244],[8,"AxisInstanceArrays",3244],[5,"SegmentMaps",1501],[5,"VarLenArray",1433],[6,"AxisValue",6592],[5,"AxisValueRecord",6592],[6,"Paint",2468],[5,"Offset24",7194],[6,"ClassDef",5094],[6,"CoverageTable",5094],[8,"BaseArray",4163],[6,"BaseCoord",1550],[8,"BaseGlyphList",2468],[5,"BaseGlyphPaint",2468],[5,"BaseGlyph",2468],[5,"BaseLangSysRecord",1550],[5,"BaseRecord",4163],[5,"ComputedArray",1433],[8,"BaseScriptList",1550],[5,"BaseScriptRecord",1550],[8,"BaseTagList",1550],[8,"BaseValues",1550],[5,"BigGlyphMetrics",1686],[5,"BitmapSize",1686],[1,"i16"],[6,"CaretValue",3386],[8,"Cbdt",2056],[8,"Cblc",2061],[5,"Cff",2067],[5,"Cff2",2096],[8,"ChainedClassSequenceRuleSet",5094],[5,"ArrayOfNullableOffsets",0],[8,"ChainedClassSequenceRule",5094],[8,"ChainedSequenceRuleSet",5094],[8,"ChainedSequenceRule",5094],[5,"Uint24",7197],[5,"TableRecord",0],[5,"Class1Record",4163],[5,"ClassRangeRecord",5094],[8,"ClassSequenceRuleSet",5094],[8,"ClassSequenceRule",5094],[8,"ClipList",2468],[5,"Clip",2468],[10,"Clone",7198],[10,"ReadArgs",0],[10,"Scalar",7196],[6,"FileRef",0],[5,"CollectionRef",0],[5,"FontRef",0],[1,"unit"],[8,"Cmap",2122],[6,"Ordering",7199],[8,"VarColorLine",2468],[8,"ColorLine",2468],[5,"ColorRecord",3116],[5,"ColorStop",2468],[5,"VarColorStop",2468],[8,"Colr",2468],[17,"Item"],[5,"CompositeGlyphFlags",3496],[1,"tuple"],[10,"Iterator",7200],[5,"ComponentRecord",4163],[5,"Component",3496],[6,"CompositeMode",2468],[5,"DeltaSetIndex",6752],[1,"i32"],[5,"FloatItemDelta",6752],[1,"usize"],[8,"ConditionFormat1",5094],[8,"Cpal",3116],[5,"LongDateTime",7201],[8,"Cvar",3205],[5,"BitmapLocation",1686],[5,"BitmapData",1686],[8,"LangSys",5094],[8,"MinMax",1550],[6,"DeltaFormat",5094],[5,"AxisRecord",6592],[6,"DeviceOrVariationIndex",5094],[8,"TTCHeader",0],[8,"Ebdt",3233],[8,"Eblc",3238],[5,"NameId",5772],[5,"EncodingRecord",2122],[5,"EntryExitRecord",4163],[5,"EntryFormat",6752],[8,"TableDirectory",0],[1,"bool"],[10,"TopLevelTable",0],[10,"FontRead",0],[6,"Extend",2468],[5,"FeatMinMaxRecord",1550],[8,"FeatureList",5094],[6,"FeatureParams",5094],[5,"FeatureRecord",5094],[5,"FeatureVariationRecord",5094],[8,"FeatureVariations",5094],[5,"AxisValueTableFlags",6592],[5,"HeaderFlags",6522],[5,"GvarFlags",4859],[5,"Formatter",7202],[8,"Result",7202],[5,"SelectionFlags",5933],[8,"Fvar",3244],[5,"GaspRange",3309],[8,"Gdef",3386],[10,"FontReadWithArgs",0],[10,"Offset",0],[6,"Error",6066],[8,"Glyf",3496],[5,"GlyphIdOffsetPair",1686],[8,"GlyphData",6522],[1,"str"],[8,"GlyphVariationData",4859],[5,"U16Or32",4859],[8,"Gpos",4163],[5,"SequentialMapGroup",2122],[5,"ConstantMapGroup",2122],[8,"Gsub",4683],[8,"Gvar",4859],[5,"LongMetric",5052],[10,"Hasher",7203],[8,"Head",4964],[8,"Hhea",5037],[8,"Hmtx",5052],[8,"Axis",1550],[8,"Hvar",5080],[5,"InstanceRecord",3244],[5,"Tuple",6752],[8,"ItemVariationStore",6752],[8,"ItemVariationData",6752],[5,"Cmap12Iter",2122],[5,"Cmap4Iter",2122],[5,"Cmap14Iter",2122],[1,"i8"],[5,"LangSysRecord",5094],[5,"LangTagRecord",5772],[8,"LayerList",2468],[5,"Layer",2468],[8,"LigCaretList",3386],[8,"LigGlyph",3386],[8,"LigatureArray",4163],[8,"LigatureAttach",4163],[8,"LigatureSet",4683],[8,"Ligature",4683],[6,"Loca",5665],[10,"Into",7204],[5,"LookupFlag",5094],[8,"PositionLookupList",4163],[8,"SubstitutionLookupList",4683],[5,"MacStyle",4964],[6,"MapVariant",2122],[8,"MarkArray",4163],[8,"Mark2Array",4163],[5,"Mark2Record",4163],[8,"MarkGlyphSets",3386],[5,"MarkRecord",4163],[8,"Maxp",5684],[8,"Mvar",5701],[8,"Name",5772],[5,"NameRecord",5772],[8,"AxisValueArray",6592],[8,"Os2",5933],[8,"PairSet",4163],[5,"PairValueRecord",4163],[5,"PaletteType",3116],[5,"CurvePoint",3496],[8,"Post",6031],[5,"RangeRecord",5094],[5,"UnicodeRange",2122],[5,"FdSelectRange4",6066],[5,"FdSelectRange3",6066],[5,"ValueFormat",4163],[5,"Range",7205],[10,"AnyBitPattern",7206],[10,"FixedSize",7196],[5,"Point",7207],[5,"PointFlags",3496],[10,"PointCoord",3496],[10,"ResolveOffset",0],[10,"ResolveNullableOffset",0],[8,"Sbix",6522],[8,"ScriptList",5094],[5,"ScriptRecord",5094],[5,"SequenceLookupRecord",5094],[8,"SequenceRuleSet",5094],[8,"SequenceRule",5094],[8,"Sequence",4683],[8,"SharedTuples",4859],[10,"RangeBounds",7205],[8,"Stat",6592],[8,"Strike",6522],[5,"PString",6031],[5,"FeatureTableSubstitutionRecord",5094],[5,"String",7208],[8,"Affine2x3",2468],[8,"VarAffine2x3",2468],[5,"TupleIndex",6752],[5,"TupleVariationCount",6752],[8,"TupleVariationHeader",6752],[5,"TypeId",7209],[5,"UvsMapping",2122],[8,"PaintId",2468],[6,"ClipBox",2468],[5,"ValueRecord",4163],[5,"ValueRecord",5701],[5,"VariationSelector",2122],[8,"CvtVariationData",3205],[8,"VariationRegionList",6752],[5,"VariationRegion",6752],[5,"MajorMinor",7210],[5,"Version16Dot16",7210],[8,"Vhea",7149],[8,"Vmtx",7164],[8,"Vvar",7172],[10,"VarSize",0],[10,"ComputeSize",0],[5,"AxisValueMap",1501],[8,"BaseCoordFormat1",1550],[8,"BaseCoordFormat2",1550],[8,"BaseCoordFormat3",1550],[8,"BaseScript",1550],[8,"Base",1550],[8,"IndexSubtableArray",1686],[5,"SmallGlyphMetrics",1686],[5,"BitmapFlags",1686],[5,"SbitLineMetrics",1686],[8,"IndexSubtable2",1686],[8,"IndexSubtable5",1686],[6,"IndexSubtable",1686],[5,"BdtComponent",1686],[6,"BitmapDataFormat",1686],[6,"BitmapMetrics",1686],[6,"BitmapContent",1686],[8,"IndexSubtable4",1686],[8,"IndexSubtable1",1686],[8,"IndexSubtable3",1686],[8,"CffHeader",2067],[8,"Index1",6066],[5,"Latin1String",6066],[5,"StringId",6066],[8,"Cff2Header",2096],[8,"Index2",6066],[6,"PlatformId",2122],[6,"CmapSubtable",2122],[5,"SubHeader",2122],[8,"DefaultUvs",2122],[8,"Cmap4",2122],[8,"Cmap6",2122],[8,"Cmap0",2122],[8,"Cmap2",2122],[8,"Cmap8",2122],[8,"Cmap10",2122],[8,"Cmap12",2122],[8,"Cmap13",2122],[8,"Cmap14",2122],[8,"NonDefaultUvs",2122],[8,"PaintSolid",2468],[8,"PaintVarSolid",2468],[5,"ColorIndex",2468],[5,"VarColorIndex",2468],[8,"PaintRotate",2468],[8,"PaintVarRotate",2468],[8,"PaintRotateAroundCenter",2468],[8,"PaintVarRotateAroundCenter",2468],[8,"PaintComposite",2468],[8,"PaintSweepGradient",2468],[8,"PaintVarSweepGradient",2468],[8,"PaintScaleAroundCenter",2468],[8,"PaintVarScaleAroundCenter",2468],[8,"PaintScaleUniformAroundCenter",2468],[8,"PaintVarScaleUniformAroundCenter",2468],[8,"PaintSkewAroundCenter",2468],[8,"PaintVarSkewAroundCenter",2468],[8,"PaintLinearGradient",2468],[8,"PaintVarLinearGradient",2468],[8,"PaintRadialGradient",2468],[8,"PaintVarRadialGradient",2468],[8,"PaintTranslate",2468],[8,"PaintVarTranslate",2468],[8,"PaintColrLayers",2468],[8,"ClipBoxFormat1",2468],[8,"ClipBoxFormat2",2468],[8,"PaintGlyph",2468],[8,"PaintColrGlyph",2468],[8,"PaintTransform",2468],[8,"PaintVarTransform",2468],[8,"PaintScale",2468],[8,"PaintVarScale",2468],[8,"PaintScaleUniform",2468],[8,"PaintVarScaleUniform",2468],[8,"PaintSkew",2468],[8,"PaintVarSkew",2468],[5,"CvtDelta",3205],[5,"GaspRangeBehavior",3309],[8,"Gasp",3309],[8,"CaretValueFormat1",3386],[8,"CaretValueFormat2",3386],[8,"CaretValueFormat3",3386],[6,"GlyphClassDef",3386],[5,"SimpleGlyphFlags",3496],[5,"PointMarker",3496],[6,"Glyph",3496],[5,"Transform",3496],[6,"Anchor",3496],[6,"ToPathError",3496],[6,"ToPathStyle",3496],[8,"CompositeGlyph",3496],[8,"SimpleGlyph",3496],[1,"f32"],[10,"Pen",7211],[5,"DecodeError",3823],[5,"Decoder",3823],[5,"Instruction",3823],[5,"InlineOperands",3823],[6,"Opcode",3823],[8,"AnchorFormat1",4163],[8,"AnchorFormat2",4163],[8,"AnchorFormat3",4163],[6,"AnchorTable",4163],[8,"MarkBasePosFormat1",4163],[8,"PairPosFormat2",4163],[5,"Class2Record",4163],[6,"SinglePos",4163],[6,"PairPos",4163],[8,"SinglePosFormat1",4163],[8,"SinglePosFormat2",4163],[8,"PairPosFormat1",4163],[8,"CursivePosFormat1",4163],[8,"ExtensionPosFormat1",4163],[8,"MarkLigPosFormat1",4163],[6,"PositionLookup",4163],[8,"MarkMarkPosFormat1",4163],[6,"ExtensionSubtable",4163],[6,"PositionSubtables",4163],[8,"AlternateSubstFormat1",4683],[8,"ReverseChainSingleSubstFormat1",4683],[6,"SingleSubst",4683],[8,"SingleSubstFormat1",4683],[8,"SingleSubstFormat2",4683],[8,"MultipleSubstFormat1",4683],[8,"LigatureSubstFormat1",4683],[8,"ExtensionSubstFormat1",4683],[6,"SubstitutionLookup",4683],[6,"ExtensionSubtable",4683],[6,"SubstitutionSubtables",4683],[5,"GlyphDelta",4859],[8,"GlyphVariationDataHeader",4859],[8,"Feature",5094],[8,"ChainedSequenceContextFormat2",5094],[8,"ChainedSequenceContextFormat3",5094],[8,"ChainedSequenceContextFormat1",5094],[8,"CharacterVariantParams",5094],[8,"SequenceContextFormat2",5094],[8,"ClassDefFormat1",5094],[8,"ClassDefFormat2",5094],[6,"SequenceContext",5094],[6,"ChainedSequenceContext",5094],[8,"ConditionSet",5094],[8,"SequenceContextFormat1",5094],[8,"CoverageFormat1",5094],[8,"CoverageFormat2",5094],[8,"SequenceContextFormat3",5094],[8,"Script",5094],[8,"Device",5094],[8,"VariationIndex",5094],[8,"SizeParams",5094],[10,"ExtensionLookup",5094],[8,"FeatureTableSubstitution",5094],[6,"Subtables",5094],[8,"Lookup",5094],[8,"LookupList",5094],[8,"StylisticSetParams",5094],[5,"NameString",5772],[5,"CharIter",5772],[6,"Encoding",5772],[5,"MacRomanMapping",5772],[1,"char"],[5,"Error",7202],[1,"array"],[5,"Stack",6066],[5,"BlendState",6066],[6,"Index",6066],[6,"Number",6066],[6,"FdSelect",6066],[8,"FdSelectFormat0",6066],[8,"FdSelectFormat3",6066],[8,"FdSelectFormat4",6066],[10,"CommandSink",6309],[5,"PenSink",6309],[6,"Operator",6333],[6,"Token",6333],[6,"Entry",6333],[5,"Blues",6333],[5,"StemSnaps",6333],[8,"AxisValueFormat4",6592],[8,"AxisValueFormat1",6592],[8,"AxisValueFormat2",6592],[8,"AxisValueFormat3",6592],[5,"TupleVariationData",6752],[5,"TupleVariation",6752],[10,"TupleDelta",6752],[10,"FloatItemDeltaTarget",6752],[5,"RegionAxisCoordinates",6752],[5,"PackedPointNumbers",6752],[5,"PackedPointNumbersIter",6752],[5,"PackedDeltas",6752],[5,"DeltaRunIter",6752],[5,"TupleDeltaIter",6752],[8,"DeltaSetIndexMapFormat0",6752],[8,"DeltaSetIndexMapFormat1",6752],[10,"Debug",7202],[5,"TupleVariationHeaderIter",6752],[5,"TupleVariationIter",6752],[15,"Point",3817],[15,"Offset",3817],[15,"PointFlagMismatch",3821],[8,"PositionSequenceContext",4163],[8,"PositionChainContext",4163],[8,"SubstitutionSequenceContext",4683],[8,"SubstitutionChainContext",4683],[15,"Ros",6519]],"b":[[38,"impl-TableRef%3C\'a,+CffHeaderMarker%3E"],[39,"impl-TableRef%3C\'a,+Cff2HeaderMarker%3E"],[42,"impl-TableRef%3C\'a,+HmtxMarker%3E"],[43,"impl-TableRef%3C\'a,+VmtxMarker%3E"],[52,"impl-TableRef%3C\'a,+PaintVarSolidMarker%3E"],[53,"impl-TableRef%3C\'a,+PaintSolidMarker%3E"],[58,"impl-TableRef%3C\'a,+AnchorFormat1Marker%3E"],[59,"impl-TableRef%3C\'a,+AnchorFormat2Marker%3E"],[60,"impl-TableRef%3C\'a,+AnchorFormat3Marker%3E"],[62,"impl-TableRef%3C\'a,+PaintRotateAroundCenterMarker%3E"],[63,"impl-TableRef%3C\'a,+PaintVarRotateMarker%3E"],[64,"impl-TableRef%3C\'a,+PaintRotateMarker%3E"],[65,"impl-TableRef%3C\'a,+PaintVarRotateAroundCenterMarker%3E"],[69,"impl-TableRef%3C\'a,+HheaMarker%3E"],[70,"impl-TableRef%3C\'a,+VheaMarker%3E"],[77,"impl-TableRef%3C\'a,+AxisInstanceArraysMarker%3E"],[78,"impl-TableRef%3C\'a,+FvarMarker%3E"],[79,"impl-TableRef%3C\'a,+AxisValueFormat4Marker%3E"],[80,"impl-TableRef%3C\'a,+VariationRegionListMarker%3E"],[81,"impl-TableRef%3C\'a,+GvarMarker%3E"],[82,"impl-TableRef%3C\'a,+AvarMarker%3E"],[83,"impl-TableRef%3C\'a,+FvarMarker%3E"],[84,"impl-TableRef%3C\'a,+AxisValueFormat1Marker%3E"],[85,"impl-TableRef%3C\'a,+AxisValueFormat2Marker%3E"],[86,"impl-TableRef%3C\'a,+AxisValueFormat3Marker%3E"],[87,"impl-TableRef%3C\'a,+ConditionFormat1Marker%3E"],[94,"impl-TableRef%3C\'a,+AxisValueArrayMarker%3E"],[95,"impl-TableRef%3C\'a,+AxisValueFormat4Marker%3E"],[100,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[101,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[102,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[103,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[104,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[105,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[106,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[107,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[108,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[109,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[113,"impl-TableRef%3C\'a,+BaseCoordFormat2Marker%3E"],[114,"impl-TableRef%3C\'a,+BaseCoordFormat1Marker%3E"],[115,"impl-TableRef%3C\'a,+BaseCoordFormat3Marker%3E"],[140,"impl-TableRef%3C\'a,+IndexSubtable2Marker%3E"],[141,"impl-TableRef%3C\'a,+IndexSubtable5Marker%3E"],[142,"impl-TableRef%3C\'a,+CblcMarker%3E"],[143,"impl-TableRef%3C\'a,+EblcMarker%3E"],[166,"impl-TableRef%3C\'a,+VheaMarker%3E"],[167,"impl-TableRef%3C\'a,+HheaMarker%3E"],[168,"impl-TableRef%3C\'a,+VheaMarker%3E"],[169,"impl-TableRef%3C\'a,+HheaMarker%3E"],[170,"impl-TableRef%3C\'a,+VheaMarker%3E"],[171,"impl-TableRef%3C\'a,+HheaMarker%3E"],[172,"impl-TableRef%3C\'a,+CaretValueFormat3Marker%3E"],[173,"impl-TableRef%3C\'a,+CaretValueFormat1Marker%3E"],[174,"impl-TableRef%3C\'a,+CaretValueFormat2Marker%3E"],[182,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[183,"impl-TableRef%3C\'a,+PaintRotateAroundCenterMarker%3E"],[184,"impl-TableRef%3C\'a,+PaintSweepGradientMarker%3E"],[185,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[186,"impl-TableRef%3C\'a,+PaintScaleUniformAroundCenterMarker%3E"],[187,"impl-TableRef%3C\'a,+PaintScaleAroundCenterMarker%3E"],[188,"impl-TableRef%3C\'a,+PaintVarScaleUniformAroundCenterMarker%3E"],[189,"impl-TableRef%3C\'a,+PaintSkewAroundCenterMarker%3E"],[190,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[191,"impl-TableRef%3C\'a,+PaintVarRotateAroundCenterMarker%3E"],[192,"impl-TableRef%3C\'a,+PaintScaleUniformAroundCenterMarker%3E"],[193,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[194,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[195,"impl-TableRef%3C\'a,+PaintScaleAroundCenterMarker%3E"],[196,"impl-TableRef%3C\'a,+PaintSweepGradientMarker%3E"],[197,"impl-TableRef%3C\'a,+PaintRotateAroundCenterMarker%3E"],[198,"impl-TableRef%3C\'a,+PaintVarRotateAroundCenterMarker%3E"],[199,"impl-TableRef%3C\'a,+PaintVarScaleUniformAroundCenterMarker%3E"],[200,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[201,"impl-TableRef%3C\'a,+PaintSkewAroundCenterMarker%3E"],[232,"impl-TableRef%3C\'a,+ClassDefFormat1Marker%3E"],[233,"impl-TableRef%3C\'a,+ClassDefFormat2Marker%3E"],[267,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[268,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[269,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[270,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[271,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[272,"impl-TableRef%3C\'a,+PaintSweepGradientMarker%3E"],[273,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[274,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[275,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[276,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[277,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[278,"impl-TableRef%3C\'a,+PaintSweepGradientMarker%3E"],[282,"impl-TableRef%3C\'a,+ColorLineMarker%3E"],[283,"impl-TableRef%3C\'a,+VarColorLineMarker%3E"],[286,"impl-TableRef%3C\'a,+LigatureAttachMarker%3E"],[287,"impl-TableRef%3C\'a,+LigatureMarker%3E"],[300,"impl-TableRef%3C\'a,+BaseCoordFormat3Marker%3E"],[301,"impl-TableRef%3C\'a,+BaseCoordFormat2Marker%3E"],[302,"impl-TableRef%3C\'a,+CaretValueFormat3Marker%3E"],[303,"impl-TableRef%3C\'a,+CaretValueFormat1Marker%3E"],[304,"impl-TableRef%3C\'a,+BaseCoordFormat1Marker%3E"],[305,"impl-TableRef%3C\'a,+NameMarker%3E"],[306,"impl-TableRef%3C\'a,+Index2Marker%3E"],[307,"impl-TableRef%3C\'a,+Index1Marker%3E"],[309,"impl-TableRef%3C\'a,+SequenceContextFormat1Marker%3E"],[310,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat1Marker%3E"],[311,"impl-TableRef%3C\'a,+AlternateSubstFormat1Marker%3E"],[312,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat2Marker%3E"],[313,"impl-TableRef%3C\'a,+SingleSubstFormat1Marker%3E"],[314,"impl-TableRef%3C\'a,+CursivePosFormat1Marker%3E"],[315,"impl-TableRef%3C\'a,+LigatureSubstFormat1Marker%3E"],[316,"impl-TableRef%3C\'a,+SinglePosFormat1Marker%3E"],[317,"impl-TableRef%3C\'a,+SingleSubstFormat2Marker%3E"],[318,"impl-TableRef%3C\'a,+PairPosFormat2Marker%3E"],[319,"impl-TableRef%3C\'a,+AttachListMarker%3E"],[320,"impl-TableRef%3C\'a,+LigCaretListMarker%3E"],[321,"impl-TableRef%3C\'a,+SinglePosFormat2Marker%3E"],[322,"impl-TableRef%3C\'a,+MultipleSubstFormat1Marker%3E"],[323,"impl-TableRef%3C\'a,+SequenceContextFormat2Marker%3E"],[324,"impl-TableRef%3C\'a,+PairPosFormat1Marker%3E"],[325,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[326,"impl-TableRef%3C\'a,+CoverageFormat1Marker%3E"],[327,"impl-TableRef%3C\'a,+CoverageFormat2Marker%3E"],[328,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat2Marker%3E"],[329,"impl-TableRef%3C\'a,+LigCaretListMarker%3E"],[330,"impl-TableRef%3C\'a,+CursivePosFormat1Marker%3E"],[331,"impl-TableRef%3C\'a,+AlternateSubstFormat1Marker%3E"],[332,"impl-TableRef%3C\'a,+PairPosFormat2Marker%3E"],[333,"impl-TableRef%3C\'a,+SequenceContextFormat1Marker%3E"],[334,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat1Marker%3E"],[335,"impl-TableRef%3C\'a,+SingleSubstFormat2Marker%3E"],[336,"impl-TableRef%3C\'a,+AttachListMarker%3E"],[337,"impl-TableRef%3C\'a,+SingleSubstFormat1Marker%3E"],[338,"impl-TableRef%3C\'a,+SinglePosFormat1Marker%3E"],[339,"impl-TableRef%3C\'a,+MultipleSubstFormat1Marker%3E"],[340,"impl-TableRef%3C\'a,+SinglePosFormat2Marker%3E"],[341,"impl-TableRef%3C\'a,+LigatureSubstFormat1Marker%3E"],[342,"impl-TableRef%3C\'a,+PairPosFormat1Marker%3E"],[343,"impl-TableRef%3C\'a,+SequenceContextFormat2Marker%3E"],[344,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[345,"impl-TableRef%3C\'a,+MarkGlyphSetsMarker%3E"],[346,"impl-TableRef%3C\'a,+SequenceContextFormat3Marker%3E"],[347,"impl-TableRef%3C\'a,+MarkGlyphSetsMarker%3E"],[348,"impl-TableRef%3C\'a,+SequenceContextFormat3Marker%3E"],[354,"impl-TableRef%3C\'a,+Index1Marker%3E"],[355,"impl-TableRef%3C\'a,+GlyphDataMarker%3E"],[356,"impl-TableRef%3C\'a,+EbdtMarker%3E"],[357,"impl-TableRef%3C\'a,+CvarMarker%3E"],[358,"impl-TableRef%3C\'a,+Index2Marker%3E"],[359,"impl-TableRef%3C\'a,+CbdtMarker%3E"],[369,"impl-TableRef%3C\'a,+VariationIndexMarker%3E"],[370,"impl-TableRef%3C\'a,+DeviceMarker%3E"],[378,"impl-TableRef%3C\'a,+HheaMarker%3E"],[379,"impl-TableRef%3C\'a,+VheaMarker%3E"],[385,"impl-TableRef%3C\'a,+BaseCoordFormat3Marker%3E"],[386,"impl-TableRef%3C\'a,+CaretValueFormat3Marker%3E"],[387,"impl-TableRef%3C\'a,+CaretValueFormat3Marker%3E"],[388,"impl-TableRef%3C\'a,+BaseCoordFormat3Marker%3E"],[395,"impl-TableRef%3C\'a,+VarAffine2x3Marker%3E"],[396,"impl-TableRef%3C\'a,+Affine2x3Marker%3E"],[397,"impl-TableRef%3C\'a,+PaintVarTranslateMarker%3E"],[398,"impl-TableRef%3C\'a,+PaintTranslateMarker%3E"],[399,"impl-TableRef%3C\'a,+PaintTranslateMarker%3E"],[400,"impl-TableRef%3C\'a,+Affine2x3Marker%3E"],[401,"impl-TableRef%3C\'a,+PaintVarTranslateMarker%3E"],[402,"impl-TableRef%3C\'a,+VarAffine2x3Marker%3E"],[409,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[410,"impl-TableRef%3C\'a,+PaintSweepGradientMarker%3E"],[417,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat0Marker%3E"],[418,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat1Marker%3E"],[419,"impl-TableRef%3C\'a,+TableDirectoryMarker%3E"],[420,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[427,"impl-TableRef%3C\'a,+ColorLineMarker%3E"],[428,"impl-TableRef%3C\'a,+VarColorLineMarker%3E"],[429,"impl-TableRef%3C\'a,+ExtensionSubstFormat1Marker%3CT%3E%3E"],[430,"impl-TableRef%3C\'a,+ExtensionPosFormat1Marker%3CT%3E%3E"],[431,"impl-TableRef%3C\'a,+ExtensionSubstFormat1Marker%3CT%3E%3E"],[432,"impl-TableRef%3C\'a,+ExtensionPosFormat1Marker%3CT%3E%3E"],[433,"impl-TableRef%3C\'a,+ExtensionSubstFormat1Marker%3CT%3E%3E"],[434,"impl-TableRef%3C\'a,+ExtensionPosFormat1Marker%3CT%3E%3E"],[443,"impl-TableRef%3C\'a,+GposMarker%3E"],[444,"impl-TableRef%3C\'a,+GsubMarker%3E"],[445,"impl-TableRef%3C\'a,+GsubMarker%3E"],[446,"impl-TableRef%3C\'a,+GposMarker%3E"],[452,"impl-TableRef%3C\'a,+GposMarker%3E"],[453,"impl-TableRef%3C\'a,+GsubMarker%3E"],[454,"impl-TableRef%3C\'a,+GposMarker%3E"],[455,"impl-TableRef%3C\'a,+GsubMarker%3E"],[462,"impl-TableRef%3C\'a,+HeadMarker%3E"],[463,"impl-TableRef%3C\'a,+AxisValueFormat3Marker%3E"],[464,"impl-TableRef%3C\'a,+AxisValueFormat1Marker%3E"],[465,"impl-TableRef%3C\'a,+AxisValueFormat4Marker%3E"],[466,"impl-TableRef%3C\'a,+SbixMarker%3E"],[467,"impl-TableRef%3C\'a,+AxisValueFormat2Marker%3E"],[468,"impl-TableRef%3C\'a,+GvarMarker%3E"],[470,"impl-Display-for-ReadError"],[471,"impl-Debug-for-ReadError"],[476,"impl-TableRef%3C\'a,+PaintTranslateMarker%3E"],[477,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[478,"impl-TableRef%3C\'a,+ItemVariationStoreMarker%3E"],[479,"impl-TableRef%3C\'a,+PaintScaleUniformAroundCenterMarker%3E"],[480,"impl-TableRef%3C\'a,+PaintSkewMarker%3E"],[481,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat1Marker%3E"],[482,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[483,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat0Marker%3E"],[484,"impl-TableRef%3C\'a,+Cmap8Marker%3E"],[485,"impl-TableRef%3C\'a,+AxisValueFormat4Marker%3E"],[486,"impl-TableRef%3C\'a,+ClipListMarker%3E"],[487,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[488,"impl-TableRef%3C\'a,+AxisValueFormat3Marker%3E"],[489,"impl-TableRef%3C\'a,+PaintVarSkewMarker%3E"],[490,"impl-TableRef%3C\'a,+SequenceContextFormat2Marker%3E"],[491,"impl-TableRef%3C\'a,+PaintSweepGradientMarker%3E"],[492,"impl-TableRef%3C\'a,+AxisValueFormat2Marker%3E"],[493,"impl-TableRef%3C\'a,+PaintSkewAroundCenterMarker%3E"],[494,"impl-TableRef%3C\'a,+Cmap6Marker%3E"],[495,"impl-TableRef%3C\'a,+PaintVarRotateAroundCenterMarker%3E"],[496,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[497,"impl-TableRef%3C\'a,+PaintGlyphMarker%3E"],[498,"impl-TableRef%3C\'a,+AxisValueFormat1Marker%3E"],[499,"impl-TableRef%3C\'a,+PaintRotateAroundCenterMarker%3E"],[500,"impl-TableRef%3C\'a,+PaintVarSolidMarker%3E"],[501,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[502,"impl-TableRef%3C\'a,+PaintColrGlyphMarker%3E"],[503,"impl-TableRef%3C\'a,+MarkGlyphSetsMarker%3E"],[504,"impl-TableRef%3C\'a,+PaintVarRotateMarker%3E"],[505,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat2Marker%3E"],[506,"impl-TableRef%3C\'a,+PaintTransformMarker%3E"],[507,"impl-TableRef%3C\'a,+PaintVarTransformMarker%3E"],[508,"impl-TableRef%3C\'a,+PaintVarScaleUniformMarker%3E"],[509,"impl-TableRef%3C\'a,+FdSelectFormat4Marker%3E"],[510,"impl-TableRef%3C\'a,+FdSelectFormat3Marker%3E"],[511,"impl-TableRef%3C\'a,+FdSelectFormat0Marker%3E"],[512,"impl-TableRef%3C\'a,+PaintScaleUniformMarker%3E"],[513,"impl-TableRef%3C\'a,+Cmap10Marker%3E"],[514,"impl-TableRef%3C\'a,+PaintSolidMarker%3E"],[515,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[516,"impl-TableRef%3C\'a,+PaintCompositeMarker%3E"],[517,"impl-TableRef%3C\'a,+PaintRotateMarker%3E"],[518,"impl-TableRef%3C\'a,+SequenceContextFormat1Marker%3E"],[519,"impl-TableRef%3C\'a,+ClipBoxFormat1Marker%3E"],[520,"impl-TableRef%3C\'a,+Cmap14Marker%3E"],[521,"impl-TableRef%3C\'a,+ConditionFormat1Marker%3E"],[522,"impl-TableRef%3C\'a,+ClipBoxFormat2Marker%3E"],[523,"impl-TableRef%3C\'a,+PaintVarScaleUniformAroundCenterMarker%3E"],[524,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat1Marker%3E"],[525,"impl-TableRef%3C\'a,+PaintVarTranslateMarker%3E"],[526,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[527,"impl-TableRef%3C\'a,+PaintScaleMarker%3E"],[528,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[529,"impl-TableRef%3C\'a,+PaintVarScaleMarker%3E"],[530,"impl-TableRef%3C\'a,+PaintScaleAroundCenterMarker%3E"],[531,"impl-TableRef%3C\'a,+SequenceContextFormat3Marker%3E"],[532,"impl-TableRef%3C\'a,+Cmap2Marker%3E"],[533,"impl-TableRef%3C\'a,+CharacterVariantParamsMarker%3E"],[534,"impl-TableRef%3C\'a,+Cmap12Marker%3E"],[535,"impl-TableRef%3C\'a,+Cmap0Marker%3E"],[536,"impl-TableRef%3C\'a,+Cmap13Marker%3E"],[537,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[538,"impl-TableRef%3C\'a,+PaintColrLayersMarker%3E"],[559,"impl-TableRef%3C\'a,+ClassDefFormat1Marker%3E"],[560,"impl-TableRef%3C\'_,+CoverageFormat2Marker%3E"],[561,"impl-TableRef%3C\'a,+Index2Marker%3E"],[562,"impl-TableRef%3C\'_,+CoverageFormat1Marker%3E"],[563,"impl-TableRef%3C\'a,+ClassDefFormat2Marker%3E"],[564,"impl-TableRef%3C\'a,+Index1Marker%3E"],[566,"impl-TableRef%3C\'a,+Index2Marker%3E"],[567,"impl-TableRef%3C\'a,+Index1Marker%3E"],[571,"impl-TableRef%3C\'a,+IndexSubtable4Marker%3E"],[572,"impl-TableRef%3C\'a,+CoverageFormat1Marker%3E"],[573,"impl-TableRef%3C\'a,+IndexSubtable5Marker%3E"],[576,"impl-TableRef%3C\'a,+SequenceRuleMarker%3E"],[577,"impl-TableRef%3C\'a,+SingleSubstFormat2Marker%3E"],[578,"impl-TableRef%3C\'a,+SequenceMarker%3E"],[579,"impl-TableRef%3C\'a,+ClassDefFormat1Marker%3E"],[580,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[581,"impl-TableRef%3C\'a,+AlternateSetMarker%3E"],[582,"impl-TableRef%3C\'a,+AttachListMarker%3E"],[583,"impl-TableRef%3C\'a,+ClassSequenceRuleMarker%3E"],[584,"impl-TableRef%3C\'a,+CoverageFormat1Marker%3E"],[585,"impl-TableRef%3C\'a,+SequenceContextFormat3Marker%3E"],[586,"impl-TableRef%3C\'a,+GvarMarker%3E"],[587,"impl-TableRef%3C\'a,+SimpleGlyphMarker%3E"],[588,"impl-TableRef%3C\'a,+StrikeMarker%3E"],[591,"impl-TableRef%3C\'a,+PaintColrGlyphMarker%3E"],[592,"impl-TableRef%3C\'a,+PaintGlyphMarker%3E"],[593,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[594,"impl-TableRef%3C\'a,+Cmap0Marker%3E"],[595,"impl-TableRef%3C\'a,+Cmap10Marker%3E"],[596,"impl-TableRef%3C\'a,+Cmap6Marker%3E"],[605,"impl-TableRef%3C\'a,+Cmap12Marker%3E"],[606,"impl-TableRef%3C\'a,+Cmap13Marker%3E"],[607,"impl-TableRef%3C\'a,+Cmap8Marker%3E"],[630,"impl-TableRef%3C\'a,+IndexSubtable3Marker%3E"],[631,"impl-TableRef%3C\'a,+IndexSubtable2Marker%3E"],[632,"impl-TableRef%3C\'a,+IndexSubtable4Marker%3E"],[633,"impl-TableRef%3C\'a,+IndexSubtable1Marker%3E"],[634,"impl-TableRef%3C\'a,+IndexSubtable5Marker%3E"],[635,"impl-TableRef%3C\'a,+IndexSubtable2Marker%3E"],[636,"impl-TableRef%3C\'a,+IndexSubtable4Marker%3E"],[637,"impl-TableRef%3C\'a,+IndexSubtable1Marker%3E"],[638,"impl-TableRef%3C\'a,+IndexSubtable3Marker%3E"],[639,"impl-TableRef%3C\'a,+IndexSubtable5Marker%3E"],[640,"impl-TableRef%3C\'a,+IndexSubtable5Marker%3E"],[641,"impl-TableRef%3C\'a,+IndexSubtable2Marker%3E"],[642,"impl-TableRef%3C\'a,+IndexSubtable5Marker%3E"],[643,"impl-TableRef%3C\'a,+IndexSubtable1Marker%3E"],[644,"impl-TableRef%3C\'a,+IndexSubtable2Marker%3E"],[645,"impl-TableRef%3C\'a,+IndexSubtable4Marker%3E"],[646,"impl-TableRef%3C\'a,+IndexSubtable3Marker%3E"],[652,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[653,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[654,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[655,"impl-TableRef%3C\'a,+ClassSequenceRuleMarker%3E"],[656,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[657,"impl-TableRef%3C\'a,+SequenceRuleMarker%3E"],[658,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[661,"impl-TableRef%3C\'a,+AxisInstanceArraysMarker%3E"],[662,"impl-TableRef%3C\'a,+FvarMarker%3E"],[664,"impl-TableRef%3C\'a,+CompositeGlyphMarker%3E"],[665,"impl-TableRef%3C\'a,+SimpleGlyphMarker%3E"],[686,"impl-TableRef%3C\'a,+GdefMarker%3E"],[687,"impl-TableRef%3C\'a,+BaseMarker%3E"],[688,"impl-TableRef%3C\'a,+GdefMarker%3E"],[689,"impl-TableRef%3C\'a,+BaseMarker%3E"],[693,"impl-TableRef%3C\'a,+HvarMarker%3E"],[694,"impl-TableRef%3C\'a,+MvarMarker%3E"],[695,"impl-TableRef%3C\'a,+VvarMarker%3E"],[696,"impl-TableRef%3C\'a,+ColrMarker%3E"],[697,"impl-TableRef%3C\'a,+MvarMarker%3E"],[698,"impl-TableRef%3C\'a,+ColrMarker%3E"],[699,"impl-TableRef%3C\'a,+HvarMarker%3E"],[700,"impl-TableRef%3C\'a,+VvarMarker%3E"],[703,"impl-TableRef%3C\'a,+Cmap12Marker%3E"],[704,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[705,"impl-TableRef%3C\'a,+Cmap14Marker%3E"],[706,"impl-TableRef%3C\'a,+ClassDefFormat2Marker%3E"],[707,"impl-TableRef%3C\'a,+ClassDefFormat1Marker%3E"],[708,"impl-TableRef%3C\'a,+DeviceMarker%3E"],[714,"impl-TableRef%3C\'a,+Cmap2Marker%3E"],[715,"impl-TableRef%3C\'a,+Cmap6Marker%3E"],[716,"impl-TableRef%3C\'a,+Cmap8Marker%3E"],[717,"impl-TableRef%3C\'a,+Cmap10Marker%3E"],[718,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[719,"impl-TableRef%3C\'a,+Cmap12Marker%3E"],[720,"impl-TableRef%3C\'a,+Cmap0Marker%3E"],[721,"impl-TableRef%3C\'a,+Cmap13Marker%3E"],[732,"impl-TableRef%3C\'a,+Cmap0Marker%3E"],[733,"impl-TableRef%3C\'a,+Cmap2Marker%3E"],[734,"impl-TableRef%3C\'a,+Cmap13Marker%3E"],[735,"impl-TableRef%3C\'a,+Cmap12Marker%3E"],[736,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[737,"impl-TableRef%3C\'a,+Cmap14Marker%3E"],[738,"impl-TableRef%3C\'a,+Cmap6Marker%3E"],[739,"impl-TableRef%3C\'a,+Cmap10Marker%3E"],[740,"impl-TableRef%3C\'a,+Cmap8Marker%3E"],[752,"impl-TableRef%3C\'a,+LigatureSetMarker%3E"],[753,"impl-TableRef%3C\'a,+LigatureArrayMarker%3E"],[762,"impl-TableRef%3C\'a,+VheaMarker%3E"],[763,"impl-TableRef%3C\'a,+HheaMarker%3E"],[769,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[770,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[771,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[772,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[773,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[774,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[775,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[776,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[777,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[778,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[782,"impl-TableRef%3C\'a,+GposMarker%3E"],[783,"impl-TableRef%3C\'a,+GsubMarker%3E"],[785,"impl-TableRef%3C\'a,+GsubMarker%3E"],[786,"impl-TableRef%3C\'a,+GposMarker%3E"],[797,"impl-TableRef%3C\'a,+Cff2HeaderMarker%3E"],[798,"impl-TableRef%3C\'a,+CblcMarker%3E"],[799,"impl-TableRef%3C\'a,+CbdtMarker%3E"],[800,"impl-TableRef%3C\'a,+EbdtMarker%3E"],[801,"impl-TableRef%3C\'a,+EblcMarker%3E"],[802,"impl-TableRef%3C\'a,+CmapMarker%3E"],[803,"impl-TableRef%3C\'a,+Cmap12Marker%3E"],[804,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[805,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat0Marker%3E"],[806,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat1Marker%3E"],[807,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat0Marker%3E"],[808,"impl-TableRef%3C\'a,+DeltaSetIndexMapFormat1Marker%3E"],[820,"impl-TableRef%3C\'a,+MarkLigPosFormat1Marker%3E"],[821,"impl-TableRef%3C\'a,+MarkBasePosFormat1Marker%3E"],[822,"impl-TableRef%3C\'a,+MarkBasePosFormat1Marker%3E"],[823,"impl-TableRef%3C\'a,+MarkLigPosFormat1Marker%3E"],[826,"impl-TableRef%3C\'a,+MarkMarkPosFormat1Marker%3E"],[827,"impl-TableRef%3C\'a,+MarkBasePosFormat1Marker%3E"],[828,"impl-TableRef%3C\'a,+MarkLigPosFormat1Marker%3E"],[830,"impl-TableRef%3C\'a,+MarkBasePosFormat1Marker%3E"],[831,"impl-TableRef%3C\'a,+MarkLigPosFormat1Marker%3E"],[832,"impl-TableRef%3C\'a,+MarkBasePosFormat1Marker%3E"],[833,"impl-TableRef%3C\'a,+MarkLigPosFormat1Marker%3E"],[858,"impl-TableRef%3C\'a,+HheaMarker%3E"],[859,"impl-TableRef%3C\'a,+VheaMarker%3E"],[870,"impl-TableRef%3C\'a,+EblcMarker%3E"],[871,"impl-TableRef%3C\'a,+Cff2HeaderMarker%3E"],[872,"impl-TableRef%3C\'a,+CblcMarker%3E"],[873,"impl-TableRef%3C\'a,+EbdtMarker%3E"],[874,"impl-TableRef%3C\'a,+CbdtMarker%3E"],[878,"impl-TableRef%3C\'a,+FdSelectFormat4Marker%3E"],[879,"impl-TableRef%3C\'a,+FdSelectFormat3Marker%3E"],[898,"impl-TableRef%3C\'a,+MaxpMarker%3E"],[899,"impl-TableRef%3C\'a,+PostMarker%3E"],[900,"impl-TableRef%3C\'a,+IndexSubtable4Marker%3E"],[901,"impl-TableRef%3C\'a,+IndexSubtable5Marker%3E"],[902,"impl-TableRef%3C\'a,+Cmap13Marker%3E"],[903,"impl-TableRef%3C\'a,+Cmap8Marker%3E"],[904,"impl-TableRef%3C\'a,+Cmap12Marker%3E"],[906,"impl-TableRef%3C\'a,+LayerListMarker%3E"],[907,"impl-TableRef%3C\'a,+PaintColrLayersMarker%3E"],[914,"impl-TableRef%3C\'a,+EblcMarker%3E"],[915,"impl-TableRef%3C\'a,+CblcMarker%3E"],[916,"impl-TableRef%3C\'a,+VarColorLineMarker%3E"],[917,"impl-TableRef%3C\'a,+ColorLineMarker%3E"],[919,"impl-TableRef%3C\'a,+CmapMarker%3E"],[920,"impl-TableRef%3C\'a,+TableDirectoryMarker%3E"],[925,"impl-TableRef%3C\'a,+CompositeGlyphMarker%3E"],[926,"impl-TableRef%3C\'a,+SimpleGlyphMarker%3E"],[929,"impl-TableRef%3C\'a,+CffHeaderMarker%3E"],[930,"impl-TableRef%3C\'a,+Index2Marker%3E"],[931,"impl-TableRef%3C\'a,+Index1Marker%3E"],[937,"impl-TableRef%3C\'a,+Index2Marker%3E"],[938,"impl-TableRef%3C\'a,+Index1Marker%3E"],[943,"impl-TableRef%3C\'a,+PaintVarScaleUniformMarker%3E"],[944,"impl-TableRef%3C\'a,+PaintRotateMarker%3E"],[945,"impl-TableRef%3C\'a,+PaintScaleMarker%3E"],[946,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[947,"impl-TableRef%3C\'a,+PaintVarScaleMarker%3E"],[948,"impl-TableRef%3C\'a,+PaintVarRotateAroundCenterMarker%3E"],[949,"impl-TableRef%3C\'a,+PaintScaleAroundCenterMarker%3E"],[950,"impl-TableRef%3C\'a,+PaintRotateAroundCenterMarker%3E"],[951,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[952,"impl-TableRef%3C\'a,+PaintTranslateMarker%3E"],[953,"impl-TableRef%3C\'a,+PaintVarTransformMarker%3E"],[954,"impl-TableRef%3C\'a,+PaintVarRotateMarker%3E"],[955,"impl-TableRef%3C\'a,+PaintScaleUniformMarker%3E"],[956,"impl-TableRef%3C\'a,+PaintGlyphMarker%3E"],[957,"impl-TableRef%3C\'a,+PaintVarSkewMarker%3E"],[958,"impl-TableRef%3C\'a,+PaintTransformMarker%3E"],[959,"impl-TableRef%3C\'a,+PaintVarTranslateMarker%3E"],[960,"impl-TableRef%3C\'a,+PaintVarScaleUniformAroundCenterMarker%3E"],[961,"impl-TableRef%3C\'a,+PaintScaleUniformAroundCenterMarker%3E"],[962,"impl-TableRef%3C\'a,+PaintSkewAroundCenterMarker%3E"],[963,"impl-TableRef%3C\'a,+PaintSkewMarker%3E"],[964,"impl-TableRef%3C\'a,+PaintScaleMarker%3E"],[965,"impl-TableRef%3C\'a,+PaintTranslateMarker%3E"],[966,"impl-TableRef%3C\'a,+PaintScaleUniformAroundCenterMarker%3E"],[967,"impl-TableRef%3C\'a,+PaintVarTransformMarker%3E"],[968,"impl-TableRef%3C\'a,+PaintVarRotateAroundCenterMarker%3E"],[969,"impl-TableRef%3C\'a,+PaintGlyphMarker%3E"],[970,"impl-TableRef%3C\'a,+PaintVarScaleUniformAroundCenterMarker%3E"],[971,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[972,"impl-TableRef%3C\'a,+PaintRotateMarker%3E"],[973,"impl-TableRef%3C\'a,+PaintVarScaleUniformMarker%3E"],[974,"impl-TableRef%3C\'a,+PaintSkewAroundCenterMarker%3E"],[975,"impl-TableRef%3C\'a,+PaintVarRotateMarker%3E"],[976,"impl-TableRef%3C\'a,+PaintScaleUniformMarker%3E"],[977,"impl-TableRef%3C\'a,+PaintSkewMarker%3E"],[978,"impl-TableRef%3C\'a,+PaintTransformMarker%3E"],[979,"impl-TableRef%3C\'a,+PaintVarSkewMarker%3E"],[980,"impl-TableRef%3C\'a,+PaintVarTranslateMarker%3E"],[981,"impl-TableRef%3C\'a,+PaintRotateAroundCenterMarker%3E"],[982,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[983,"impl-TableRef%3C\'a,+PaintScaleAroundCenterMarker%3E"],[984,"impl-TableRef%3C\'a,+PaintVarScaleMarker%3E"],[994,"impl-TableRef%3C\'a,+PaintSolidMarker%3E"],[995,"impl-TableRef%3C\'a,+PaintVarSolidMarker%3E"],[1006,"impl-TableRef%3C\'a,+MarkMarkPosFormat1Marker%3E"],[1007,"impl-TableRef%3C\'a,+MarkLigPosFormat1Marker%3E"],[1008,"impl-TableRef%3C\'a,+PairPosFormat2Marker%3E"],[1009,"impl-TableRef%3C\'a,+CursivePosFormat1Marker%3E"],[1010,"impl-TableRef%3C\'a,+MarkBasePosFormat1Marker%3E"],[1011,"impl-TableRef%3C\'a,+SinglePosFormat1Marker%3E"],[1012,"impl-TableRef%3C\'a,+ExtensionPosFormat1Marker%3CT%3E%3E"],[1013,"impl-TableRef%3C\'a,+SinglePosFormat2Marker%3E"],[1014,"impl-TableRef%3C\'a,+PairPosFormat1Marker%3E"],[1019,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[1020,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[1021,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[1022,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[1028,"impl-TableRef%3C\'a,+TableDirectoryMarker%3E"],[1029,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[1032,"impl-TableRef%3C\'a,+DefaultUvsMarker%3E"],[1033,"impl-TableRef%3C\'a,+FdSelectFormat4Marker%3E"],[1034,"impl-TableRef%3C\'a,+FdSelectFormat3Marker%3E"],[1037,"impl-TableRef%3C\'a,+TupleVariationHeaderMarker%3E"],[1038,"impl-TableRef%3C\'a,+LigatureAttachMarker%3E"],[1039,"impl-TableRef%3C\'a,+SharedTuplesMarker%3E"],[1040,"impl-TableRef%3C\'a,+Mark2ArrayMarker%3E"],[1041,"impl-TableRef%3C\'a,+FeatureMarker%3E"],[1042,"impl-TableRef%3C\'a,+AxisValueArrayMarker%3E"],[1043,"impl-TableRef%3C\'a,+PairSetMarker%3E"],[1044,"impl-TableRef%3C\'a,+SbixMarker%3E"],[1045,"impl-TableRef%3C\'a,+BaseArrayMarker%3E"],[1046,"impl-TableRef%3C\'a,+LigatureArrayMarker%3E"],[1047,"impl-TableRef%3C\'a,+AxisInstanceArraysMarker%3E"],[1048,"impl-TableRef%3C\'a,+VmtxMarker%3E"],[1049,"impl-TableRef%3C\'a,+HmtxMarker%3E"],[1050,"impl-TableRef%3C\'a,+StrikeMarker%3E"],[1081,"impl-TableRef%3C\'a,+IndexSubtable1Marker%3E"],[1082,"impl-TableRef%3C\'a,+IndexSubtable3Marker%3E"],[1085,"impl-TableRef%3C\'a,+PaintScaleUniformMarker%3E"],[1086,"impl-TableRef%3C\'a,+PaintVarScaleUniformMarker%3E"],[1087,"impl-TableRef%3C\'a,+PaintScaleUniformAroundCenterMarker%3E"],[1088,"impl-TableRef%3C\'a,+PaintVarScaleUniformAroundCenterMarker%3E"],[1089,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[1090,"impl-TableRef%3C\'a,+PaintScaleMarker%3E"],[1091,"impl-TableRef%3C\'a,+PaintScaleAroundCenterMarker%3E"],[1092,"impl-TableRef%3C\'a,+PaintVarScaleMarker%3E"],[1093,"impl-TableRef%3C\'a,+PaintScaleMarker%3E"],[1094,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[1095,"impl-TableRef%3C\'a,+PaintScaleAroundCenterMarker%3E"],[1096,"impl-TableRef%3C\'a,+PaintVarScaleMarker%3E"],[1098,"impl-TableRef%3C\'a,+GsubMarker%3E"],[1099,"impl-TableRef%3C\'a,+GposMarker%3E"],[1100,"impl-TableRef%3C\'a,+GsubMarker%3E"],[1101,"impl-TableRef%3C\'a,+GposMarker%3E"],[1103,"impl-TableRef%3C\'a,+Cmap4Marker%3E"],[1104,"impl-TableRef%3C\'a,+TableDirectoryMarker%3E"],[1107,"impl-TableRef%3C\'a,+FdSelectFormat4Marker%3E"],[1108,"impl-TableRef%3C\'a,+FdSelectFormat3Marker%3E"],[1109,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[1110,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[1111,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[1112,"impl-TableRef%3C\'a,+SequenceContextFormat3Marker%3E"],[1113,"impl-TableRef%3C\'a,+ClassSequenceRuleMarker%3E"],[1114,"impl-TableRef%3C\'a,+SequenceRuleMarker%3E"],[1115,"impl-TableRef%3C\'a,+ChainedSequenceContextFormat3Marker%3E"],[1116,"impl-TableRef%3C\'a,+ChainedClassSequenceRuleMarker%3E"],[1117,"impl-TableRef%3C\'a,+ChainedSequenceRuleMarker%3E"],[1118,"impl-TableRef%3C\'a,+SequenceContextFormat3Marker%3E"],[1119,"impl-TableRef%3C\'a,+ClassSequenceRuleMarker%3E"],[1120,"impl-TableRef%3C\'a,+SequenceRuleMarker%3E"],[1137,"impl-TableRef%3C\'a,+HmtxMarker%3E"],[1138,"impl-TableRef%3C\'a,+VmtxMarker%3E"],[1139,"impl-TableRef%3C\'a,+Index2Marker%3E"],[1140,"impl-TableRef%3C\'a,+Index1Marker%3E"],[1145,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[1146,"impl-TableRef%3C\'a,+PaintSweepGradientMarker%3E"],[1156,"impl-TableRef%3C\'a,+NameMarker%3E"],[1157,"impl-TableRef%3C\'a,+PostMarker%3E"],[1160,"impl-TableRef%3C\'a,+MultipleSubstFormat1Marker%3E"],[1161,"impl-TableRef%3C\'a,+SingleSubstFormat2Marker%3E"],[1162,"impl-TableRef%3C\'a,+SingleSubstFormat1Marker%3E"],[1163,"impl-TableRef%3C\'a,+ExtensionSubstFormat1Marker%3CT%3E%3E"],[1164,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[1165,"impl-TableRef%3C\'a,+LigatureSubstFormat1Marker%3E"],[1166,"impl-TableRef%3C\'a,+AlternateSubstFormat1Marker%3E"],[1167,"impl-TableRef%3C\'a,+SequenceMarker%3E"],[1168,"impl-TableRef%3C\'a,+ReverseChainSingleSubstFormat1Marker%3E"],[1169,"impl-TableRef%3C\'a,+SingleSubstFormat2Marker%3E"],[1199,"impl-TableRef%3C\'a,+Cff2HeaderMarker%3E"],[1200,"impl-TableRef%3C\'a,+CffHeaderMarker%3E"],[1201,"impl-TableRef%3C\'a,+PaintTransformMarker%3E"],[1202,"impl-TableRef%3C\'a,+PaintVarTransformMarker%3E"],[1203,"impl-TableRef%3C\'a,+PaintTransformMarker%3E"],[1204,"impl-TableRef%3C\'a,+PaintVarTransformMarker%3E"],[1229,"impl-TableRef%3C\'a,+GlyphVariationDataHeaderMarker%3E"],[1230,"impl-TableRef%3C\'a,+CvarMarker%3E"],[1231,"impl-TableRef%3C\'a,+CvarMarker%3E"],[1232,"impl-TableRef%3C\'a,+GlyphVariationDataHeaderMarker%3E"],[1275,"impl-TableRef%3C\'a,+AxisValueFormat1Marker%3E"],[1276,"impl-TableRef%3C\'a,+AxisValueFormat3Marker%3E"],[1278,"impl-TableRef%3C\'a,+SinglePosFormat2Marker%3E"],[1279,"impl-TableRef%3C\'a,+SinglePosFormat1Marker%3E"],[1280,"impl-TableRef%3C\'a,+PairPosFormat2Marker%3E"],[1281,"impl-TableRef%3C\'a,+PairPosFormat1Marker%3E"],[1282,"impl-TableRef%3C\'a,+PairPosFormat1Marker%3E"],[1283,"impl-TableRef%3C\'a,+PairPosFormat2Marker%3E"],[1284,"impl-TableRef%3C\'a,+AxisValueFormat3Marker%3E"],[1285,"impl-TableRef%3C\'a,+AxisValueFormat1Marker%3E"],[1286,"impl-TableRef%3C\'a,+AxisValueFormat2Marker%3E"],[1287,"impl-TableRef%3C\'a,+AxisValueFormat4Marker%3E"],[1291,"impl-TableRef%3C\'a,+MvarMarker%3E"],[1292,"impl-TableRef%3C\'a,+SinglePosFormat2Marker%3E"],[1293,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[1294,"impl-TableRef%3C\'a,+PaintVarSolidMarker%3E"],[1295,"impl-TableRef%3C\'a,+PaintVarRotateAroundCenterMarker%3E"],[1296,"impl-TableRef%3C\'a,+PaintVarRotateMarker%3E"],[1297,"impl-TableRef%3C\'a,+PaintVarSkewMarker%3E"],[1298,"impl-TableRef%3C\'a,+PaintVarScaleMarker%3E"],[1299,"impl-TableRef%3C\'a,+PaintVarScaleAroundCenterMarker%3E"],[1300,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[1301,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[1302,"impl-TableRef%3C\'a,+PaintVarScaleUniformAroundCenterMarker%3E"],[1303,"impl-TableRef%3C\'a,+PaintVarSweepGradientMarker%3E"],[1304,"impl-TableRef%3C\'a,+ClipBoxFormat2Marker%3E"],[1305,"impl-TableRef%3C\'a,+PaintVarScaleUniformMarker%3E"],[1306,"impl-TableRef%3C\'a,+VarAffine2x3Marker%3E"],[1307,"impl-TableRef%3C\'a,+PaintVarTranslateMarker%3E"],[1316,"impl-TableRef%3C\'a,+HheaMarker%3E"],[1317,"impl-TableRef%3C\'a,+FvarMarker%3E"],[1318,"impl-TableRef%3C\'a,+GsubMarker%3E"],[1319,"impl-TableRef%3C\'a,+VvarMarker%3E"],[1320,"impl-TableRef%3C\'a,+ColrMarker%3E"],[1321,"impl-TableRef%3C\'a,+CvarMarker%3E"],[1322,"impl-TableRef%3C\'a,+BaseMarker%3E"],[1323,"impl-TableRef%3C\'a,+PostMarker%3E"],[1324,"impl-TableRef%3C\'a,+Os2Marker%3E"],[1325,"impl-TableRef%3C\'a,+AvarMarker%3E"],[1326,"impl-TableRef%3C\'a,+GdefMarker%3E"],[1327,"impl-TableRef%3C\'a,+HeadMarker%3E"],[1328,"impl-TableRef%3C\'a,+SbixMarker%3E"],[1329,"impl-TableRef%3C\'a,+GvarMarker%3E"],[1330,"impl-TableRef%3C\'a,+HvarMarker%3E"],[1331,"impl-TableRef%3C\'a,+GposMarker%3E"],[1332,"impl-TableRef%3C\'a,+StatMarker%3E"],[1333,"impl-TableRef%3C\'a,+FeatureVariationsMarker%3E"],[1334,"impl-TableRef%3C\'a,+VheaMarker%3E"],[1335,"impl-TableRef%3C\'a,+TTCHeaderMarker%3E"],[1336,"impl-TableRef%3C\'a,+NameMarker%3E"],[1337,"impl-TableRef%3C\'a,+FeatureTableSubstitutionMarker%3E"],[1338,"impl-TableRef%3C\'a,+CmapMarker%3E"],[1339,"impl-TableRef%3C\'a,+CpalMarker%3E"],[1340,"impl-TableRef%3C\'a,+StylisticSetParamsMarker%3E"],[1341,"impl-TableRef%3C\'a,+GaspMarker%3E"],[1342,"impl-TableRef%3C\'a,+MaxpMarker%3E"],[1343,"impl-TableRef%3C\'a,+MvarMarker%3E"],[1354,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[1355,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[1356,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[1357,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[1358,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[1359,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[1360,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[1361,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[1362,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[1363,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[1365,"impl-TableRef%3C\'a,+AnchorFormat2Marker%3E"],[1366,"impl-TableRef%3C\'a,+AnchorFormat1Marker%3E"],[1367,"impl-TableRef%3C\'a,+AnchorFormat3Marker%3E"],[1370,"impl-TableRef%3C\'a,+SimpleGlyphMarker%3E"],[1371,"impl-TableRef%3C\'a,+HeadMarker%3E"],[1372,"impl-TableRef%3C\'a,+ClipBoxFormat2Marker%3E"],[1373,"impl-TableRef%3C\'a,+CompositeGlyphMarker%3E"],[1374,"impl-TableRef%3C\'a,+ClipBoxFormat1Marker%3E"],[1376,"impl-TableRef%3C\'a,+ClipBoxFormat2Marker%3E"],[1377,"impl-TableRef%3C\'a,+ClipBoxFormat1Marker%3E"],[1378,"impl-TableRef%3C\'a,+HeadMarker%3E"],[1379,"impl-TableRef%3C\'a,+CompositeGlyphMarker%3E"],[1380,"impl-TableRef%3C\'a,+SimpleGlyphMarker%3E"],[1381,"impl-TableRef%3C\'a,+PaintSkewMarker%3E"],[1382,"impl-TableRef%3C\'a,+PaintVarSkewMarker%3E"],[1383,"impl-TableRef%3C\'a,+PaintSkewAroundCenterMarker%3E"],[1384,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[1385,"impl-TableRef%3C\'a,+Affine2x3Marker%3E"],[1386,"impl-TableRef%3C\'a,+VarAffine2x3Marker%3E"],[1387,"impl-TableRef%3C\'a,+VarAffine2x3Marker%3E"],[1388,"impl-TableRef%3C\'a,+Affine2x3Marker%3E"],[1389,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[1390,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[1391,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[1392,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[1393,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[1394,"impl-TableRef%3C\'a,+PaintRadialGradientMarker%3E"],[1395,"impl-TableRef%3C\'a,+PaintVarRadialGradientMarker%3E"],[1396,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[1397,"impl-TableRef%3C\'a,+PaintVarLinearGradientMarker%3E"],[1398,"impl-TableRef%3C\'a,+PaintLinearGradientMarker%3E"],[1399,"impl-TableRef%3C\'a,+AnchorFormat3Marker%3E"],[1400,"impl-TableRef%3C\'a,+AnchorFormat2Marker%3E"],[1401,"impl-TableRef%3C\'a,+AnchorFormat1Marker%3E"],[1404,"impl-TableRef%3C\'a,+HeadMarker%3E"],[1405,"impl-TableRef%3C\'a,+ClipBoxFormat2Marker%3E"],[1406,"impl-TableRef%3C\'a,+CompositeGlyphMarker%3E"],[1407,"impl-TableRef%3C\'a,+ClipBoxFormat1Marker%3E"],[1408,"impl-TableRef%3C\'a,+SimpleGlyphMarker%3E"],[1410,"impl-TableRef%3C\'a,+HeadMarker%3E"],[1411,"impl-TableRef%3C\'a,+ClipBoxFormat2Marker%3E"],[1412,"impl-TableRef%3C\'a,+ClipBoxFormat1Marker%3E"],[1413,"impl-TableRef%3C\'a,+CompositeGlyphMarker%3E"],[1414,"impl-TableRef%3C\'a,+SimpleGlyphMarker%3E"],[1415,"impl-TableRef%3C\'a,+PaintSkewAroundCenterMarker%3E"],[1416,"impl-TableRef%3C\'a,+PaintVarSkewMarker%3E"],[1417,"impl-TableRef%3C\'a,+PaintVarSkewAroundCenterMarker%3E"],[1418,"impl-TableRef%3C\'a,+PaintSkewMarker%3E"],[1429,"impl-TableRef%3C\'a,+VarAffine2x3Marker%3E"],[1430,"impl-TableRef%3C\'a,+Affine2x3Marker%3E"],[1431,"impl-TableRef%3C\'a,+VarAffine2x3Marker%3E"],[1432,"impl-TableRef%3C\'a,+Affine2x3Marker%3E"],[1833,"impl-Octal-for-BitmapFlags"],[1834,"impl-UpperHex-for-BitmapFlags"],[1835,"impl-Debug-for-BitmapFlags"],[1836,"impl-LowerHex-for-BitmapFlags"],[1837,"impl-Binary-for-BitmapFlags"],[3152,"impl-UpperHex-for-PaletteType"],[3153,"impl-Binary-for-PaletteType"],[3154,"impl-Octal-for-PaletteType"],[3155,"impl-Debug-for-PaletteType"],[3156,"impl-LowerHex-for-PaletteType"],[3341,"impl-Octal-for-GaspRangeBehavior"],[3342,"impl-Binary-for-GaspRangeBehavior"],[3343,"impl-LowerHex-for-GaspRangeBehavior"],[3344,"impl-Debug-for-GaspRangeBehavior"],[3345,"impl-UpperHex-for-GaspRangeBehavior"],[3640,"impl-Debug-for-SimpleGlyphFlags"],[3641,"impl-LowerHex-for-SimpleGlyphFlags"],[3642,"impl-Octal-for-SimpleGlyphFlags"],[3643,"impl-UpperHex-for-SimpleGlyphFlags"],[3644,"impl-Binary-for-SimpleGlyphFlags"],[3645,"impl-Debug-for-CompositeGlyphFlags"],[3646,"impl-Octal-for-CompositeGlyphFlags"],[3647,"impl-LowerHex-for-CompositeGlyphFlags"],[3648,"impl-UpperHex-for-CompositeGlyphFlags"],[3649,"impl-Binary-for-CompositeGlyphFlags"],[3656,"impl-Debug-for-ToPathError"],[3657,"impl-Display-for-ToPathError"],[4110,"impl-Display-for-DecodeError"],[4111,"impl-Debug-for-DecodeError"],[4112,"impl-Display-for-Instruction%3C\'_%3E"],[4113,"impl-Debug-for-Instruction%3C\'a%3E"],[4115,"impl-Display-for-Opcode"],[4116,"impl-Debug-for-Opcode"],[4382,"impl-ExtensionLookup%3C\'a,+T%3E-for-TableRef%3C\'a,+ExtensionPosFormat1Marker%3CT%3E%3E"],[4383,"impl-TableRef%3C\'a,+ExtensionPosFormat1Marker%3CT%3E%3E"],[4391,"impl-LowerHex-for-ValueFormat"],[4392,"impl-Binary-for-ValueFormat"],[4393,"impl-Debug-for-ValueFormat"],[4394,"impl-Octal-for-ValueFormat"],[4395,"impl-UpperHex-for-ValueFormat"],[4775,"impl-ExtensionLookup%3C\'a,+T%3E-for-TableRef%3C\'a,+ExtensionSubstFormat1Marker%3CT%3E%3E"],[4776,"impl-TableRef%3C\'a,+ExtensionSubstFormat1Marker%3CT%3E%3E"],[4898,"impl-UpperHex-for-GvarFlags"],[4899,"impl-LowerHex-for-GvarFlags"],[4900,"impl-Debug-for-GvarFlags"],[4901,"impl-Binary-for-GvarFlags"],[4902,"impl-Octal-for-GvarFlags"],[4994,"impl-LowerHex-for-MacStyle"],[4995,"impl-UpperHex-for-MacStyle"],[4996,"impl-Octal-for-MacStyle"],[4997,"impl-Debug-for-MacStyle"],[4998,"impl-Binary-for-MacStyle"],[5845,"impl-Debug-for-NameId"],[5846,"impl-Display-for-NameId"],[5849,"impl-Display-for-NameString%3C\'a%3E"],[5850,"impl-Debug-for-NameString%3C\'a%3E"],[5964,"impl-UpperHex-for-SelectionFlags"],[5965,"impl-LowerHex-for-SelectionFlags"],[5966,"impl-Octal-for-SelectionFlags"],[5967,"impl-Debug-for-SelectionFlags"],[5968,"impl-Binary-for-SelectionFlags"],[6040,"impl-PartialEq-for-PString%3C\'a%3E"],[6041,"impl-PartialEq%3C%26str%3E-for-PString%3C\'_%3E"],[6158,"impl-PartialEq%3C%26str%3E-for-Latin1String%3C\'_%3E"],[6159,"impl-PartialEq-for-Latin1String%3C\'a%3E"],[6173,"impl-Debug-for-Number"],[6174,"impl-Display-for-Number"],[6176,"impl-Display-for-Latin1String%3C\'_%3E"],[6177,"impl-Debug-for-Latin1String%3C\'a%3E"],[6180,"impl-Debug-for-Error"],[6181,"impl-Display-for-Error"],[6190,"impl-From%3CFixed%3E-for-Number"],[6192,"impl-From%3Ci32%3E-for-Number"],[6484,"impl-From%3COperator%3E-for-Token"],[6485,"impl-From%3CT%3E-for-Token"],[6548,"impl-UpperHex-for-HeaderFlags"],[6549,"impl-LowerHex-for-HeaderFlags"],[6550,"impl-Binary-for-HeaderFlags"],[6551,"impl-Octal-for-HeaderFlags"],[6552,"impl-Debug-for-HeaderFlags"],[6670,"impl-LowerHex-for-AxisValueTableFlags"],[6671,"impl-Debug-for-AxisValueTableFlags"],[6672,"impl-Octal-for-AxisValueTableFlags"],[6673,"impl-UpperHex-for-AxisValueTableFlags"],[6674,"impl-Binary-for-AxisValueTableFlags"],[6916,"impl-Debug-for-EntryFormat"],[6917,"impl-LowerHex-for-EntryFormat"],[6918,"impl-Octal-for-EntryFormat"],[6919,"impl-Binary-for-EntryFormat"],[6920,"impl-UpperHex-for-EntryFormat"]]}],\ ["roxmltree",{"doc":"Represent an XML 1.0 document as a read-only tree.","t":"FFPFPFPFFPPPPPGFPPPPPPPPPPPSSFFPPFFGPPPFPFPGPFPPPPPPPPPPONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNONNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNON","n":["Attribute","Attributes","AttributesLimitReached","AxisIter","Borrowed","Children","Comment","Descendants","Document","DtdDetected","DuplicatedAttribute","DuplicatedNamespace","Element","EntityReferenceLoop","Error","ExpandedName","InvalidAttributeValue","InvalidChar","InvalidChar2","InvalidCharacterData","InvalidComment","InvalidElementNamePrefix","InvalidExternalID","InvalidName","InvalidString","InvalidXmlPrefixUri","MalformedEntityReference","NS_XMLNS_URI","NS_XML_URI","Namespace","NamespaceIter","NamespacesLimitReached","NoRootNode","Node","NodeId","NodeType","NodesLimitReached","NonXmlChar","Owned","PI","PI","ParsingOptions","Root","StringStorage","Text","TextPos","UnclosedRootNode","UnexpectedCloseTag","UnexpectedDeclaration","UnexpectedEndOfStream","UnexpectedEntityCloseTag","UnexpectedXmlUri","UnexpectedXmlnsUri","UnknownEntityReference","UnknownNamespace","UnknownToken","allow_dtd","ancestors","as_str","attribute","attribute_node","attributes","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","children","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","col","default","default_namespace","deref","descendants","descendants","description","document","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","first_child","first_children","first_element_child","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_static","get","get_node","get_usize","has_attribute","has_children","has_siblings","has_tag_name","hash","hash","hash","hash","id","input_text","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_iter","is_comment","is_element","is_pi","is_root","is_text","last_child","last_children","last_element_child","lookup_namespace_uri","lookup_prefix","name","name","name","namespace","namespace","namespaces","new","new","new_owned","next","next","next","next","next","next_back","next_back","next_back","next_back","next_sibling","next_sibling_element","next_siblings","node_type","nodes_limit","nth","nth","nth","parent","parent_element","parse","parse_with_options","partial_cmp","pi","pos","position","prev_sibling","prev_sibling_element","prev_siblings","range","root","root_element","row","size_hint","size_hint","size_hint","tag_name","tail","tail_storage","target","text","text_pos_at","text_storage","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","uri","value","value","value_storage"],"q":[[0,"roxmltree"],[364,"core::option"],[365,"core::convert"],[366,"core::cmp"],[367,"core::fmt"],[368,"core::fmt"],[369,"core::fmt"],[370,"alloc::sync"],[371,"core::ops::range"],[372,"alloc::string"],[373,"core::any"]],"d":["An attribute.","Iterator over a node’s attributes","Indicates that too many attributes were parsed.","Iterator over specified axis.","A raw slice of the input string.","Iterator over children.","A comment node.","Iterator over a node and its descendants.","An XML tree container.","An XML with DTD detected.","An element has a duplicated attributes.","A namespace was already defined on this element.","An element node.","A possible entity reference loop.","A list of all possible errors.","An expanded name.","Attribute value cannot have a < character.","An invalid/unexpected character.","An invalid/unexpected character.","A Character Data node contains an invalid data.","A comment cannot contain -- or end with -.","xmlns can’t be used as an element prefix.","An invalid ExternalID in the DTD.","An invalid name.","An unexpected string.","The xmlns:xml attribute must have an …","A malformed entity reference.","The http://www.w3.org/2000/xmlns/ URI.","The http://www.w3.org/XML/1998/namespace URI.","A namespace.","Iterator over the namespaces attached to a node.","Indicates that too many namespaces were parsed.","The XML document must have at least one element.","A node in a document.","A node ID stored as u32.","A list of supported node types.","Indicates that the ParsingOptions::nodes_limit was reached.","A non-XML character has occurred.","A reference-counted string.","A processing instruction.","A processing instruction.","Parsing options.","The root node of the Document.","A string storage.","A text node.","Position in text.","The root node was opened but never closed.","Incorrect tree structure.","An XML document can have only one XML declaration and it …","The steam ended earlier than we expected.","Entity value starts with a close tag.","Only the xmlns:xml attribute can have the …","The http://www.w3.org/2000/xmlns/ URI must not be declared.","A reference to an entity that was not defined in the DTD.","An unknown namespace.","An unknown token.","Allow DTD parsing.","Returns an iterator over ancestor nodes starting at this …","Returns a string slice.","Returns element’s attribute value.","Returns element’s attribute object.","Returns element’s attributes.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns an iterator over children nodes.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns node’s default namespace URI.","","Returns an iterator over document’s descendant nodes.","Returns an iterator over this node and its descendants.","","Returns node’s document.","","","","","","","","","","","","Returns the first child of this node.","Returns an iterator over first children nodes starting at …","Returns the first element child of this node.","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Create a new instance from static data.","Returns the u32 representation of the NodeId.","Returns the node of the tree with the given NodeId.","Returns the usize representation of the NodeId.","Checks that element has a specified attribute.","Returns true if this node has children.","Returns true if this node has siblings.","Checks that node has a specified tag name.","","","","","Returns node’s NodeId","Returns the input text of the original document.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","Checks that node is a comment node.","Checks that node is an element node.","Checks that node is a processing instruction node.","Checks that node is a root node.","Checks that node is a text node.","Returns the last child of this node.","Returns an iterator over last children nodes starting at …","Returns the last element child of this node.","Returns an URI for a given prefix.","Returns a prefix for a given namespace URI.","Returns attribute’s name.","Returns namespace name/prefix.","Returns a local name.","Returns attribute’s namespace URI.","Returns a namespace URI.","Returns element’s namespaces.","Constructs a new TextPos.","Construct a new NodeId from a u32.","Creates a new owned string from &str or String.","","","","","","","","","","Returns the next sibling of this node.","Returns the next sibling element of this node.","Returns an iterator over next sibling nodes starting at …","Returns node’s type.","Sets the maximum number of nodes to parse.","","","","Returns the parent of this node.","Returns the parent element of this node.","Parses the input XML string.","Parses the input XML string using to selected options.","","Returns node as Processing Instruction.","Returns the error position.","Returns attribute’s position in bytes in the original …","Returns the previous sibling of this node.","Returns the previous sibling element of this node.","Returns an iterator over previous sibling nodes starting …","Returns node’s range in bytes in the original document.","Returns the root node.","Returns the root element of the document.","","","","","Returns node’s tag name.","Returns element’s tail text.","Returns element’s tail text storage.","","Returns node’s text.","Calculates TextPos in the original document from position …","Returns node’s text storage.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns namespace URI.","Returns attribute’s value.","","Returns attribute’s value storage."],"i":[0,0,11,0,3,0,14,0,0,11,11,11,14,11,0,0,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,11,11,0,0,0,11,11,3,0,14,0,14,0,14,0,11,11,11,11,11,11,11,11,11,11,12,1,3,1,1,1,22,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,22,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,1,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,1,13,12,1,3,22,1,11,1,11,12,13,14,15,16,3,8,17,6,1,1,1,1,22,11,11,12,13,13,14,15,16,3,3,8,17,6,1,9,2,10,18,19,22,11,12,13,14,15,16,16,16,3,8,17,6,6,6,1,9,2,10,18,19,6,16,22,16,1,1,1,1,11,13,16,1,1,22,22,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,9,2,10,18,19,1,1,1,1,1,1,1,1,1,1,8,17,6,8,6,1,13,16,3,9,2,10,18,19,9,10,18,19,1,1,1,1,12,9,18,19,1,1,22,22,1,1,11,8,1,1,1,1,22,22,13,9,18,19,1,1,1,15,1,22,1,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,11,13,3,22,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,22,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,22,11,12,13,14,15,16,3,8,17,6,1,9,2,10,18,19,17,8,15,8],"f":"`````````````````````````````````````````````````````````{bd}{fh}{{bc}{{j{h}}}{{n{l}}}}{{bc}{{j{A`}}}{{n{l}}}}{bAb}{ce{}{}}000000000000000000000000000000000{bAd}{AfAf}{AhAh}{AjAj}{AlAl}{AnAn}{B`B`}{ff}{A`A`}{BbBb}{ll}{bb}{AbAb}{dd}{AdAd}{BdBd}{BfBf}{{ce}Bh{}{}}000000000000000{{bb}Bj}`{{}Ah}{b{{j{h}}}}{fc{}}{BlBd}{bBd}{Afh}{bBl}{{AfAf}Bn}{{AhAh}Bn}{{AjAj}Bn}{{AlAl}Bn}{{AnAn}Bn}{{B`B`}Bn}{{ff}Bn}{{A`A`}Bn}{{BbBb}Bn}{{ll}Bn}{{bb}Bn}{b{{j{b}}}}{bd}1{{BlC`}{{Cd{BhCb}}}}{{AfC`}Cf}0{{AhC`}Cf}{{AjC`}Cf}0{{AlC`}Cf}{{AnC`}Cf}{{B`C`}Cf}{{fC`}Cf}0{{A`C`}{{Cd{BhCb}}}}{{BbC`}Cf}{{lC`}{{Cd{BhCb}}}}{{bC`}{{Cd{BhCb}}}}{{AbC`}{{Cd{BhCb}}}}{{dC`}{{Cd{BhCb}}}}{{AdC`}Cf}{{BdC`}{{Cd{BhCb}}}}{{BfC`}{{Cd{BhCb}}}}{cc{}}00000{ChB`}1{CjB`}222{hl}{{{Cl{hh}}}l}4444444{{hh}l}{B`Cj}{{BlB`}{{j{b}}}}{B`Ch}{{bc}Bn{{n{l}}}}{bBn}01{{Afc}BhCn}{{Ajc}BhCn}{{B`c}BhCn}{{bc}BhCn}{bB`}{Blh}{ce{}{}}00000000000000000000077777{b{{j{b}}}}{bd}1{{b{j{h}}}{{j{h}}}}{{bh}{{j{h}}}}{A`h}{Bb{{j{h}}}}{lh}{A`{{j{h}}}}{l{{j{h}}}}{bBf}{{CjCj}Aj}{CjB`}{cf{{n{{D`{h}}}}}}{Ab{{j{c}}}{}}{d{{j{c}}}{}}{Ad{{j{c}}}{}}{Bd{{j{c}}}{}}{Bf{{j{c}}}{}}4210{b{{j{b}}}}0{bd}{bAl}`{{AbCh}{{j{c}}}{}}{{BdCh}{{j{c}}}{}}{{BfCh}{{j{c}}}{}}55{h{{Cd{BlAf}}}}{{hAh}{{Cd{BlAf}}}}{{bb}{{j{Bj}}}}{b{{j{An}}}}{AfAj}{A`Ch};;:{b{{Db{Ch}}}}{Blb}0`{Ab{{Cl{Ch{j{Ch}}}}}}{Bd{{Cl{Ch{j{Ch}}}}}}{Bf{{Cl{Ch{j{Ch}}}}}}{bl}{b{{j{h}}}}{b{{j{f}}}}`1{{BlCh}Aj}1{ce{}{}}000000000000000{cDd{}}00{c{{Cd{e}}}{}{}}000000000000000000000000000000000{cDf{}}0000000000000000{Bbh}{A`h}`{A`f}","c":[],"p":[[5,"Node",0],[5,"AxisIter",0],[6,"StringStorage",0],[1,"str"],[6,"Option",364],[5,"ExpandedName",0],[10,"Into",365],[5,"Attribute",0],[5,"Attributes",0],[5,"Children",0],[6,"Error",0],[5,"ParsingOptions",0],[5,"TextPos",0],[6,"NodeType",0],[5,"PI",0],[5,"NodeId",0],[5,"Namespace",0],[5,"Descendants",0],[5,"NamespaceIter",0],[1,"unit"],[6,"Ordering",366],[5,"Document",0],[1,"bool"],[5,"Formatter",367],[5,"Error",367],[6,"Result",368],[8,"Result",367],[1,"usize"],[1,"u32"],[1,"tuple"],[10,"Hasher",369],[5,"Arc",370],[5,"Range",371],[5,"String",372],[5,"TypeId",373]],"b":[[153,"impl-Debug-for-Error"],[154,"impl-Display-for-Error"],[156,"impl-Debug-for-TextPos"],[157,"impl-Display-for-TextPos"],[161,"impl-Display-for-StringStorage%3C\'_%3E"],[162,"impl-Debug-for-StringStorage%3C\'input%3E"],[178,"impl-From%3Cusize%3E-for-NodeId"],[180,"impl-From%3Cu32%3E-for-NodeId"],[184,"impl-From%3C%26str%3E-for-ExpandedName%3C\'a,+\'b%3E"],[185,"impl-From%3C(%26str,+%26str)%3E-for-ExpandedName%3C\'a,+\'b%3E"]]}],\ ["rustc_hash",{"doc":"Fast, non-cryptographic hash used by rustc and Firefox.","t":"FNNNNNNNNNNNNNNN","n":["FxHasher","borrow","borrow_mut","default","finish","from","into","try_from","try_into","type_id","write","write_u16","write_u32","write_u64","write_u8","write_usize"],"q":[[0,"rustc_hash"],[16,"core::result"],[17,"core::any"]],"d":["A speedy hash algorithm for use within rustc. The hashmap …","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","",""],"i":[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"f":"`{ce{}{}}0{{}b}{bd}{cc{}}3{c{{f{e}}}{}{}}0{ch{}}{{b{l{j}}}n}{{bA`}n}{{bAb}n}{{bd}n}{{bj}n}{{bAd}n}","c":[],"p":[[5,"FxHasher",0],[1,"u64"],[6,"Result",16],[5,"TypeId",17],[1,"u8"],[1,"slice"],[1,"unit"],[1,"u16"],[1,"u32"],[1,"usize"]],"b":[]}],\ diff --git a/src-files.js b/src-files.js index 8d3316d989..b90a61e52a 100644 --- a/src-files.js +++ b/src-files.js @@ -3,6 +3,10 @@ var srcIndex = new Map(JSON.parse('[\ ["bytemuck",["",[],["allocation.rs","anybitpattern.rs","checked.rs","contiguous.rs","internal.rs","lib.rs","no_uninit.rs","offset_of.rs","pod.rs","pod_in_option.rs","transparent.rs","zeroable.rs","zeroable_in_option.rs"]]],\ ["bytemuck_derive",["",[],["lib.rs","traits.rs"]]],\ ["cosmic_text",["",[["edit",[],["editor.rs","mod.rs"]],["font",[["fallback",[],["mod.rs","unix.rs"]]],["mod.rs","system.rs"]]],["attrs.rs","bidi_para.rs","buffer.rs","buffer_line.rs","cursor.rs","glyph_cache.rs","layout.rs","lib.rs","line_ending.rs","math.rs","shape.rs","shape_plan_cache.rs","shape_run_cache.rs","swash.rs"]]],\ +["crossbeam_deque",["",[],["deque.rs","lib.rs"]]],\ +["crossbeam_epoch",["",[["sync",[],["list.rs","mod.rs","once_lock.rs","queue.rs"]]],["atomic.rs","collector.rs","default.rs","deferred.rs","epoch.rs","guard.rs","internal.rs","lib.rs"]]],\ +["crossbeam_utils",["",[["atomic",[],["atomic_cell.rs","consume.rs","mod.rs","seq_lock.rs"]],["sync",[],["mod.rs","once_lock.rs","parker.rs","sharded_lock.rs","wait_group.rs"]]],["backoff.rs","cache_padded.rs","lib.rs","thread.rs"]]],\ +["either",["",[],["into_either.rs","iterator.rs","lib.rs"]]],\ ["font_types",["",[],["bbox.rs","fixed.rs","fword.rs","glyph_id.rs","lib.rs","longdatetime.rs","name_id.rs","offset.rs","pen.rs","point.rs","raw.rs","tag.rs","uint24.rs","version.rs"]]],\ ["fontconfig_parser",["",[["types",[["match_",[],["edit.rs","test.rs"]]],["alias.rs","config.rs","constant.rs","dir.rs","document.rs","match_.rs","property.rs","selectfont.rs","value.rs"]]],["error.rs","lib.rs","parser.rs","types.rs","util.rs"]]],\ ["fontdb",["",[],["lib.rs"]]],\ @@ -13,6 +17,8 @@ var srcIndex = new Map(JSON.parse('[\ ["proc_macro2",["",[],["detection.rs","extra.rs","fallback.rs","lib.rs","marker.rs","parse.rs","rcvec.rs","wrapper.rs"]]],\ ["quote",["",[],["ext.rs","format.rs","ident_fragment.rs","lib.rs","runtime.rs","spanned.rs","to_tokens.rs"]]],\ ["rangemap",["",[],["inclusive_map.rs","inclusive_set.rs","lib.rs","map.rs","operations.rs","range_wrapper.rs","set.rs","std_ext.rs"]]],\ +["rayon",["",[["collections",[],["binary_heap.rs","btree_map.rs","btree_set.rs","hash_map.rs","hash_set.rs","linked_list.rs","mod.rs","vec_deque.rs"]],["compile_fail",[],["cannot_collect_filtermap_data.rs","cannot_zip_filtered_data.rs","cell_par_iter.rs","mod.rs","must_use.rs","no_send_par_iter.rs","rc_par_iter.rs"]],["iter",[["collect",[],["consumer.rs","mod.rs"]],["find_first_last",[],["mod.rs"]],["plumbing",[],["mod.rs"]]],["blocks.rs","chain.rs","chunks.rs","cloned.rs","copied.rs","empty.rs","enumerate.rs","extend.rs","filter.rs","filter_map.rs","find.rs","flat_map.rs","flat_map_iter.rs","flatten.rs","flatten_iter.rs","fold.rs","fold_chunks.rs","fold_chunks_with.rs","for_each.rs","from_par_iter.rs","inspect.rs","interleave.rs","interleave_shortest.rs","intersperse.rs","len.rs","map.rs","map_with.rs","mod.rs","multizip.rs","noop.rs","once.rs","panic_fuse.rs","par_bridge.rs","positions.rs","product.rs","reduce.rs","repeat.rs","rev.rs","skip.rs","skip_any.rs","skip_any_while.rs","splitter.rs","step_by.rs","sum.rs","take.rs","take_any.rs","take_any_while.rs","try_fold.rs","try_reduce.rs","try_reduce_with.rs","unzip.rs","update.rs","walk_tree.rs","while_some.rs","zip.rs","zip_eq.rs"]],["slice",[],["chunk_by.rs","chunks.rs","mergesort.rs","mod.rs","quicksort.rs","rchunks.rs"]]],["array.rs","delegate.rs","lib.rs","math.rs","option.rs","par_either.rs","prelude.rs","private.rs","range.rs","range_inclusive.rs","result.rs","split_producer.rs","str.rs","string.rs","vec.rs"]]],\ +["rayon_core",["",[["broadcast",[],["mod.rs"]],["compile_fail",[],["mod.rs","quicksort_race1.rs","quicksort_race2.rs","quicksort_race3.rs","rc_return.rs","rc_upvar.rs","scope_join_bad.rs"]],["join",[],["mod.rs"]],["scope",[],["mod.rs"]],["sleep",[],["counters.rs","mod.rs"]],["spawn",[],["mod.rs"]],["thread_pool",[],["mod.rs"]]],["job.rs","latch.rs","lib.rs","private.rs","registry.rs","unwind.rs"]]],\ ["read_fonts",["",[["generated",[],["font.rs","generated_avar.rs","generated_base.rs","generated_bitmap.rs","generated_cbdt.rs","generated_cblc.rs","generated_cff.rs","generated_cff2.rs","generated_cmap.rs","generated_colr.rs","generated_cpal.rs","generated_cvar.rs","generated_ebdt.rs","generated_eblc.rs","generated_fvar.rs","generated_gasp.rs","generated_gdef.rs","generated_glyf.rs","generated_gpos.rs","generated_gsub.rs","generated_gvar.rs","generated_head.rs","generated_hhea.rs","generated_hmtx.rs","generated_hvar.rs","generated_layout.rs","generated_maxp.rs","generated_mvar.rs","generated_name.rs","generated_os2.rs","generated_post.rs","generated_postscript.rs","generated_sbix.rs","generated_stat.rs","generated_variations.rs","generated_vhea.rs","generated_vmtx.rs","generated_vvar.rs"]],["tables",[["glyf",[["bytecode",[],["decode.rs","instruction.rs","opcode.rs"]]],["bytecode.rs"]],["postscript",[],["blend.rs","charstring.rs","dict.rs","fd_select.rs","index.rs","stack.rs","string.rs"]]],["avar.rs","base.rs","bitmap.rs","cbdt.rs","cblc.rs","cff.rs","cff2.rs","cmap.rs","colr.rs","cpal.rs","cvar.rs","ebdt.rs","eblc.rs","fvar.rs","gasp.rs","gdef.rs","glyf.rs","gpos.rs","gsub.rs","gvar.rs","head.rs","hhea.rs","hmtx.rs","hvar.rs","instance_record.rs","layout.rs","loca.rs","lookupflag.rs","maxp.rs","mvar.rs","name.rs","os2.rs","post.rs","postscript.rs","sbix.rs","stat.rs","value_record.rs","variations.rs","vhea.rs","vmtx.rs","vvar.rs"]]],["array.rs","font_data.rs","lib.rs","offset.rs","offset_array.rs","read.rs","table_provider.rs","table_ref.rs","tables.rs"]]],\ ["roxmltree",["",[],["lib.rs","parse.rs","tokenizer.rs"]]],\ ["rustc_hash",["",[],["lib.rs"]]],\ diff --git a/src/cosmic_text/font/mod.rs.html b/src/cosmic_text/font/mod.rs.html index 9db7d6c919..ca4c8c9d40 100644 --- a/src/cosmic_text/font/mod.rs.html +++ b/src/cosmic_text/font/mod.rs.html @@ -160,6 +160,26 @@

Files

158 159 160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180
// SPDX-License-Identifier: MIT OR Apache-2.0
 pub(crate) mod fallback;
 
@@ -320,4 +340,24 @@ 

Files

}) } } + +#[cfg(test)] +mod test { + #[test] + fn test_fonts_load_time() { + use crate::FontSystem; + use sys_locale::get_locale; + + #[cfg(not(target_arch = "wasm32"))] + let now = std::time::Instant::now(); + + let mut db = fontdb::Database::new(); + let locale = get_locale().unwrap(); + db.load_system_fonts(); + FontSystem::new_with_locale_and_db(locale, db); + + #[cfg(not(target_arch = "wasm32"))] + println!("Fonts load time {}ms.", now.elapsed().as_millis()) + } +}
\ No newline at end of file diff --git a/src/cosmic_text/font/system.rs.html b/src/cosmic_text/font/system.rs.html index 08adbd6ef0..9348041c0f 100644 --- a/src/cosmic_text/font/system.rs.html +++ b/src/cosmic_text/font/system.rs.html @@ -371,6 +371,47 @@

Files

369 370 371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412
use crate::{Attrs, Font, FontMatchAttrs, HashMap, ShapePlanCache};
 use alloc::string::String;
 use alloc::sync::Arc;
@@ -545,7 +586,7 @@ 

Files

#[cfg(feature = "shape-run-cache")] shape_run_cache: crate::ShapeRunCache::default(), }; - + ret.cache_fonts(cloned_monospace_font_ids.clone()); cloned_monospace_font_ids.into_iter().for_each(|id| { if let Some(font) = ret.get_font(id) { font.scripts().iter().copied().for_each(|script| { @@ -585,6 +626,47 @@

Files

(self.locale, self.db) } + /// Concurrently cache fonts by id list + pub fn cache_fonts(&mut self, mut ids: Vec<fontdb::ID>) { + #[cfg(feature = "std")] + use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; + ids = ids + .into_iter() + .filter(|id| { + let contains = self.font_cache.contains_key(id); + if !contains { + unsafe { + self.db.make_shared_face_data(*id); + } + } + !contains + }) + .collect::<_>(); + + #[cfg(feature = "std")] + let fonts = ids.par_iter(); + #[cfg(not(feature = "std"))] + let fonts = ids.iter(); + + fonts + .map(|id| match Font::new(&self.db, *id) { + Some(font) => Some(Arc::new(font)), + None => { + log::warn!( + "failed to load font '{}'", + self.db.face(*id)?.post_script_name + ); + None + } + }) + .collect::<Vec<Option<Arc<Font>>>>() + .into_iter() + .flatten() + .for_each(|font| { + self.font_cache.insert(font.id, Some(font)); + }); + } + /// Get a font by its ID. pub fn get_font(&mut self, id: fontdb::ID) -> Option<Arc<Font>> { self.font_cache diff --git a/src/crossbeam_deque/deque.rs.html b/src/crossbeam_deque/deque.rs.html new file mode 100644 index 0000000000..a74b23a58b --- /dev/null +++ b/src/crossbeam_deque/deque.rs.html @@ -0,0 +1,4405 @@ +deque.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+
use std::cell::{Cell, UnsafeCell};
+use std::cmp;
+use std::fmt;
+use std::marker::PhantomData;
+use std::mem::{self, MaybeUninit};
+use std::ptr;
+use std::slice;
+use std::sync::atomic::{self, AtomicIsize, AtomicPtr, AtomicUsize, Ordering};
+use std::sync::Arc;
+
+use crossbeam_epoch::{self as epoch, Atomic, Owned};
+use crossbeam_utils::{Backoff, CachePadded};
+
+// Minimum buffer capacity.
+const MIN_CAP: usize = 64;
+// Maximum number of tasks that can be stolen in `steal_batch()` and `steal_batch_and_pop()`.
+const MAX_BATCH: usize = 32;
+// If a buffer of at least this size is retired, thread-local garbage is flushed so that it gets
+// deallocated as soon as possible.
+const FLUSH_THRESHOLD_BYTES: usize = 1 << 10;
+
+/// A buffer that holds tasks in a worker queue.
+///
+/// This is just a pointer to the buffer and its length - dropping an instance of this struct will
+/// *not* deallocate the buffer.
+struct Buffer<T> {
+    /// Pointer to the allocated memory.
+    ptr: *mut T,
+
+    /// Capacity of the buffer. Always a power of two.
+    cap: usize,
+}
+
+unsafe impl<T> Send for Buffer<T> {}
+
+impl<T> Buffer<T> {
+    /// Allocates a new buffer with the specified capacity.
+    fn alloc(cap: usize) -> Buffer<T> {
+        debug_assert_eq!(cap, cap.next_power_of_two());
+
+        let ptr = Box::into_raw(
+            (0..cap)
+                .map(|_| MaybeUninit::<T>::uninit())
+                .collect::<Box<[_]>>(),
+        )
+        .cast::<T>();
+
+        Buffer { ptr, cap }
+    }
+
+    /// Deallocates the buffer.
+    unsafe fn dealloc(self) {
+        drop(Box::from_raw(slice::from_raw_parts_mut(
+            self.ptr.cast::<MaybeUninit<T>>(),
+            self.cap,
+        )));
+    }
+
+    /// Returns a pointer to the task at the specified `index`.
+    unsafe fn at(&self, index: isize) -> *mut T {
+        // `self.cap` is always a power of two.
+        // We do all the loads at `MaybeUninit` because we might realize, after loading, that we
+        // don't actually have the right to access this memory.
+        self.ptr.offset(index & (self.cap - 1) as isize)
+    }
+
+    /// Writes `task` into the specified `index`.
+    ///
+    /// This method might be concurrently called with another `read` at the same index, which is
+    /// technically speaking a data race and therefore UB. We should use an atomic store here, but
+    /// that would be more expensive and difficult to implement generically for all types `T`.
+    /// Hence, as a hack, we use a volatile write instead.
+    unsafe fn write(&self, index: isize, task: MaybeUninit<T>) {
+        ptr::write_volatile(self.at(index).cast::<MaybeUninit<T>>(), task)
+    }
+
+    /// Reads a task from the specified `index`.
+    ///
+    /// This method might be concurrently called with another `write` at the same index, which is
+    /// technically speaking a data race and therefore UB. We should use an atomic load here, but
+    /// that would be more expensive and difficult to implement generically for all types `T`.
+    /// Hence, as a hack, we use a volatile load instead.
+    unsafe fn read(&self, index: isize) -> MaybeUninit<T> {
+        ptr::read_volatile(self.at(index).cast::<MaybeUninit<T>>())
+    }
+}
+
+impl<T> Clone for Buffer<T> {
+    fn clone(&self) -> Buffer<T> {
+        *self
+    }
+}
+
+impl<T> Copy for Buffer<T> {}
+
+/// Internal queue data shared between the worker and stealers.
+///
+/// The implementation is based on the following work:
+///
+/// 1. [Chase and Lev. Dynamic circular work-stealing deque. SPAA 2005.][chase-lev]
+/// 2. [Le, Pop, Cohen, and Nardelli. Correct and efficient work-stealing for weak memory models.
+///    PPoPP 2013.][weak-mem]
+/// 3. [Norris and Demsky. CDSchecker: checking concurrent data structures written with C/C++
+///    atomics. OOPSLA 2013.][checker]
+///
+/// [chase-lev]: https://dl.acm.org/citation.cfm?id=1073974
+/// [weak-mem]: https://dl.acm.org/citation.cfm?id=2442524
+/// [checker]: https://dl.acm.org/citation.cfm?id=2509514
+struct Inner<T> {
+    /// The front index.
+    front: AtomicIsize,
+
+    /// The back index.
+    back: AtomicIsize,
+
+    /// The underlying buffer.
+    buffer: CachePadded<Atomic<Buffer<T>>>,
+}
+
+impl<T> Drop for Inner<T> {
+    fn drop(&mut self) {
+        // Load the back index, front index, and buffer.
+        let b = *self.back.get_mut();
+        let f = *self.front.get_mut();
+
+        unsafe {
+            let buffer = self.buffer.load(Ordering::Relaxed, epoch::unprotected());
+
+            // Go through the buffer from front to back and drop all tasks in the queue.
+            let mut i = f;
+            while i != b {
+                buffer.deref().at(i).drop_in_place();
+                i = i.wrapping_add(1);
+            }
+
+            // Free the memory allocated by the buffer.
+            buffer.into_owned().into_box().dealloc();
+        }
+    }
+}
+
+/// Worker queue flavor: FIFO or LIFO.
+#[derive(Clone, Copy, Debug, Eq, PartialEq)]
+enum Flavor {
+    /// The first-in first-out flavor.
+    Fifo,
+
+    /// The last-in first-out flavor.
+    Lifo,
+}
+
+/// A worker queue.
+///
+/// This is a FIFO or LIFO queue that is owned by a single thread, but other threads may steal
+/// tasks from it. Task schedulers typically create a single worker queue per thread.
+///
+/// # Examples
+///
+/// A FIFO worker:
+///
+/// ```
+/// use crossbeam_deque::{Steal, Worker};
+///
+/// let w = Worker::new_fifo();
+/// let s = w.stealer();
+///
+/// w.push(1);
+/// w.push(2);
+/// w.push(3);
+///
+/// assert_eq!(s.steal(), Steal::Success(1));
+/// assert_eq!(w.pop(), Some(2));
+/// assert_eq!(w.pop(), Some(3));
+/// ```
+///
+/// A LIFO worker:
+///
+/// ```
+/// use crossbeam_deque::{Steal, Worker};
+///
+/// let w = Worker::new_lifo();
+/// let s = w.stealer();
+///
+/// w.push(1);
+/// w.push(2);
+/// w.push(3);
+///
+/// assert_eq!(s.steal(), Steal::Success(1));
+/// assert_eq!(w.pop(), Some(3));
+/// assert_eq!(w.pop(), Some(2));
+/// ```
+pub struct Worker<T> {
+    /// A reference to the inner representation of the queue.
+    inner: Arc<CachePadded<Inner<T>>>,
+
+    /// A copy of `inner.buffer` for quick access.
+    buffer: Cell<Buffer<T>>,
+
+    /// The flavor of the queue.
+    flavor: Flavor,
+
+    /// Indicates that the worker cannot be shared among threads.
+    _marker: PhantomData<*mut ()>, // !Send + !Sync
+}
+
+unsafe impl<T: Send> Send for Worker<T> {}
+
+impl<T> Worker<T> {
+    /// Creates a FIFO worker queue.
+    ///
+    /// Tasks are pushed and popped from opposite ends.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::<i32>::new_fifo();
+    /// ```
+    pub fn new_fifo() -> Worker<T> {
+        let buffer = Buffer::alloc(MIN_CAP);
+
+        let inner = Arc::new(CachePadded::new(Inner {
+            front: AtomicIsize::new(0),
+            back: AtomicIsize::new(0),
+            buffer: CachePadded::new(Atomic::new(buffer)),
+        }));
+
+        Worker {
+            inner,
+            buffer: Cell::new(buffer),
+            flavor: Flavor::Fifo,
+            _marker: PhantomData,
+        }
+    }
+
+    /// Creates a LIFO worker queue.
+    ///
+    /// Tasks are pushed and popped from the same end.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::<i32>::new_lifo();
+    /// ```
+    pub fn new_lifo() -> Worker<T> {
+        let buffer = Buffer::alloc(MIN_CAP);
+
+        let inner = Arc::new(CachePadded::new(Inner {
+            front: AtomicIsize::new(0),
+            back: AtomicIsize::new(0),
+            buffer: CachePadded::new(Atomic::new(buffer)),
+        }));
+
+        Worker {
+            inner,
+            buffer: Cell::new(buffer),
+            flavor: Flavor::Lifo,
+            _marker: PhantomData,
+        }
+    }
+
+    /// Creates a stealer for this queue.
+    ///
+    /// The returned stealer can be shared among threads and cloned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::<i32>::new_lifo();
+    /// let s = w.stealer();
+    /// ```
+    pub fn stealer(&self) -> Stealer<T> {
+        Stealer {
+            inner: self.inner.clone(),
+            flavor: self.flavor,
+        }
+    }
+
+    /// Resizes the internal buffer to the new capacity of `new_cap`.
+    #[cold]
+    unsafe fn resize(&self, new_cap: usize) {
+        // Load the back index, front index, and buffer.
+        let b = self.inner.back.load(Ordering::Relaxed);
+        let f = self.inner.front.load(Ordering::Relaxed);
+        let buffer = self.buffer.get();
+
+        // Allocate a new buffer and copy data from the old buffer to the new one.
+        let new = Buffer::alloc(new_cap);
+        let mut i = f;
+        while i != b {
+            ptr::copy_nonoverlapping(buffer.at(i), new.at(i), 1);
+            i = i.wrapping_add(1);
+        }
+
+        let guard = &epoch::pin();
+
+        // Replace the old buffer with the new one.
+        self.buffer.replace(new);
+        let old =
+            self.inner
+                .buffer
+                .swap(Owned::new(new).into_shared(guard), Ordering::Release, guard);
+
+        // Destroy the old buffer later.
+        guard.defer_unchecked(move || old.into_owned().into_box().dealloc());
+
+        // If the buffer is very large, then flush the thread-local garbage in order to deallocate
+        // it as soon as possible.
+        if mem::size_of::<T>() * new_cap >= FLUSH_THRESHOLD_BYTES {
+            guard.flush();
+        }
+    }
+
+    /// Reserves enough capacity so that `reserve_cap` tasks can be pushed without growing the
+    /// buffer.
+    fn reserve(&self, reserve_cap: usize) {
+        if reserve_cap > 0 {
+            // Compute the current length.
+            let b = self.inner.back.load(Ordering::Relaxed);
+            let f = self.inner.front.load(Ordering::SeqCst);
+            let len = b.wrapping_sub(f) as usize;
+
+            // The current capacity.
+            let cap = self.buffer.get().cap;
+
+            // Is there enough capacity to push `reserve_cap` tasks?
+            if cap - len < reserve_cap {
+                // Keep doubling the capacity as much as is needed.
+                let mut new_cap = cap * 2;
+                while new_cap - len < reserve_cap {
+                    new_cap *= 2;
+                }
+
+                // Resize the buffer.
+                unsafe {
+                    self.resize(new_cap);
+                }
+            }
+        }
+    }
+
+    /// Returns `true` if the queue is empty.
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::new_lifo();
+    ///
+    /// assert!(w.is_empty());
+    /// w.push(1);
+    /// assert!(!w.is_empty());
+    /// ```
+    pub fn is_empty(&self) -> bool {
+        let b = self.inner.back.load(Ordering::Relaxed);
+        let f = self.inner.front.load(Ordering::SeqCst);
+        b.wrapping_sub(f) <= 0
+    }
+
+    /// Returns the number of tasks in the deque.
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::new_lifo();
+    ///
+    /// assert_eq!(w.len(), 0);
+    /// w.push(1);
+    /// assert_eq!(w.len(), 1);
+    /// w.push(1);
+    /// assert_eq!(w.len(), 2);
+    /// ```
+    pub fn len(&self) -> usize {
+        let b = self.inner.back.load(Ordering::Relaxed);
+        let f = self.inner.front.load(Ordering::SeqCst);
+        b.wrapping_sub(f).max(0) as usize
+    }
+
+    /// Pushes a task into the queue.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::new_lifo();
+    /// w.push(1);
+    /// w.push(2);
+    /// ```
+    pub fn push(&self, task: T) {
+        // Load the back index, front index, and buffer.
+        let b = self.inner.back.load(Ordering::Relaxed);
+        let f = self.inner.front.load(Ordering::Acquire);
+        let mut buffer = self.buffer.get();
+
+        // Calculate the length of the queue.
+        let len = b.wrapping_sub(f);
+
+        // Is the queue full?
+        if len >= buffer.cap as isize {
+            // Yes. Grow the underlying buffer.
+            unsafe {
+                self.resize(2 * buffer.cap);
+            }
+            buffer = self.buffer.get();
+        }
+
+        // Write `task` into the slot.
+        unsafe {
+            buffer.write(b, MaybeUninit::new(task));
+        }
+
+        atomic::fence(Ordering::Release);
+
+        // Increment the back index.
+        //
+        // This ordering could be `Relaxed`, but then thread sanitizer would falsely report data
+        // races because it doesn't understand fences.
+        self.inner.back.store(b.wrapping_add(1), Ordering::Release);
+    }
+
+    /// Pops a task from the queue.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::new_fifo();
+    /// w.push(1);
+    /// w.push(2);
+    ///
+    /// assert_eq!(w.pop(), Some(1));
+    /// assert_eq!(w.pop(), Some(2));
+    /// assert_eq!(w.pop(), None);
+    /// ```
+    pub fn pop(&self) -> Option<T> {
+        // Load the back and front index.
+        let b = self.inner.back.load(Ordering::Relaxed);
+        let f = self.inner.front.load(Ordering::Relaxed);
+
+        // Calculate the length of the queue.
+        let len = b.wrapping_sub(f);
+
+        // Is the queue empty?
+        if len <= 0 {
+            return None;
+        }
+
+        match self.flavor {
+            // Pop from the front of the queue.
+            Flavor::Fifo => {
+                // Try incrementing the front index to pop the task.
+                let f = self.inner.front.fetch_add(1, Ordering::SeqCst);
+                let new_f = f.wrapping_add(1);
+
+                if b.wrapping_sub(new_f) < 0 {
+                    self.inner.front.store(f, Ordering::Relaxed);
+                    return None;
+                }
+
+                unsafe {
+                    // Read the popped task.
+                    let buffer = self.buffer.get();
+                    let task = buffer.read(f).assume_init();
+
+                    // Shrink the buffer if `len - 1` is less than one fourth of the capacity.
+                    if buffer.cap > MIN_CAP && len <= buffer.cap as isize / 4 {
+                        self.resize(buffer.cap / 2);
+                    }
+
+                    Some(task)
+                }
+            }
+
+            // Pop from the back of the queue.
+            Flavor::Lifo => {
+                // Decrement the back index.
+                let b = b.wrapping_sub(1);
+                self.inner.back.store(b, Ordering::Relaxed);
+
+                atomic::fence(Ordering::SeqCst);
+
+                // Load the front index.
+                let f = self.inner.front.load(Ordering::Relaxed);
+
+                // Compute the length after the back index was decremented.
+                let len = b.wrapping_sub(f);
+
+                if len < 0 {
+                    // The queue is empty. Restore the back index to the original task.
+                    self.inner.back.store(b.wrapping_add(1), Ordering::Relaxed);
+                    None
+                } else {
+                    // Read the task to be popped.
+                    let buffer = self.buffer.get();
+                    let mut task = unsafe { Some(buffer.read(b)) };
+
+                    // Are we popping the last task from the queue?
+                    if len == 0 {
+                        // Try incrementing the front index.
+                        if self
+                            .inner
+                            .front
+                            .compare_exchange(
+                                f,
+                                f.wrapping_add(1),
+                                Ordering::SeqCst,
+                                Ordering::Relaxed,
+                            )
+                            .is_err()
+                        {
+                            // Failed. We didn't pop anything. Reset to `None`.
+                            task.take();
+                        }
+
+                        // Restore the back index to the original task.
+                        self.inner.back.store(b.wrapping_add(1), Ordering::Relaxed);
+                    } else {
+                        // Shrink the buffer if `len` is less than one fourth of the capacity.
+                        if buffer.cap > MIN_CAP && len < buffer.cap as isize / 4 {
+                            unsafe {
+                                self.resize(buffer.cap / 2);
+                            }
+                        }
+                    }
+
+                    task.map(|t| unsafe { t.assume_init() })
+                }
+            }
+        }
+    }
+}
+
+impl<T> fmt::Debug for Worker<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Worker { .. }")
+    }
+}
+
+/// A stealer handle of a worker queue.
+///
+/// Stealers can be shared among threads.
+///
+/// Task schedulers typically have a single worker queue per worker thread.
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_deque::{Steal, Worker};
+///
+/// let w = Worker::new_lifo();
+/// w.push(1);
+/// w.push(2);
+///
+/// let s = w.stealer();
+/// assert_eq!(s.steal(), Steal::Success(1));
+/// assert_eq!(s.steal(), Steal::Success(2));
+/// assert_eq!(s.steal(), Steal::Empty);
+/// ```
+pub struct Stealer<T> {
+    /// A reference to the inner representation of the queue.
+    inner: Arc<CachePadded<Inner<T>>>,
+
+    /// The flavor of the queue.
+    flavor: Flavor,
+}
+
+unsafe impl<T: Send> Send for Stealer<T> {}
+unsafe impl<T: Send> Sync for Stealer<T> {}
+
+impl<T> Stealer<T> {
+    /// Returns `true` if the queue is empty.
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::new_lifo();
+    /// let s = w.stealer();
+    ///
+    /// assert!(s.is_empty());
+    /// w.push(1);
+    /// assert!(!s.is_empty());
+    /// ```
+    pub fn is_empty(&self) -> bool {
+        let f = self.inner.front.load(Ordering::Acquire);
+        atomic::fence(Ordering::SeqCst);
+        let b = self.inner.back.load(Ordering::Acquire);
+        b.wrapping_sub(f) <= 0
+    }
+
+    /// Returns the number of tasks in the deque.
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w = Worker::new_lifo();
+    /// let s = w.stealer();
+    ///
+    /// assert_eq!(s.len(), 0);
+    /// w.push(1);
+    /// assert_eq!(s.len(), 1);
+    /// w.push(2);
+    /// assert_eq!(s.len(), 2);
+    /// ```
+    pub fn len(&self) -> usize {
+        let f = self.inner.front.load(Ordering::Acquire);
+        atomic::fence(Ordering::SeqCst);
+        let b = self.inner.back.load(Ordering::Acquire);
+        b.wrapping_sub(f).max(0) as usize
+    }
+
+    /// Steals a task from the queue.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Steal, Worker};
+    ///
+    /// let w = Worker::new_lifo();
+    /// w.push(1);
+    /// w.push(2);
+    ///
+    /// let s = w.stealer();
+    /// assert_eq!(s.steal(), Steal::Success(1));
+    /// assert_eq!(s.steal(), Steal::Success(2));
+    /// ```
+    pub fn steal(&self) -> Steal<T> {
+        // Load the front index.
+        let f = self.inner.front.load(Ordering::Acquire);
+
+        // A SeqCst fence is needed here.
+        //
+        // If the current thread is already pinned (reentrantly), we must manually issue the
+        // fence. Otherwise, the following pinning will issue the fence anyway, so we don't
+        // have to.
+        if epoch::is_pinned() {
+            atomic::fence(Ordering::SeqCst);
+        }
+
+        let guard = &epoch::pin();
+
+        // Load the back index.
+        let b = self.inner.back.load(Ordering::Acquire);
+
+        // Is the queue empty?
+        if b.wrapping_sub(f) <= 0 {
+            return Steal::Empty;
+        }
+
+        // Load the buffer and read the task at the front.
+        let buffer = self.inner.buffer.load(Ordering::Acquire, guard);
+        let task = unsafe { buffer.deref().read(f) };
+
+        // Try incrementing the front index to steal the task.
+        // If the buffer has been swapped or the increment fails, we retry.
+        if self.inner.buffer.load(Ordering::Acquire, guard) != buffer
+            || self
+                .inner
+                .front
+                .compare_exchange(f, f.wrapping_add(1), Ordering::SeqCst, Ordering::Relaxed)
+                .is_err()
+        {
+            // We didn't steal this task, forget it.
+            return Steal::Retry;
+        }
+
+        // Return the stolen task.
+        Steal::Success(unsafe { task.assume_init() })
+    }
+
+    /// Steals a batch of tasks and pushes them into another worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than some constant limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w1 = Worker::new_fifo();
+    /// w1.push(1);
+    /// w1.push(2);
+    /// w1.push(3);
+    /// w1.push(4);
+    ///
+    /// let s = w1.stealer();
+    /// let w2 = Worker::new_fifo();
+    ///
+    /// let _ = s.steal_batch(&w2);
+    /// assert_eq!(w2.pop(), Some(1));
+    /// assert_eq!(w2.pop(), Some(2));
+    /// ```
+    pub fn steal_batch(&self, dest: &Worker<T>) -> Steal<()> {
+        self.steal_batch_with_limit(dest, MAX_BATCH)
+    }
+
+    /// Steals no more than `limit` of tasks and pushes them into another worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than the given limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Worker;
+    ///
+    /// let w1 = Worker::new_fifo();
+    /// w1.push(1);
+    /// w1.push(2);
+    /// w1.push(3);
+    /// w1.push(4);
+    /// w1.push(5);
+    /// w1.push(6);
+    ///
+    /// let s = w1.stealer();
+    /// let w2 = Worker::new_fifo();
+    ///
+    /// let _ = s.steal_batch_with_limit(&w2, 2);
+    /// assert_eq!(w2.pop(), Some(1));
+    /// assert_eq!(w2.pop(), Some(2));
+    /// assert_eq!(w2.pop(), None);
+    ///
+    /// w1.push(7);
+    /// w1.push(8);
+    /// // Setting a large limit does not guarantee that all elements will be popped. In this case,
+    /// // half of the elements are currently popped, but the number of popped elements is considered
+    /// // an implementation detail that may be changed in the future.
+    /// let _ = s.steal_batch_with_limit(&w2, std::usize::MAX);
+    /// assert_eq!(w2.len(), 3);
+    /// ```
+    pub fn steal_batch_with_limit(&self, dest: &Worker<T>, limit: usize) -> Steal<()> {
+        assert!(limit > 0);
+        if Arc::ptr_eq(&self.inner, &dest.inner) {
+            if dest.is_empty() {
+                return Steal::Empty;
+            } else {
+                return Steal::Success(());
+            }
+        }
+
+        // Load the front index.
+        let mut f = self.inner.front.load(Ordering::Acquire);
+
+        // A SeqCst fence is needed here.
+        //
+        // If the current thread is already pinned (reentrantly), we must manually issue the
+        // fence. Otherwise, the following pinning will issue the fence anyway, so we don't
+        // have to.
+        if epoch::is_pinned() {
+            atomic::fence(Ordering::SeqCst);
+        }
+
+        let guard = &epoch::pin();
+
+        // Load the back index.
+        let b = self.inner.back.load(Ordering::Acquire);
+
+        // Is the queue empty?
+        let len = b.wrapping_sub(f);
+        if len <= 0 {
+            return Steal::Empty;
+        }
+
+        // Reserve capacity for the stolen batch.
+        let batch_size = cmp::min((len as usize + 1) / 2, limit);
+        dest.reserve(batch_size);
+        let mut batch_size = batch_size as isize;
+
+        // Get the destination buffer and back index.
+        let dest_buffer = dest.buffer.get();
+        let mut dest_b = dest.inner.back.load(Ordering::Relaxed);
+
+        // Load the buffer.
+        let buffer = self.inner.buffer.load(Ordering::Acquire, guard);
+
+        match self.flavor {
+            // Steal a batch of tasks from the front at once.
+            Flavor::Fifo => {
+                // Copy the batch from the source to the destination buffer.
+                match dest.flavor {
+                    Flavor::Fifo => {
+                        for i in 0..batch_size {
+                            unsafe {
+                                let task = buffer.deref().read(f.wrapping_add(i));
+                                dest_buffer.write(dest_b.wrapping_add(i), task);
+                            }
+                        }
+                    }
+                    Flavor::Lifo => {
+                        for i in 0..batch_size {
+                            unsafe {
+                                let task = buffer.deref().read(f.wrapping_add(i));
+                                dest_buffer.write(dest_b.wrapping_add(batch_size - 1 - i), task);
+                            }
+                        }
+                    }
+                }
+
+                // Try incrementing the front index to steal the batch.
+                // If the buffer has been swapped or the increment fails, we retry.
+                if self.inner.buffer.load(Ordering::Acquire, guard) != buffer
+                    || self
+                        .inner
+                        .front
+                        .compare_exchange(
+                            f,
+                            f.wrapping_add(batch_size),
+                            Ordering::SeqCst,
+                            Ordering::Relaxed,
+                        )
+                        .is_err()
+                {
+                    return Steal::Retry;
+                }
+
+                dest_b = dest_b.wrapping_add(batch_size);
+            }
+
+            // Steal a batch of tasks from the front one by one.
+            Flavor::Lifo => {
+                // This loop may modify the batch_size, which triggers a clippy lint warning.
+                // Use a new variable to avoid the warning, and to make it clear we aren't
+                // modifying the loop exit condition during iteration.
+                let original_batch_size = batch_size;
+
+                for i in 0..original_batch_size {
+                    // If this is not the first steal, check whether the queue is empty.
+                    if i > 0 {
+                        // We've already got the current front index. Now execute the fence to
+                        // synchronize with other threads.
+                        atomic::fence(Ordering::SeqCst);
+
+                        // Load the back index.
+                        let b = self.inner.back.load(Ordering::Acquire);
+
+                        // Is the queue empty?
+                        if b.wrapping_sub(f) <= 0 {
+                            batch_size = i;
+                            break;
+                        }
+                    }
+
+                    // Read the task at the front.
+                    let task = unsafe { buffer.deref().read(f) };
+
+                    // Try incrementing the front index to steal the task.
+                    // If the buffer has been swapped or the increment fails, we retry.
+                    if self.inner.buffer.load(Ordering::Acquire, guard) != buffer
+                        || self
+                            .inner
+                            .front
+                            .compare_exchange(
+                                f,
+                                f.wrapping_add(1),
+                                Ordering::SeqCst,
+                                Ordering::Relaxed,
+                            )
+                            .is_err()
+                    {
+                        // We didn't steal this task, forget it and break from the loop.
+                        batch_size = i;
+                        break;
+                    }
+
+                    // Write the stolen task into the destination buffer.
+                    unsafe {
+                        dest_buffer.write(dest_b, task);
+                    }
+
+                    // Move the source front index and the destination back index one step forward.
+                    f = f.wrapping_add(1);
+                    dest_b = dest_b.wrapping_add(1);
+                }
+
+                // If we didn't steal anything, the operation needs to be retried.
+                if batch_size == 0 {
+                    return Steal::Retry;
+                }
+
+                // If stealing into a FIFO queue, stolen tasks need to be reversed.
+                if dest.flavor == Flavor::Fifo {
+                    for i in 0..batch_size / 2 {
+                        unsafe {
+                            let i1 = dest_b.wrapping_sub(batch_size - i);
+                            let i2 = dest_b.wrapping_sub(i + 1);
+                            let t1 = dest_buffer.read(i1);
+                            let t2 = dest_buffer.read(i2);
+                            dest_buffer.write(i1, t2);
+                            dest_buffer.write(i2, t1);
+                        }
+                    }
+                }
+            }
+        }
+
+        atomic::fence(Ordering::Release);
+
+        // Update the back index in the destination queue.
+        //
+        // This ordering could be `Relaxed`, but then thread sanitizer would falsely report data
+        // races because it doesn't understand fences.
+        dest.inner.back.store(dest_b, Ordering::Release);
+
+        // Return with success.
+        Steal::Success(())
+    }
+
+    /// Steals a batch of tasks, pushes them into another worker, and pops a task from that worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than some constant limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Steal, Worker};
+    ///
+    /// let w1 = Worker::new_fifo();
+    /// w1.push(1);
+    /// w1.push(2);
+    /// w1.push(3);
+    /// w1.push(4);
+    ///
+    /// let s = w1.stealer();
+    /// let w2 = Worker::new_fifo();
+    ///
+    /// assert_eq!(s.steal_batch_and_pop(&w2), Steal::Success(1));
+    /// assert_eq!(w2.pop(), Some(2));
+    /// ```
+    pub fn steal_batch_and_pop(&self, dest: &Worker<T>) -> Steal<T> {
+        self.steal_batch_with_limit_and_pop(dest, MAX_BATCH)
+    }
+
+    /// Steals no more than `limit` of tasks, pushes them into another worker, and pops a task from
+    /// that worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than the given limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Steal, Worker};
+    ///
+    /// let w1 = Worker::new_fifo();
+    /// w1.push(1);
+    /// w1.push(2);
+    /// w1.push(3);
+    /// w1.push(4);
+    /// w1.push(5);
+    /// w1.push(6);
+    ///
+    /// let s = w1.stealer();
+    /// let w2 = Worker::new_fifo();
+    ///
+    /// assert_eq!(s.steal_batch_with_limit_and_pop(&w2, 2), Steal::Success(1));
+    /// assert_eq!(w2.pop(), Some(2));
+    /// assert_eq!(w2.pop(), None);
+    ///
+    /// w1.push(7);
+    /// w1.push(8);
+    /// // Setting a large limit does not guarantee that all elements will be popped. In this case,
+    /// // half of the elements are currently popped, but the number of popped elements is considered
+    /// // an implementation detail that may be changed in the future.
+    /// assert_eq!(s.steal_batch_with_limit_and_pop(&w2, std::usize::MAX), Steal::Success(3));
+    /// assert_eq!(w2.pop(), Some(4));
+    /// assert_eq!(w2.pop(), Some(5));
+    /// assert_eq!(w2.pop(), None);
+    /// ```
+    pub fn steal_batch_with_limit_and_pop(&self, dest: &Worker<T>, limit: usize) -> Steal<T> {
+        assert!(limit > 0);
+        if Arc::ptr_eq(&self.inner, &dest.inner) {
+            match dest.pop() {
+                None => return Steal::Empty,
+                Some(task) => return Steal::Success(task),
+            }
+        }
+
+        // Load the front index.
+        let mut f = self.inner.front.load(Ordering::Acquire);
+
+        // A SeqCst fence is needed here.
+        //
+        // If the current thread is already pinned (reentrantly), we must manually issue the
+        // fence. Otherwise, the following pinning will issue the fence anyway, so we don't
+        // have to.
+        if epoch::is_pinned() {
+            atomic::fence(Ordering::SeqCst);
+        }
+
+        let guard = &epoch::pin();
+
+        // Load the back index.
+        let b = self.inner.back.load(Ordering::Acquire);
+
+        // Is the queue empty?
+        let len = b.wrapping_sub(f);
+        if len <= 0 {
+            return Steal::Empty;
+        }
+
+        // Reserve capacity for the stolen batch.
+        let batch_size = cmp::min((len as usize - 1) / 2, limit - 1);
+        dest.reserve(batch_size);
+        let mut batch_size = batch_size as isize;
+
+        // Get the destination buffer and back index.
+        let dest_buffer = dest.buffer.get();
+        let mut dest_b = dest.inner.back.load(Ordering::Relaxed);
+
+        // Load the buffer
+        let buffer = self.inner.buffer.load(Ordering::Acquire, guard);
+
+        // Read the task at the front.
+        let mut task = unsafe { buffer.deref().read(f) };
+
+        match self.flavor {
+            // Steal a batch of tasks from the front at once.
+            Flavor::Fifo => {
+                // Copy the batch from the source to the destination buffer.
+                match dest.flavor {
+                    Flavor::Fifo => {
+                        for i in 0..batch_size {
+                            unsafe {
+                                let task = buffer.deref().read(f.wrapping_add(i + 1));
+                                dest_buffer.write(dest_b.wrapping_add(i), task);
+                            }
+                        }
+                    }
+                    Flavor::Lifo => {
+                        for i in 0..batch_size {
+                            unsafe {
+                                let task = buffer.deref().read(f.wrapping_add(i + 1));
+                                dest_buffer.write(dest_b.wrapping_add(batch_size - 1 - i), task);
+                            }
+                        }
+                    }
+                }
+
+                // Try incrementing the front index to steal the task.
+                // If the buffer has been swapped or the increment fails, we retry.
+                if self.inner.buffer.load(Ordering::Acquire, guard) != buffer
+                    || self
+                        .inner
+                        .front
+                        .compare_exchange(
+                            f,
+                            f.wrapping_add(batch_size + 1),
+                            Ordering::SeqCst,
+                            Ordering::Relaxed,
+                        )
+                        .is_err()
+                {
+                    // We didn't steal this task, forget it.
+                    return Steal::Retry;
+                }
+
+                dest_b = dest_b.wrapping_add(batch_size);
+            }
+
+            // Steal a batch of tasks from the front one by one.
+            Flavor::Lifo => {
+                // Try incrementing the front index to steal the task.
+                if self
+                    .inner
+                    .front
+                    .compare_exchange(f, f.wrapping_add(1), Ordering::SeqCst, Ordering::Relaxed)
+                    .is_err()
+                {
+                    // We didn't steal this task, forget it.
+                    return Steal::Retry;
+                }
+
+                // Move the front index one step forward.
+                f = f.wrapping_add(1);
+
+                // Repeat the same procedure for the batch steals.
+                //
+                // This loop may modify the batch_size, which triggers a clippy lint warning.
+                // Use a new variable to avoid the warning, and to make it clear we aren't
+                // modifying the loop exit condition during iteration.
+                let original_batch_size = batch_size;
+                for i in 0..original_batch_size {
+                    // We've already got the current front index. Now execute the fence to
+                    // synchronize with other threads.
+                    atomic::fence(Ordering::SeqCst);
+
+                    // Load the back index.
+                    let b = self.inner.back.load(Ordering::Acquire);
+
+                    // Is the queue empty?
+                    if b.wrapping_sub(f) <= 0 {
+                        batch_size = i;
+                        break;
+                    }
+
+                    // Read the task at the front.
+                    let tmp = unsafe { buffer.deref().read(f) };
+
+                    // Try incrementing the front index to steal the task.
+                    // If the buffer has been swapped or the increment fails, we retry.
+                    if self.inner.buffer.load(Ordering::Acquire, guard) != buffer
+                        || self
+                            .inner
+                            .front
+                            .compare_exchange(
+                                f,
+                                f.wrapping_add(1),
+                                Ordering::SeqCst,
+                                Ordering::Relaxed,
+                            )
+                            .is_err()
+                    {
+                        // We didn't steal this task, forget it and break from the loop.
+                        batch_size = i;
+                        break;
+                    }
+
+                    // Write the previously stolen task into the destination buffer.
+                    unsafe {
+                        dest_buffer.write(dest_b, mem::replace(&mut task, tmp));
+                    }
+
+                    // Move the source front index and the destination back index one step forward.
+                    f = f.wrapping_add(1);
+                    dest_b = dest_b.wrapping_add(1);
+                }
+
+                // If stealing into a FIFO queue, stolen tasks need to be reversed.
+                if dest.flavor == Flavor::Fifo {
+                    for i in 0..batch_size / 2 {
+                        unsafe {
+                            let i1 = dest_b.wrapping_sub(batch_size - i);
+                            let i2 = dest_b.wrapping_sub(i + 1);
+                            let t1 = dest_buffer.read(i1);
+                            let t2 = dest_buffer.read(i2);
+                            dest_buffer.write(i1, t2);
+                            dest_buffer.write(i2, t1);
+                        }
+                    }
+                }
+            }
+        }
+
+        atomic::fence(Ordering::Release);
+
+        // Update the back index in the destination queue.
+        //
+        // This ordering could be `Relaxed`, but then thread sanitizer would falsely report data
+        // races because it doesn't understand fences.
+        dest.inner.back.store(dest_b, Ordering::Release);
+
+        // Return with success.
+        Steal::Success(unsafe { task.assume_init() })
+    }
+}
+
+impl<T> Clone for Stealer<T> {
+    fn clone(&self) -> Stealer<T> {
+        Stealer {
+            inner: self.inner.clone(),
+            flavor: self.flavor,
+        }
+    }
+}
+
+impl<T> fmt::Debug for Stealer<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Stealer { .. }")
+    }
+}
+
+// Bits indicating the state of a slot:
+// * If a task has been written into the slot, `WRITE` is set.
+// * If a task has been read from the slot, `READ` is set.
+// * If the block is being destroyed, `DESTROY` is set.
+const WRITE: usize = 1;
+const READ: usize = 2;
+const DESTROY: usize = 4;
+
+// Each block covers one "lap" of indices.
+const LAP: usize = 64;
+// The maximum number of values a block can hold.
+const BLOCK_CAP: usize = LAP - 1;
+// How many lower bits are reserved for metadata.
+const SHIFT: usize = 1;
+// Indicates that the block is not the last one.
+const HAS_NEXT: usize = 1;
+
+/// A slot in a block.
+struct Slot<T> {
+    /// The task.
+    task: UnsafeCell<MaybeUninit<T>>,
+
+    /// The state of the slot.
+    state: AtomicUsize,
+}
+
+impl<T> Slot<T> {
+    const UNINIT: Self = Self {
+        task: UnsafeCell::new(MaybeUninit::uninit()),
+        state: AtomicUsize::new(0),
+    };
+
+    /// Waits until a task is written into the slot.
+    fn wait_write(&self) {
+        let backoff = Backoff::new();
+        while self.state.load(Ordering::Acquire) & WRITE == 0 {
+            backoff.snooze();
+        }
+    }
+}
+
+/// A block in a linked list.
+///
+/// Each block in the list can hold up to `BLOCK_CAP` values.
+struct Block<T> {
+    /// The next block in the linked list.
+    next: AtomicPtr<Block<T>>,
+
+    /// Slots for values.
+    slots: [Slot<T>; BLOCK_CAP],
+}
+
+impl<T> Block<T> {
+    /// Creates an empty block that starts at `start_index`.
+    fn new() -> Block<T> {
+        Self {
+            next: AtomicPtr::new(ptr::null_mut()),
+            slots: [Slot::UNINIT; BLOCK_CAP],
+        }
+    }
+
+    /// Waits until the next pointer is set.
+    fn wait_next(&self) -> *mut Block<T> {
+        let backoff = Backoff::new();
+        loop {
+            let next = self.next.load(Ordering::Acquire);
+            if !next.is_null() {
+                return next;
+            }
+            backoff.snooze();
+        }
+    }
+
+    /// Sets the `DESTROY` bit in slots starting from `start` and destroys the block.
+    unsafe fn destroy(this: *mut Block<T>, count: usize) {
+        // It is not necessary to set the `DESTROY` bit in the last slot because that slot has
+        // begun destruction of the block.
+        for i in (0..count).rev() {
+            let slot = (*this).slots.get_unchecked(i);
+
+            // Mark the `DESTROY` bit if a thread is still using the slot.
+            if slot.state.load(Ordering::Acquire) & READ == 0
+                && slot.state.fetch_or(DESTROY, Ordering::AcqRel) & READ == 0
+            {
+                // If a thread is still using the slot, it will continue destruction of the block.
+                return;
+            }
+        }
+
+        // No thread is using the block, now it is safe to destroy it.
+        drop(Box::from_raw(this));
+    }
+}
+
+/// A position in a queue.
+struct Position<T> {
+    /// The index in the queue.
+    index: AtomicUsize,
+
+    /// The block in the linked list.
+    block: AtomicPtr<Block<T>>,
+}
+
+/// An injector queue.
+///
+/// This is a FIFO queue that can be shared among multiple threads. Task schedulers typically have
+/// a single injector queue, which is the entry point for new tasks.
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_deque::{Injector, Steal};
+///
+/// let q = Injector::new();
+/// q.push(1);
+/// q.push(2);
+///
+/// assert_eq!(q.steal(), Steal::Success(1));
+/// assert_eq!(q.steal(), Steal::Success(2));
+/// assert_eq!(q.steal(), Steal::Empty);
+/// ```
+pub struct Injector<T> {
+    /// The head of the queue.
+    head: CachePadded<Position<T>>,
+
+    /// The tail of the queue.
+    tail: CachePadded<Position<T>>,
+
+    /// Indicates that dropping a `Injector<T>` may drop values of type `T`.
+    _marker: PhantomData<T>,
+}
+
+unsafe impl<T: Send> Send for Injector<T> {}
+unsafe impl<T: Send> Sync for Injector<T> {}
+
+impl<T> Default for Injector<T> {
+    fn default() -> Self {
+        let block = Box::into_raw(Box::new(Block::<T>::new()));
+        Self {
+            head: CachePadded::new(Position {
+                block: AtomicPtr::new(block),
+                index: AtomicUsize::new(0),
+            }),
+            tail: CachePadded::new(Position {
+                block: AtomicPtr::new(block),
+                index: AtomicUsize::new(0),
+            }),
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl<T> Injector<T> {
+    /// Creates a new injector queue.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Injector;
+    ///
+    /// let q = Injector::<i32>::new();
+    /// ```
+    pub fn new() -> Injector<T> {
+        Self::default()
+    }
+
+    /// Pushes a task into the queue.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Injector;
+    ///
+    /// let w = Injector::new();
+    /// w.push(1);
+    /// w.push(2);
+    /// ```
+    pub fn push(&self, task: T) {
+        let backoff = Backoff::new();
+        let mut tail = self.tail.index.load(Ordering::Acquire);
+        let mut block = self.tail.block.load(Ordering::Acquire);
+        let mut next_block = None;
+
+        loop {
+            // Calculate the offset of the index into the block.
+            let offset = (tail >> SHIFT) % LAP;
+
+            // If we reached the end of the block, wait until the next one is installed.
+            if offset == BLOCK_CAP {
+                backoff.snooze();
+                tail = self.tail.index.load(Ordering::Acquire);
+                block = self.tail.block.load(Ordering::Acquire);
+                continue;
+            }
+
+            // If we're going to have to install the next block, allocate it in advance in order to
+            // make the wait for other threads as short as possible.
+            if offset + 1 == BLOCK_CAP && next_block.is_none() {
+                next_block = Some(Box::new(Block::<T>::new()));
+            }
+
+            let new_tail = tail + (1 << SHIFT);
+
+            // Try advancing the tail forward.
+            match self.tail.index.compare_exchange_weak(
+                tail,
+                new_tail,
+                Ordering::SeqCst,
+                Ordering::Acquire,
+            ) {
+                Ok(_) => unsafe {
+                    // If we've reached the end of the block, install the next one.
+                    if offset + 1 == BLOCK_CAP {
+                        let next_block = Box::into_raw(next_block.unwrap());
+                        let next_index = new_tail.wrapping_add(1 << SHIFT);
+
+                        self.tail.block.store(next_block, Ordering::Release);
+                        self.tail.index.store(next_index, Ordering::Release);
+                        (*block).next.store(next_block, Ordering::Release);
+                    }
+
+                    // Write the task into the slot.
+                    let slot = (*block).slots.get_unchecked(offset);
+                    slot.task.get().write(MaybeUninit::new(task));
+                    slot.state.fetch_or(WRITE, Ordering::Release);
+
+                    return;
+                },
+                Err(t) => {
+                    tail = t;
+                    block = self.tail.block.load(Ordering::Acquire);
+                    backoff.spin();
+                }
+            }
+        }
+    }
+
+    /// Steals a task from the queue.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Injector, Steal};
+    ///
+    /// let q = Injector::new();
+    /// q.push(1);
+    /// q.push(2);
+    ///
+    /// assert_eq!(q.steal(), Steal::Success(1));
+    /// assert_eq!(q.steal(), Steal::Success(2));
+    /// assert_eq!(q.steal(), Steal::Empty);
+    /// ```
+    pub fn steal(&self) -> Steal<T> {
+        let mut head;
+        let mut block;
+        let mut offset;
+
+        let backoff = Backoff::new();
+        loop {
+            head = self.head.index.load(Ordering::Acquire);
+            block = self.head.block.load(Ordering::Acquire);
+
+            // Calculate the offset of the index into the block.
+            offset = (head >> SHIFT) % LAP;
+
+            // If we reached the end of the block, wait until the next one is installed.
+            if offset == BLOCK_CAP {
+                backoff.snooze();
+            } else {
+                break;
+            }
+        }
+
+        let mut new_head = head + (1 << SHIFT);
+
+        if new_head & HAS_NEXT == 0 {
+            atomic::fence(Ordering::SeqCst);
+            let tail = self.tail.index.load(Ordering::Relaxed);
+
+            // If the tail equals the head, that means the queue is empty.
+            if head >> SHIFT == tail >> SHIFT {
+                return Steal::Empty;
+            }
+
+            // If head and tail are not in the same block, set `HAS_NEXT` in head.
+            if (head >> SHIFT) / LAP != (tail >> SHIFT) / LAP {
+                new_head |= HAS_NEXT;
+            }
+        }
+
+        // Try moving the head index forward.
+        if self
+            .head
+            .index
+            .compare_exchange_weak(head, new_head, Ordering::SeqCst, Ordering::Acquire)
+            .is_err()
+        {
+            return Steal::Retry;
+        }
+
+        unsafe {
+            // If we've reached the end of the block, move to the next one.
+            if offset + 1 == BLOCK_CAP {
+                let next = (*block).wait_next();
+                let mut next_index = (new_head & !HAS_NEXT).wrapping_add(1 << SHIFT);
+                if !(*next).next.load(Ordering::Relaxed).is_null() {
+                    next_index |= HAS_NEXT;
+                }
+
+                self.head.block.store(next, Ordering::Release);
+                self.head.index.store(next_index, Ordering::Release);
+            }
+
+            // Read the task.
+            let slot = (*block).slots.get_unchecked(offset);
+            slot.wait_write();
+            let task = slot.task.get().read().assume_init();
+
+            // Destroy the block if we've reached the end, or if another thread wanted to destroy
+            // but couldn't because we were busy reading from the slot.
+            if (offset + 1 == BLOCK_CAP)
+                || (slot.state.fetch_or(READ, Ordering::AcqRel) & DESTROY != 0)
+            {
+                Block::destroy(block, offset);
+            }
+
+            Steal::Success(task)
+        }
+    }
+
+    /// Steals a batch of tasks and pushes them into a worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than some constant limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Injector, Worker};
+    ///
+    /// let q = Injector::new();
+    /// q.push(1);
+    /// q.push(2);
+    /// q.push(3);
+    /// q.push(4);
+    ///
+    /// let w = Worker::new_fifo();
+    /// let _ = q.steal_batch(&w);
+    /// assert_eq!(w.pop(), Some(1));
+    /// assert_eq!(w.pop(), Some(2));
+    /// ```
+    pub fn steal_batch(&self, dest: &Worker<T>) -> Steal<()> {
+        self.steal_batch_with_limit(dest, MAX_BATCH)
+    }
+
+    /// Steals no more than of tasks and pushes them into a worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than some constant limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Injector, Worker};
+    ///
+    /// let q = Injector::new();
+    /// q.push(1);
+    /// q.push(2);
+    /// q.push(3);
+    /// q.push(4);
+    /// q.push(5);
+    /// q.push(6);
+    ///
+    /// let w = Worker::new_fifo();
+    /// let _ = q.steal_batch_with_limit(&w, 2);
+    /// assert_eq!(w.pop(), Some(1));
+    /// assert_eq!(w.pop(), Some(2));
+    /// assert_eq!(w.pop(), None);
+    ///
+    /// q.push(7);
+    /// q.push(8);
+    /// // Setting a large limit does not guarantee that all elements will be popped. In this case,
+    /// // half of the elements are currently popped, but the number of popped elements is considered
+    /// // an implementation detail that may be changed in the future.
+    /// let _ = q.steal_batch_with_limit(&w, std::usize::MAX);
+    /// assert_eq!(w.len(), 3);
+    /// ```
+    pub fn steal_batch_with_limit(&self, dest: &Worker<T>, limit: usize) -> Steal<()> {
+        assert!(limit > 0);
+        let mut head;
+        let mut block;
+        let mut offset;
+
+        let backoff = Backoff::new();
+        loop {
+            head = self.head.index.load(Ordering::Acquire);
+            block = self.head.block.load(Ordering::Acquire);
+
+            // Calculate the offset of the index into the block.
+            offset = (head >> SHIFT) % LAP;
+
+            // If we reached the end of the block, wait until the next one is installed.
+            if offset == BLOCK_CAP {
+                backoff.snooze();
+            } else {
+                break;
+            }
+        }
+
+        let mut new_head = head;
+        let advance;
+
+        if new_head & HAS_NEXT == 0 {
+            atomic::fence(Ordering::SeqCst);
+            let tail = self.tail.index.load(Ordering::Relaxed);
+
+            // If the tail equals the head, that means the queue is empty.
+            if head >> SHIFT == tail >> SHIFT {
+                return Steal::Empty;
+            }
+
+            // If head and tail are not in the same block, set `HAS_NEXT` in head. Also, calculate
+            // the right batch size to steal.
+            if (head >> SHIFT) / LAP != (tail >> SHIFT) / LAP {
+                new_head |= HAS_NEXT;
+                // We can steal all tasks till the end of the block.
+                advance = (BLOCK_CAP - offset).min(limit);
+            } else {
+                let len = (tail - head) >> SHIFT;
+                // Steal half of the available tasks.
+                advance = ((len + 1) / 2).min(limit);
+            }
+        } else {
+            // We can steal all tasks till the end of the block.
+            advance = (BLOCK_CAP - offset).min(limit);
+        }
+
+        new_head += advance << SHIFT;
+        let new_offset = offset + advance;
+
+        // Try moving the head index forward.
+        if self
+            .head
+            .index
+            .compare_exchange_weak(head, new_head, Ordering::SeqCst, Ordering::Acquire)
+            .is_err()
+        {
+            return Steal::Retry;
+        }
+
+        // Reserve capacity for the stolen batch.
+        let batch_size = new_offset - offset;
+        dest.reserve(batch_size);
+
+        // Get the destination buffer and back index.
+        let dest_buffer = dest.buffer.get();
+        let dest_b = dest.inner.back.load(Ordering::Relaxed);
+
+        unsafe {
+            // If we've reached the end of the block, move to the next one.
+            if new_offset == BLOCK_CAP {
+                let next = (*block).wait_next();
+                let mut next_index = (new_head & !HAS_NEXT).wrapping_add(1 << SHIFT);
+                if !(*next).next.load(Ordering::Relaxed).is_null() {
+                    next_index |= HAS_NEXT;
+                }
+
+                self.head.block.store(next, Ordering::Release);
+                self.head.index.store(next_index, Ordering::Release);
+            }
+
+            // Copy values from the injector into the destination queue.
+            match dest.flavor {
+                Flavor::Fifo => {
+                    for i in 0..batch_size {
+                        // Read the task.
+                        let slot = (*block).slots.get_unchecked(offset + i);
+                        slot.wait_write();
+                        let task = slot.task.get().read();
+
+                        // Write it into the destination queue.
+                        dest_buffer.write(dest_b.wrapping_add(i as isize), task);
+                    }
+                }
+
+                Flavor::Lifo => {
+                    for i in 0..batch_size {
+                        // Read the task.
+                        let slot = (*block).slots.get_unchecked(offset + i);
+                        slot.wait_write();
+                        let task = slot.task.get().read();
+
+                        // Write it into the destination queue.
+                        dest_buffer.write(dest_b.wrapping_add((batch_size - 1 - i) as isize), task);
+                    }
+                }
+            }
+
+            atomic::fence(Ordering::Release);
+
+            // Update the back index in the destination queue.
+            //
+            // This ordering could be `Relaxed`, but then thread sanitizer would falsely report
+            // data races because it doesn't understand fences.
+            dest.inner
+                .back
+                .store(dest_b.wrapping_add(batch_size as isize), Ordering::Release);
+
+            // Destroy the block if we've reached the end, or if another thread wanted to destroy
+            // but couldn't because we were busy reading from the slot.
+            if new_offset == BLOCK_CAP {
+                Block::destroy(block, offset);
+            } else {
+                for i in offset..new_offset {
+                    let slot = (*block).slots.get_unchecked(i);
+
+                    if slot.state.fetch_or(READ, Ordering::AcqRel) & DESTROY != 0 {
+                        Block::destroy(block, offset);
+                        break;
+                    }
+                }
+            }
+
+            Steal::Success(())
+        }
+    }
+
+    /// Steals a batch of tasks, pushes them into a worker, and pops a task from that worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than some constant limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Injector, Steal, Worker};
+    ///
+    /// let q = Injector::new();
+    /// q.push(1);
+    /// q.push(2);
+    /// q.push(3);
+    /// q.push(4);
+    ///
+    /// let w = Worker::new_fifo();
+    /// assert_eq!(q.steal_batch_and_pop(&w), Steal::Success(1));
+    /// assert_eq!(w.pop(), Some(2));
+    /// ```
+    pub fn steal_batch_and_pop(&self, dest: &Worker<T>) -> Steal<T> {
+        // TODO: we use `MAX_BATCH + 1` as the hard limit for Injecter as the performance is slightly
+        // better, but we may change it in the future to be compatible with the same method in Stealer.
+        self.steal_batch_with_limit_and_pop(dest, MAX_BATCH + 1)
+    }
+
+    /// Steals no more than `limit` of tasks, pushes them into a worker, and pops a task from that worker.
+    ///
+    /// How many tasks exactly will be stolen is not specified. That said, this method will try to
+    /// steal around half of the tasks in the queue, but also not more than the given limit.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::{Injector, Steal, Worker};
+    ///
+    /// let q = Injector::new();
+    /// q.push(1);
+    /// q.push(2);
+    /// q.push(3);
+    /// q.push(4);
+    /// q.push(5);
+    /// q.push(6);
+    ///
+    /// let w = Worker::new_fifo();
+    /// assert_eq!(q.steal_batch_with_limit_and_pop(&w, 2), Steal::Success(1));
+    /// assert_eq!(w.pop(), Some(2));
+    /// assert_eq!(w.pop(), None);
+    ///
+    /// q.push(7);
+    /// // Setting a large limit does not guarantee that all elements will be popped. In this case,
+    /// // half of the elements are currently popped, but the number of popped elements is considered
+    /// // an implementation detail that may be changed in the future.
+    /// assert_eq!(q.steal_batch_with_limit_and_pop(&w, std::usize::MAX), Steal::Success(3));
+    /// assert_eq!(w.pop(), Some(4));
+    /// assert_eq!(w.pop(), Some(5));
+    /// assert_eq!(w.pop(), None);
+    /// ```
+    pub fn steal_batch_with_limit_and_pop(&self, dest: &Worker<T>, limit: usize) -> Steal<T> {
+        assert!(limit > 0);
+        let mut head;
+        let mut block;
+        let mut offset;
+
+        let backoff = Backoff::new();
+        loop {
+            head = self.head.index.load(Ordering::Acquire);
+            block = self.head.block.load(Ordering::Acquire);
+
+            // Calculate the offset of the index into the block.
+            offset = (head >> SHIFT) % LAP;
+
+            // If we reached the end of the block, wait until the next one is installed.
+            if offset == BLOCK_CAP {
+                backoff.snooze();
+            } else {
+                break;
+            }
+        }
+
+        let mut new_head = head;
+        let advance;
+
+        if new_head & HAS_NEXT == 0 {
+            atomic::fence(Ordering::SeqCst);
+            let tail = self.tail.index.load(Ordering::Relaxed);
+
+            // If the tail equals the head, that means the queue is empty.
+            if head >> SHIFT == tail >> SHIFT {
+                return Steal::Empty;
+            }
+
+            // If head and tail are not in the same block, set `HAS_NEXT` in head.
+            if (head >> SHIFT) / LAP != (tail >> SHIFT) / LAP {
+                new_head |= HAS_NEXT;
+                // We can steal all tasks till the end of the block.
+                advance = (BLOCK_CAP - offset).min(limit);
+            } else {
+                let len = (tail - head) >> SHIFT;
+                // Steal half of the available tasks.
+                advance = ((len + 1) / 2).min(limit);
+            }
+        } else {
+            // We can steal all tasks till the end of the block.
+            advance = (BLOCK_CAP - offset).min(limit);
+        }
+
+        new_head += advance << SHIFT;
+        let new_offset = offset + advance;
+
+        // Try moving the head index forward.
+        if self
+            .head
+            .index
+            .compare_exchange_weak(head, new_head, Ordering::SeqCst, Ordering::Acquire)
+            .is_err()
+        {
+            return Steal::Retry;
+        }
+
+        // Reserve capacity for the stolen batch.
+        let batch_size = new_offset - offset - 1;
+        dest.reserve(batch_size);
+
+        // Get the destination buffer and back index.
+        let dest_buffer = dest.buffer.get();
+        let dest_b = dest.inner.back.load(Ordering::Relaxed);
+
+        unsafe {
+            // If we've reached the end of the block, move to the next one.
+            if new_offset == BLOCK_CAP {
+                let next = (*block).wait_next();
+                let mut next_index = (new_head & !HAS_NEXT).wrapping_add(1 << SHIFT);
+                if !(*next).next.load(Ordering::Relaxed).is_null() {
+                    next_index |= HAS_NEXT;
+                }
+
+                self.head.block.store(next, Ordering::Release);
+                self.head.index.store(next_index, Ordering::Release);
+            }
+
+            // Read the task.
+            let slot = (*block).slots.get_unchecked(offset);
+            slot.wait_write();
+            let task = slot.task.get().read();
+
+            match dest.flavor {
+                Flavor::Fifo => {
+                    // Copy values from the injector into the destination queue.
+                    for i in 0..batch_size {
+                        // Read the task.
+                        let slot = (*block).slots.get_unchecked(offset + i + 1);
+                        slot.wait_write();
+                        let task = slot.task.get().read();
+
+                        // Write it into the destination queue.
+                        dest_buffer.write(dest_b.wrapping_add(i as isize), task);
+                    }
+                }
+
+                Flavor::Lifo => {
+                    // Copy values from the injector into the destination queue.
+                    for i in 0..batch_size {
+                        // Read the task.
+                        let slot = (*block).slots.get_unchecked(offset + i + 1);
+                        slot.wait_write();
+                        let task = slot.task.get().read();
+
+                        // Write it into the destination queue.
+                        dest_buffer.write(dest_b.wrapping_add((batch_size - 1 - i) as isize), task);
+                    }
+                }
+            }
+
+            atomic::fence(Ordering::Release);
+
+            // Update the back index in the destination queue.
+            //
+            // This ordering could be `Relaxed`, but then thread sanitizer would falsely report
+            // data races because it doesn't understand fences.
+            dest.inner
+                .back
+                .store(dest_b.wrapping_add(batch_size as isize), Ordering::Release);
+
+            // Destroy the block if we've reached the end, or if another thread wanted to destroy
+            // but couldn't because we were busy reading from the slot.
+            if new_offset == BLOCK_CAP {
+                Block::destroy(block, offset);
+            } else {
+                for i in offset..new_offset {
+                    let slot = (*block).slots.get_unchecked(i);
+
+                    if slot.state.fetch_or(READ, Ordering::AcqRel) & DESTROY != 0 {
+                        Block::destroy(block, offset);
+                        break;
+                    }
+                }
+            }
+
+            Steal::Success(task.assume_init())
+        }
+    }
+
+    /// Returns `true` if the queue is empty.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Injector;
+    ///
+    /// let q = Injector::new();
+    ///
+    /// assert!(q.is_empty());
+    /// q.push(1);
+    /// assert!(!q.is_empty());
+    /// ```
+    pub fn is_empty(&self) -> bool {
+        let head = self.head.index.load(Ordering::SeqCst);
+        let tail = self.tail.index.load(Ordering::SeqCst);
+        head >> SHIFT == tail >> SHIFT
+    }
+
+    /// Returns the number of tasks in the queue.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Injector;
+    ///
+    /// let q = Injector::new();
+    ///
+    /// assert_eq!(q.len(), 0);
+    /// q.push(1);
+    /// assert_eq!(q.len(), 1);
+    /// q.push(1);
+    /// assert_eq!(q.len(), 2);
+    /// ```
+    pub fn len(&self) -> usize {
+        loop {
+            // Load the tail index, then load the head index.
+            let mut tail = self.tail.index.load(Ordering::SeqCst);
+            let mut head = self.head.index.load(Ordering::SeqCst);
+
+            // If the tail index didn't change, we've got consistent indices to work with.
+            if self.tail.index.load(Ordering::SeqCst) == tail {
+                // Erase the lower bits.
+                tail &= !((1 << SHIFT) - 1);
+                head &= !((1 << SHIFT) - 1);
+
+                // Fix up indices if they fall onto block ends.
+                if (tail >> SHIFT) & (LAP - 1) == LAP - 1 {
+                    tail = tail.wrapping_add(1 << SHIFT);
+                }
+                if (head >> SHIFT) & (LAP - 1) == LAP - 1 {
+                    head = head.wrapping_add(1 << SHIFT);
+                }
+
+                // Rotate indices so that head falls into the first block.
+                let lap = (head >> SHIFT) / LAP;
+                tail = tail.wrapping_sub((lap * LAP) << SHIFT);
+                head = head.wrapping_sub((lap * LAP) << SHIFT);
+
+                // Remove the lower bits.
+                tail >>= SHIFT;
+                head >>= SHIFT;
+
+                // Return the difference minus the number of blocks between tail and head.
+                return tail - head - tail / LAP;
+            }
+        }
+    }
+}
+
+impl<T> Drop for Injector<T> {
+    fn drop(&mut self) {
+        let mut head = *self.head.index.get_mut();
+        let mut tail = *self.tail.index.get_mut();
+        let mut block = *self.head.block.get_mut();
+
+        // Erase the lower bits.
+        head &= !((1 << SHIFT) - 1);
+        tail &= !((1 << SHIFT) - 1);
+
+        unsafe {
+            // Drop all values between `head` and `tail` and deallocate the heap-allocated blocks.
+            while head != tail {
+                let offset = (head >> SHIFT) % LAP;
+
+                if offset < BLOCK_CAP {
+                    // Drop the task in the slot.
+                    let slot = (*block).slots.get_unchecked(offset);
+                    (*slot.task.get()).assume_init_drop();
+                } else {
+                    // Deallocate the block and move to the next one.
+                    let next = *(*block).next.get_mut();
+                    drop(Box::from_raw(block));
+                    block = next;
+                }
+
+                head = head.wrapping_add(1 << SHIFT);
+            }
+
+            // Deallocate the last remaining block.
+            drop(Box::from_raw(block));
+        }
+    }
+}
+
+impl<T> fmt::Debug for Injector<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Worker { .. }")
+    }
+}
+
+/// Possible outcomes of a steal operation.
+///
+/// # Examples
+///
+/// There are lots of ways to chain results of steal operations together:
+///
+/// ```
+/// use crossbeam_deque::Steal::{self, Empty, Retry, Success};
+///
+/// let collect = |v: Vec<Steal<i32>>| v.into_iter().collect::<Steal<i32>>();
+///
+/// assert_eq!(collect(vec![Empty, Empty, Empty]), Empty);
+/// assert_eq!(collect(vec![Empty, Retry, Empty]), Retry);
+/// assert_eq!(collect(vec![Retry, Success(1), Empty]), Success(1));
+///
+/// assert_eq!(collect(vec![Empty, Empty]).or_else(|| Retry), Retry);
+/// assert_eq!(collect(vec![Retry, Empty]).or_else(|| Success(1)), Success(1));
+/// ```
+#[must_use]
+#[derive(PartialEq, Eq, Copy, Clone)]
+pub enum Steal<T> {
+    /// The queue was empty at the time of stealing.
+    Empty,
+
+    /// At least one task was successfully stolen.
+    Success(T),
+
+    /// The steal operation needs to be retried.
+    Retry,
+}
+
+impl<T> Steal<T> {
+    /// Returns `true` if the queue was empty at the time of stealing.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Steal::{Empty, Retry, Success};
+    ///
+    /// assert!(!Success(7).is_empty());
+    /// assert!(!Retry::<i32>.is_empty());
+    ///
+    /// assert!(Empty::<i32>.is_empty());
+    /// ```
+    pub fn is_empty(&self) -> bool {
+        match self {
+            Steal::Empty => true,
+            _ => false,
+        }
+    }
+
+    /// Returns `true` if at least one task was stolen.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Steal::{Empty, Retry, Success};
+    ///
+    /// assert!(!Empty::<i32>.is_success());
+    /// assert!(!Retry::<i32>.is_success());
+    ///
+    /// assert!(Success(7).is_success());
+    /// ```
+    pub fn is_success(&self) -> bool {
+        match self {
+            Steal::Success(_) => true,
+            _ => false,
+        }
+    }
+
+    /// Returns `true` if the steal operation needs to be retried.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Steal::{Empty, Retry, Success};
+    ///
+    /// assert!(!Empty::<i32>.is_retry());
+    /// assert!(!Success(7).is_retry());
+    ///
+    /// assert!(Retry::<i32>.is_retry());
+    /// ```
+    pub fn is_retry(&self) -> bool {
+        match self {
+            Steal::Retry => true,
+            _ => false,
+        }
+    }
+
+    /// Returns the result of the operation, if successful.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Steal::{Empty, Retry, Success};
+    ///
+    /// assert_eq!(Empty::<i32>.success(), None);
+    /// assert_eq!(Retry::<i32>.success(), None);
+    ///
+    /// assert_eq!(Success(7).success(), Some(7));
+    /// ```
+    pub fn success(self) -> Option<T> {
+        match self {
+            Steal::Success(res) => Some(res),
+            _ => None,
+        }
+    }
+
+    /// If no task was stolen, attempts another steal operation.
+    ///
+    /// Returns this steal result if it is `Success`. Otherwise, closure `f` is invoked and then:
+    ///
+    /// * If the second steal resulted in `Success`, it is returned.
+    /// * If both steals were unsuccessful but any resulted in `Retry`, then `Retry` is returned.
+    /// * If both resulted in `None`, then `None` is returned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_deque::Steal::{Empty, Retry, Success};
+    ///
+    /// assert_eq!(Success(1).or_else(|| Success(2)), Success(1));
+    /// assert_eq!(Retry.or_else(|| Success(2)), Success(2));
+    ///
+    /// assert_eq!(Retry.or_else(|| Empty), Retry::<i32>);
+    /// assert_eq!(Empty.or_else(|| Retry), Retry::<i32>);
+    ///
+    /// assert_eq!(Empty.or_else(|| Empty), Empty::<i32>);
+    /// ```
+    pub fn or_else<F>(self, f: F) -> Steal<T>
+    where
+        F: FnOnce() -> Steal<T>,
+    {
+        match self {
+            Steal::Empty => f(),
+            Steal::Success(_) => self,
+            Steal::Retry => {
+                if let Steal::Success(res) = f() {
+                    Steal::Success(res)
+                } else {
+                    Steal::Retry
+                }
+            }
+        }
+    }
+}
+
+impl<T> fmt::Debug for Steal<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            Steal::Empty => f.pad("Empty"),
+            Steal::Success(_) => f.pad("Success(..)"),
+            Steal::Retry => f.pad("Retry"),
+        }
+    }
+}
+
+impl<T> FromIterator<Steal<T>> for Steal<T> {
+    /// Consumes items until a `Success` is found and returns it.
+    ///
+    /// If no `Success` was found, but there was at least one `Retry`, then returns `Retry`.
+    /// Otherwise, `Empty` is returned.
+    fn from_iter<I>(iter: I) -> Steal<T>
+    where
+        I: IntoIterator<Item = Steal<T>>,
+    {
+        let mut retry = false;
+        for s in iter {
+            match &s {
+                Steal::Empty => {}
+                Steal::Success(_) => return s,
+                Steal::Retry => retry = true,
+            }
+        }
+
+        if retry {
+            Steal::Retry
+        } else {
+            Steal::Empty
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_deque/lib.rs.html b/src/crossbeam_deque/lib.rs.html new file mode 100644 index 0000000000..d36fb8dcb5 --- /dev/null +++ b/src/crossbeam_deque/lib.rs.html @@ -0,0 +1,209 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+
//! Concurrent work-stealing deques.
+//!
+//! These data structures are most commonly used in work-stealing schedulers. The typical setup
+//! involves a number of threads, each having its own FIFO or LIFO queue (*worker*). There is also
+//! one global FIFO queue (*injector*) and a list of references to *worker* queues that are able to
+//! steal tasks (*stealers*).
+//!
+//! We spawn a new task onto the scheduler by pushing it into the *injector* queue. Each worker
+//! thread waits in a loop until it finds the next task to run and then runs it. To find a task, it
+//! first looks into its local *worker* queue, and then into the *injector* and *stealers*.
+//!
+//! # Queues
+//!
+//! [`Injector`] is a FIFO queue, where tasks are pushed and stolen from opposite ends. It is
+//! shared among threads and is usually the entry point for new tasks.
+//!
+//! [`Worker`] has two constructors:
+//!
+//! * [`new_fifo()`] - Creates a FIFO queue, in which tasks are pushed and popped from opposite
+//!   ends.
+//! * [`new_lifo()`] - Creates a LIFO queue, in which tasks are pushed and popped from the same
+//!   end.
+//!
+//! Each [`Worker`] is owned by a single thread and supports only push and pop operations.
+//!
+//! Method [`stealer()`] creates a [`Stealer`] that may be shared among threads and can only steal
+//! tasks from its [`Worker`]. Tasks are stolen from the end opposite to where they get pushed.
+//!
+//! # Stealing
+//!
+//! Steal operations come in three flavors:
+//!
+//! 1. [`steal()`] - Steals one task.
+//! 2. [`steal_batch()`] - Steals a batch of tasks and moves them into another worker.
+//! 3. [`steal_batch_and_pop()`] - Steals a batch of tasks, moves them into another queue, and pops
+//!    one task from that worker.
+//!
+//! In contrast to push and pop operations, stealing can spuriously fail with [`Steal::Retry`], in
+//! which case the steal operation needs to be retried.
+//!
+//! # Examples
+//!
+//! Suppose a thread in a work-stealing scheduler is idle and looking for the next task to run. To
+//! find an available task, it might do the following:
+//!
+//! 1. Try popping one task from the local worker queue.
+//! 2. Try stealing a batch of tasks from the global injector queue.
+//! 3. Try stealing one task from another thread using the stealer list.
+//!
+//! An implementation of this work-stealing strategy:
+//!
+//! ```
+//! use crossbeam_deque::{Injector, Stealer, Worker};
+//! use std::iter;
+//!
+//! fn find_task<T>(
+//!     local: &Worker<T>,
+//!     global: &Injector<T>,
+//!     stealers: &[Stealer<T>],
+//! ) -> Option<T> {
+//!     // Pop a task from the local queue, if not empty.
+//!     local.pop().or_else(|| {
+//!         // Otherwise, we need to look for a task elsewhere.
+//!         iter::repeat_with(|| {
+//!             // Try stealing a batch of tasks from the global queue.
+//!             global.steal_batch_and_pop(local)
+//!                 // Or try stealing a task from one of the other threads.
+//!                 .or_else(|| stealers.iter().map(|s| s.steal()).collect())
+//!         })
+//!         // Loop while no task was stolen and any steal operation needs to be retried.
+//!         .find(|s| !s.is_retry())
+//!         // Extract the stolen task, if there is one.
+//!         .and_then(|s| s.success())
+//!     })
+//! }
+//! ```
+//!
+//! [`new_fifo()`]: Worker::new_fifo
+//! [`new_lifo()`]: Worker::new_lifo
+//! [`stealer()`]: Worker::stealer
+//! [`steal()`]: Stealer::steal
+//! [`steal_batch()`]: Stealer::steal_batch
+//! [`steal_batch_and_pop()`]: Stealer::steal_batch_and_pop
+
+#![doc(test(
+    no_crate_inject,
+    attr(
+        deny(warnings, rust_2018_idioms),
+        allow(dead_code, unused_assignments, unused_variables)
+    )
+))]
+#![warn(
+    missing_docs,
+    missing_debug_implementations,
+    rust_2018_idioms,
+    unreachable_pub
+)]
+#![cfg_attr(not(feature = "std"), no_std)]
+
+#[cfg(feature = "std")]
+mod deque;
+#[cfg(feature = "std")]
+pub use crate::deque::{Injector, Steal, Stealer, Worker};
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/atomic.rs.html b/src/crossbeam_epoch/atomic.rs.html new file mode 100644 index 0000000000..3ac01cb28e --- /dev/null +++ b/src/crossbeam_epoch/atomic.rs.html @@ -0,0 +1,3407 @@ +atomic.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+
use alloc::boxed::Box;
+use core::alloc::Layout;
+use core::borrow::{Borrow, BorrowMut};
+use core::cmp;
+use core::fmt;
+use core::marker::PhantomData;
+use core::mem::{self, MaybeUninit};
+use core::ops::{Deref, DerefMut};
+use core::ptr;
+use core::slice;
+
+use crate::guard::Guard;
+use crate::primitive::sync::atomic::{AtomicUsize, Ordering};
+use crossbeam_utils::atomic::AtomicConsume;
+
+/// Given ordering for the success case in a compare-exchange operation, returns the strongest
+/// appropriate ordering for the failure case.
+#[inline]
+fn strongest_failure_ordering(ord: Ordering) -> Ordering {
+    use self::Ordering::*;
+    match ord {
+        Relaxed | Release => Relaxed,
+        Acquire | AcqRel => Acquire,
+        _ => SeqCst,
+    }
+}
+
+/// The error returned on failed compare-and-set operation.
+// TODO: remove in the next major version.
+#[deprecated(note = "Use `CompareExchangeError` instead")]
+pub type CompareAndSetError<'g, T, P> = CompareExchangeError<'g, T, P>;
+
+/// The error returned on failed compare-and-swap operation.
+pub struct CompareExchangeError<'g, T: ?Sized + Pointable, P: Pointer<T>> {
+    /// The value in the atomic pointer at the time of the failed operation.
+    pub current: Shared<'g, T>,
+
+    /// The new value, which the operation failed to store.
+    pub new: P,
+}
+
+impl<T, P: Pointer<T> + fmt::Debug> fmt::Debug for CompareExchangeError<'_, T, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("CompareExchangeError")
+            .field("current", &self.current)
+            .field("new", &self.new)
+            .finish()
+    }
+}
+
+/// Memory orderings for compare-and-set operations.
+///
+/// A compare-and-set operation can have different memory orderings depending on whether it
+/// succeeds or fails. This trait generalizes different ways of specifying memory orderings.
+///
+/// The two ways of specifying orderings for compare-and-set are:
+///
+/// 1. Just one `Ordering` for the success case. In case of failure, the strongest appropriate
+///    ordering is chosen.
+/// 2. A pair of `Ordering`s. The first one is for the success case, while the second one is
+///    for the failure case.
+// TODO: remove in the next major version.
+#[deprecated(
+    note = "`compare_and_set` and `compare_and_set_weak` that use this trait are deprecated, \
+            use `compare_exchange` or `compare_exchange_weak instead`"
+)]
+pub trait CompareAndSetOrdering {
+    /// The ordering of the operation when it succeeds.
+    fn success(&self) -> Ordering;
+
+    /// The ordering of the operation when it fails.
+    ///
+    /// The failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker than
+    /// the success ordering.
+    fn failure(&self) -> Ordering;
+}
+
+#[allow(deprecated)]
+impl CompareAndSetOrdering for Ordering {
+    #[inline]
+    fn success(&self) -> Ordering {
+        *self
+    }
+
+    #[inline]
+    fn failure(&self) -> Ordering {
+        strongest_failure_ordering(*self)
+    }
+}
+
+#[allow(deprecated)]
+impl CompareAndSetOrdering for (Ordering, Ordering) {
+    #[inline]
+    fn success(&self) -> Ordering {
+        self.0
+    }
+
+    #[inline]
+    fn failure(&self) -> Ordering {
+        self.1
+    }
+}
+
+/// Returns a bitmask containing the unused least significant bits of an aligned pointer to `T`.
+#[inline]
+fn low_bits<T: ?Sized + Pointable>() -> usize {
+    (1 << T::ALIGN.trailing_zeros()) - 1
+}
+
+/// Panics if the pointer is not properly unaligned.
+#[inline]
+fn ensure_aligned<T: ?Sized + Pointable>(raw: usize) {
+    assert_eq!(raw & low_bits::<T>(), 0, "unaligned pointer");
+}
+
+/// Given a tagged pointer `data`, returns the same pointer, but tagged with `tag`.
+///
+/// `tag` is truncated to fit into the unused bits of the pointer to `T`.
+#[inline]
+fn compose_tag<T: ?Sized + Pointable>(data: usize, tag: usize) -> usize {
+    (data & !low_bits::<T>()) | (tag & low_bits::<T>())
+}
+
+/// Decomposes a tagged pointer `data` into the pointer and the tag.
+#[inline]
+fn decompose_tag<T: ?Sized + Pointable>(data: usize) -> (usize, usize) {
+    (data & !low_bits::<T>(), data & low_bits::<T>())
+}
+
+/// Types that are pointed to by a single word.
+///
+/// In concurrent programming, it is necessary to represent an object within a word because atomic
+/// operations (e.g., reads, writes, read-modify-writes) support only single words.  This trait
+/// qualifies such types that are pointed to by a single word.
+///
+/// The trait generalizes `Box<T>` for a sized type `T`.  In a box, an object of type `T` is
+/// allocated in heap and it is owned by a single-word pointer.  This trait is also implemented for
+/// `[MaybeUninit<T>]` by storing its size along with its elements and pointing to the pair of array
+/// size and elements.
+///
+/// Pointers to `Pointable` types can be stored in [`Atomic`], [`Owned`], and [`Shared`].  In
+/// particular, Crossbeam supports dynamically sized slices as follows.
+///
+/// ```
+/// use std::mem::MaybeUninit;
+/// use crossbeam_epoch::Owned;
+///
+/// let o = Owned::<[MaybeUninit<i32>]>::init(10); // allocating [i32; 10]
+/// ```
+pub trait Pointable {
+    /// The alignment of pointer.
+    const ALIGN: usize;
+
+    /// The type for initializers.
+    type Init;
+
+    /// Initializes a with the given initializer.
+    ///
+    /// # Safety
+    ///
+    /// The result should be a multiple of `ALIGN`.
+    unsafe fn init(init: Self::Init) -> usize;
+
+    /// Dereferences the given pointer.
+    ///
+    /// # Safety
+    ///
+    /// - The given `ptr` should have been initialized with [`Pointable::init`].
+    /// - `ptr` should not have yet been dropped by [`Pointable::drop`].
+    /// - `ptr` should not be mutably dereferenced by [`Pointable::deref_mut`] concurrently.
+    unsafe fn deref<'a>(ptr: usize) -> &'a Self;
+
+    /// Mutably dereferences the given pointer.
+    ///
+    /// # Safety
+    ///
+    /// - The given `ptr` should have been initialized with [`Pointable::init`].
+    /// - `ptr` should not have yet been dropped by [`Pointable::drop`].
+    /// - `ptr` should not be dereferenced by [`Pointable::deref`] or [`Pointable::deref_mut`]
+    ///   concurrently.
+    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self;
+
+    /// Drops the object pointed to by the given pointer.
+    ///
+    /// # Safety
+    ///
+    /// - The given `ptr` should have been initialized with [`Pointable::init`].
+    /// - `ptr` should not have yet been dropped by [`Pointable::drop`].
+    /// - `ptr` should not be dereferenced by [`Pointable::deref`] or [`Pointable::deref_mut`]
+    ///   concurrently.
+    unsafe fn drop(ptr: usize);
+}
+
+impl<T> Pointable for T {
+    const ALIGN: usize = mem::align_of::<T>();
+
+    type Init = T;
+
+    unsafe fn init(init: Self::Init) -> usize {
+        Box::into_raw(Box::new(init)) as usize
+    }
+
+    unsafe fn deref<'a>(ptr: usize) -> &'a Self {
+        &*(ptr as *const T)
+    }
+
+    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self {
+        &mut *(ptr as *mut T)
+    }
+
+    unsafe fn drop(ptr: usize) {
+        drop(Box::from_raw(ptr as *mut T));
+    }
+}
+
+/// Array with size.
+///
+/// # Memory layout
+///
+/// An array consisting of size and elements:
+///
+/// ```text
+///          elements
+///          |
+///          |
+/// ------------------------------------
+/// | size | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
+/// ------------------------------------
+/// ```
+///
+/// Its memory layout is different from that of `Box<[T]>` in that size is in the allocation (not
+/// along with pointer as in `Box<[T]>`).
+///
+/// Elements are not present in the type, but they will be in the allocation.
+/// ```
+#[repr(C)]
+struct Array<T> {
+    /// The number of elements (not the number of bytes).
+    len: usize,
+    elements: [MaybeUninit<T>; 0],
+}
+
+impl<T> Array<T> {
+    fn layout(len: usize) -> Layout {
+        Layout::new::<Self>()
+            .extend(Layout::array::<MaybeUninit<T>>(len).unwrap())
+            .unwrap()
+            .0
+            .pad_to_align()
+    }
+}
+
+impl<T> Pointable for [MaybeUninit<T>] {
+    const ALIGN: usize = mem::align_of::<Array<T>>();
+
+    type Init = usize;
+
+    unsafe fn init(len: Self::Init) -> usize {
+        let layout = Array::<T>::layout(len);
+        let ptr = alloc::alloc::alloc(layout).cast::<Array<T>>();
+        if ptr.is_null() {
+            alloc::alloc::handle_alloc_error(layout);
+        }
+        ptr::addr_of_mut!((*ptr).len).write(len);
+        ptr as usize
+    }
+
+    unsafe fn deref<'a>(ptr: usize) -> &'a Self {
+        let array = &*(ptr as *const Array<T>);
+        slice::from_raw_parts(array.elements.as_ptr() as *const _, array.len)
+    }
+
+    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self {
+        let array = &*(ptr as *mut Array<T>);
+        slice::from_raw_parts_mut(array.elements.as_ptr() as *mut _, array.len)
+    }
+
+    unsafe fn drop(ptr: usize) {
+        let len = (*(ptr as *mut Array<T>)).len;
+        let layout = Array::<T>::layout(len);
+        alloc::alloc::dealloc(ptr as *mut u8, layout);
+    }
+}
+
+/// An atomic pointer that can be safely shared between threads.
+///
+/// The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused
+/// least significant bits of the address. For example, the tag for a pointer to a sized type `T`
+/// should be less than `(1 << mem::align_of::<T>().trailing_zeros())`.
+///
+/// Any method that loads the pointer must be passed a reference to a [`Guard`].
+///
+/// Crossbeam supports dynamically sized types.  See [`Pointable`] for details.
+pub struct Atomic<T: ?Sized + Pointable> {
+    data: AtomicUsize,
+    _marker: PhantomData<*mut T>,
+}
+
+unsafe impl<T: ?Sized + Pointable + Send + Sync> Send for Atomic<T> {}
+unsafe impl<T: ?Sized + Pointable + Send + Sync> Sync for Atomic<T> {}
+
+impl<T> Atomic<T> {
+    /// Allocates `value` on the heap and returns a new atomic pointer pointing to it.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Atomic;
+    ///
+    /// let a = Atomic::new(1234);
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn new(init: T) -> Atomic<T> {
+        Self::init(init)
+    }
+}
+
+impl<T: ?Sized + Pointable> Atomic<T> {
+    /// Allocates `value` on the heap and returns a new atomic pointer pointing to it.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Atomic;
+    ///
+    /// let a = Atomic::<i32>::init(1234);
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn init(init: T::Init) -> Atomic<T> {
+        Self::from(Owned::init(init))
+    }
+
+    /// Returns a new atomic pointer pointing to the tagged pointer `data`.
+    fn from_usize(data: usize) -> Self {
+        Self {
+            data: AtomicUsize::new(data),
+            _marker: PhantomData,
+        }
+    }
+
+    /// Returns a new null atomic pointer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Atomic;
+    ///
+    /// let a = Atomic::<i32>::null();
+    /// ```
+    #[cfg(not(crossbeam_loom))]
+    pub const fn null() -> Atomic<T> {
+        Self {
+            data: AtomicUsize::new(0),
+            _marker: PhantomData,
+        }
+    }
+    /// Returns a new null atomic pointer.
+    #[cfg(crossbeam_loom)]
+    pub fn null() -> Atomic<T> {
+        Self {
+            data: AtomicUsize::new(0),
+            _marker: PhantomData,
+        }
+    }
+
+    /// Loads a `Shared` from the atomic pointer.
+    ///
+    /// This method takes an [`Ordering`] argument which describes the memory ordering of this
+    /// operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    /// let p = a.load(SeqCst, guard);
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn load<'g>(&self, ord: Ordering, _: &'g Guard) -> Shared<'g, T> {
+        unsafe { Shared::from_usize(self.data.load(ord)) }
+    }
+
+    /// Loads a `Shared` from the atomic pointer using a "consume" memory ordering.
+    ///
+    /// This is similar to the "acquire" ordering, except that an ordering is
+    /// only guaranteed with operations that "depend on" the result of the load.
+    /// However consume loads are usually much faster than acquire loads on
+    /// architectures with a weak memory model since they don't require memory
+    /// fence instructions.
+    ///
+    /// The exact definition of "depend on" is a bit vague, but it works as you
+    /// would expect in practice since a lot of software, especially the Linux
+    /// kernel, rely on this behavior.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    /// let p = a.load_consume(guard);
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn load_consume<'g>(&self, _: &'g Guard) -> Shared<'g, T> {
+        unsafe { Shared::from_usize(self.data.load_consume()) }
+    }
+
+    /// Stores a `Shared` or `Owned` pointer into the atomic pointer.
+    ///
+    /// This method takes an [`Ordering`] argument which describes the memory ordering of this
+    /// operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{Atomic, Owned, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// # unsafe { drop(a.load(SeqCst, &crossbeam_epoch::pin()).into_owned()); } // avoid leak
+    /// a.store(Shared::null(), SeqCst);
+    /// a.store(Owned::new(1234), SeqCst);
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn store<P: Pointer<T>>(&self, new: P, ord: Ordering) {
+        self.data.store(new.into_usize(), ord);
+    }
+
+    /// Stores a `Shared` or `Owned` pointer into the atomic pointer, returning the previous
+    /// `Shared`.
+    ///
+    /// This method takes an [`Ordering`] argument which describes the memory ordering of this
+    /// operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    /// let p = a.swap(Shared::null(), SeqCst, guard);
+    /// # unsafe { drop(p.into_owned()); } // avoid leak
+    /// ```
+    pub fn swap<'g, P: Pointer<T>>(&self, new: P, ord: Ordering, _: &'g Guard) -> Shared<'g, T> {
+        unsafe { Shared::from_usize(self.data.swap(new.into_usize(), ord)) }
+    }
+
+    /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current
+    /// value is the same as `current`. The tag is also taken into account, so two pointers to the
+    /// same object, but with different tags, will not be considered equal.
+    ///
+    /// The return value is a result indicating whether the new pointer was written. On success the
+    /// pointer that was written is returned. On failure the actual current value and `new` are
+    /// returned.
+    ///
+    /// This method takes two `Ordering` arguments to describe the memory
+    /// ordering of this operation. `success` describes the required ordering for the
+    /// read-modify-write operation that takes place if the comparison with `current` succeeds.
+    /// `failure` describes the required ordering for the load operation that takes place when
+    /// the comparison fails. Using `Acquire` as success ordering makes the store part
+    /// of this operation `Relaxed`, and using `Release` makes the successful load
+    /// `Relaxed`. The failure ordering can only be `SeqCst`, `Acquire` or `Relaxed`
+    /// and must be equivalent to or weaker than the success ordering.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    ///
+    /// let guard = &epoch::pin();
+    /// let curr = a.load(SeqCst, guard);
+    /// let res1 = a.compare_exchange(curr, Shared::null(), SeqCst, SeqCst, guard);
+    /// let res2 = a.compare_exchange(curr, Owned::new(5678), SeqCst, SeqCst, guard);
+    /// # unsafe { drop(curr.into_owned()); } // avoid leak
+    /// ```
+    pub fn compare_exchange<'g, P>(
+        &self,
+        current: Shared<'_, T>,
+        new: P,
+        success: Ordering,
+        failure: Ordering,
+        _: &'g Guard,
+    ) -> Result<Shared<'g, T>, CompareExchangeError<'g, T, P>>
+    where
+        P: Pointer<T>,
+    {
+        let new = new.into_usize();
+        self.data
+            .compare_exchange(current.into_usize(), new, success, failure)
+            .map(|_| unsafe { Shared::from_usize(new) })
+            .map_err(|current| unsafe {
+                CompareExchangeError {
+                    current: Shared::from_usize(current),
+                    new: P::from_usize(new),
+                }
+            })
+    }
+
+    /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current
+    /// value is the same as `current`. The tag is also taken into account, so two pointers to the
+    /// same object, but with different tags, will not be considered equal.
+    ///
+    /// Unlike [`compare_exchange`], this method is allowed to spuriously fail even when comparison
+    /// succeeds, which can result in more efficient code on some platforms.  The return value is a
+    /// result indicating whether the new pointer was written. On success the pointer that was
+    /// written is returned. On failure the actual current value and `new` are returned.
+    ///
+    /// This method takes two `Ordering` arguments to describe the memory
+    /// ordering of this operation. `success` describes the required ordering for the
+    /// read-modify-write operation that takes place if the comparison with `current` succeeds.
+    /// `failure` describes the required ordering for the load operation that takes place when
+    /// the comparison fails. Using `Acquire` as success ordering makes the store part
+    /// of this operation `Relaxed`, and using `Release` makes the successful load
+    /// `Relaxed`. The failure ordering can only be `SeqCst`, `Acquire` or `Relaxed`
+    /// and must be equivalent to or weaker than the success ordering.
+    ///
+    /// [`compare_exchange`]: Atomic::compare_exchange
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    ///
+    /// let mut new = Owned::new(5678);
+    /// let mut ptr = a.load(SeqCst, guard);
+    /// # unsafe { drop(a.load(SeqCst, guard).into_owned()); } // avoid leak
+    /// loop {
+    ///     match a.compare_exchange_weak(ptr, new, SeqCst, SeqCst, guard) {
+    ///         Ok(p) => {
+    ///             ptr = p;
+    ///             break;
+    ///         }
+    ///         Err(err) => {
+    ///             ptr = err.current;
+    ///             new = err.new;
+    ///         }
+    ///     }
+    /// }
+    ///
+    /// let mut curr = a.load(SeqCst, guard);
+    /// loop {
+    ///     match a.compare_exchange_weak(curr, Shared::null(), SeqCst, SeqCst, guard) {
+    ///         Ok(_) => break,
+    ///         Err(err) => curr = err.current,
+    ///     }
+    /// }
+    /// # unsafe { drop(curr.into_owned()); } // avoid leak
+    /// ```
+    pub fn compare_exchange_weak<'g, P>(
+        &self,
+        current: Shared<'_, T>,
+        new: P,
+        success: Ordering,
+        failure: Ordering,
+        _: &'g Guard,
+    ) -> Result<Shared<'g, T>, CompareExchangeError<'g, T, P>>
+    where
+        P: Pointer<T>,
+    {
+        let new = new.into_usize();
+        self.data
+            .compare_exchange_weak(current.into_usize(), new, success, failure)
+            .map(|_| unsafe { Shared::from_usize(new) })
+            .map_err(|current| unsafe {
+                CompareExchangeError {
+                    current: Shared::from_usize(current),
+                    new: P::from_usize(new),
+                }
+            })
+    }
+
+    /// Fetches the pointer, and then applies a function to it that returns a new value.
+    /// Returns a `Result` of `Ok(previous_value)` if the function returned `Some`, else `Err(_)`.
+    ///
+    /// Note that the given function may be called multiple times if the value has been changed by
+    /// other threads in the meantime, as long as the function returns `Some(_)`, but the function
+    /// will have been applied only once to the stored value.
+    ///
+    /// `fetch_update` takes two [`Ordering`] arguments to describe the memory
+    /// ordering of this operation. The first describes the required ordering for
+    /// when the operation finally succeeds while the second describes the
+    /// required ordering for loads. These correspond to the success and failure
+    /// orderings of [`Atomic::compare_exchange`] respectively.
+    ///
+    /// Using [`Acquire`] as success ordering makes the store part of this
+    /// operation [`Relaxed`], and using [`Release`] makes the final successful
+    /// load [`Relaxed`]. The (failed) load ordering can only be [`SeqCst`],
+    /// [`Acquire`] or [`Relaxed`] and must be equivalent to or weaker than the
+    /// success ordering.
+    ///
+    /// [`Relaxed`]: Ordering::Relaxed
+    /// [`Acquire`]: Ordering::Acquire
+    /// [`Release`]: Ordering::Release
+    /// [`SeqCst`]: Ordering::SeqCst
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    ///
+    /// let res1 = a.fetch_update(SeqCst, SeqCst, guard, |x| Some(x.with_tag(1)));
+    /// assert!(res1.is_ok());
+    ///
+    /// let res2 = a.fetch_update(SeqCst, SeqCst, guard, |x| None);
+    /// assert!(res2.is_err());
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn fetch_update<'g, F>(
+        &self,
+        set_order: Ordering,
+        fail_order: Ordering,
+        guard: &'g Guard,
+        mut func: F,
+    ) -> Result<Shared<'g, T>, Shared<'g, T>>
+    where
+        F: FnMut(Shared<'g, T>) -> Option<Shared<'g, T>>,
+    {
+        let mut prev = self.load(fail_order, guard);
+        while let Some(next) = func(prev) {
+            match self.compare_exchange_weak(prev, next, set_order, fail_order, guard) {
+                Ok(shared) => return Ok(shared),
+                Err(next_prev) => prev = next_prev.current,
+            }
+        }
+        Err(prev)
+    }
+
+    /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current
+    /// value is the same as `current`. The tag is also taken into account, so two pointers to the
+    /// same object, but with different tags, will not be considered equal.
+    ///
+    /// The return value is a result indicating whether the new pointer was written. On success the
+    /// pointer that was written is returned. On failure the actual current value and `new` are
+    /// returned.
+    ///
+    /// This method takes a [`CompareAndSetOrdering`] argument which describes the memory
+    /// ordering of this operation.
+    ///
+    /// # Migrating to `compare_exchange`
+    ///
+    /// `compare_and_set` is equivalent to `compare_exchange` with the following mapping for
+    /// memory orderings:
+    ///
+    /// Original | Success | Failure
+    /// -------- | ------- | -------
+    /// Relaxed  | Relaxed | Relaxed
+    /// Acquire  | Acquire | Acquire
+    /// Release  | Release | Relaxed
+    /// AcqRel   | AcqRel  | Acquire
+    /// SeqCst   | SeqCst  | SeqCst
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # #![allow(deprecated)]
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    ///
+    /// let guard = &epoch::pin();
+    /// let curr = a.load(SeqCst, guard);
+    /// let res1 = a.compare_and_set(curr, Shared::null(), SeqCst, guard);
+    /// let res2 = a.compare_and_set(curr, Owned::new(5678), SeqCst, guard);
+    /// # unsafe { drop(curr.into_owned()); } // avoid leak
+    /// ```
+    // TODO: remove in the next major version.
+    #[allow(deprecated)]
+    #[deprecated(note = "Use `compare_exchange` instead")]
+    pub fn compare_and_set<'g, O, P>(
+        &self,
+        current: Shared<'_, T>,
+        new: P,
+        ord: O,
+        guard: &'g Guard,
+    ) -> Result<Shared<'g, T>, CompareAndSetError<'g, T, P>>
+    where
+        O: CompareAndSetOrdering,
+        P: Pointer<T>,
+    {
+        self.compare_exchange(current, new, ord.success(), ord.failure(), guard)
+    }
+
+    /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current
+    /// value is the same as `current`. The tag is also taken into account, so two pointers to the
+    /// same object, but with different tags, will not be considered equal.
+    ///
+    /// Unlike [`compare_and_set`], this method is allowed to spuriously fail even when comparison
+    /// succeeds, which can result in more efficient code on some platforms.  The return value is a
+    /// result indicating whether the new pointer was written. On success the pointer that was
+    /// written is returned. On failure the actual current value and `new` are returned.
+    ///
+    /// This method takes a [`CompareAndSetOrdering`] argument which describes the memory
+    /// ordering of this operation.
+    ///
+    /// [`compare_and_set`]: Atomic::compare_and_set
+    ///
+    /// # Migrating to `compare_exchange_weak`
+    ///
+    /// `compare_and_set_weak` is equivalent to `compare_exchange_weak` with the following mapping for
+    /// memory orderings:
+    ///
+    /// Original | Success | Failure
+    /// -------- | ------- | -------
+    /// Relaxed  | Relaxed | Relaxed
+    /// Acquire  | Acquire | Acquire
+    /// Release  | Release | Relaxed
+    /// AcqRel   | AcqRel  | Acquire
+    /// SeqCst   | SeqCst  | SeqCst
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # #![allow(deprecated)]
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    ///
+    /// let mut new = Owned::new(5678);
+    /// let mut ptr = a.load(SeqCst, guard);
+    /// # unsafe { drop(a.load(SeqCst, guard).into_owned()); } // avoid leak
+    /// loop {
+    ///     match a.compare_and_set_weak(ptr, new, SeqCst, guard) {
+    ///         Ok(p) => {
+    ///             ptr = p;
+    ///             break;
+    ///         }
+    ///         Err(err) => {
+    ///             ptr = err.current;
+    ///             new = err.new;
+    ///         }
+    ///     }
+    /// }
+    ///
+    /// let mut curr = a.load(SeqCst, guard);
+    /// loop {
+    ///     match a.compare_and_set_weak(curr, Shared::null(), SeqCst, guard) {
+    ///         Ok(_) => break,
+    ///         Err(err) => curr = err.current,
+    ///     }
+    /// }
+    /// # unsafe { drop(curr.into_owned()); } // avoid leak
+    /// ```
+    // TODO: remove in the next major version.
+    #[allow(deprecated)]
+    #[deprecated(note = "Use `compare_exchange_weak` instead")]
+    pub fn compare_and_set_weak<'g, O, P>(
+        &self,
+        current: Shared<'_, T>,
+        new: P,
+        ord: O,
+        guard: &'g Guard,
+    ) -> Result<Shared<'g, T>, CompareAndSetError<'g, T, P>>
+    where
+        O: CompareAndSetOrdering,
+        P: Pointer<T>,
+    {
+        self.compare_exchange_weak(current, new, ord.success(), ord.failure(), guard)
+    }
+
+    /// Bitwise "and" with the current tag.
+    ///
+    /// Performs a bitwise "and" operation on the current tag and the argument `val`, and sets the
+    /// new tag to the result. Returns the previous pointer.
+    ///
+    /// This method takes an [`Ordering`] argument which describes the memory ordering of this
+    /// operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::<i32>::from(Shared::null().with_tag(3));
+    /// let guard = &epoch::pin();
+    /// assert_eq!(a.fetch_and(2, SeqCst, guard).tag(), 3);
+    /// assert_eq!(a.load(SeqCst, guard).tag(), 2);
+    /// ```
+    pub fn fetch_and<'g>(&self, val: usize, ord: Ordering, _: &'g Guard) -> Shared<'g, T> {
+        unsafe { Shared::from_usize(self.data.fetch_and(val | !low_bits::<T>(), ord)) }
+    }
+
+    /// Bitwise "or" with the current tag.
+    ///
+    /// Performs a bitwise "or" operation on the current tag and the argument `val`, and sets the
+    /// new tag to the result. Returns the previous pointer.
+    ///
+    /// This method takes an [`Ordering`] argument which describes the memory ordering of this
+    /// operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::<i32>::from(Shared::null().with_tag(1));
+    /// let guard = &epoch::pin();
+    /// assert_eq!(a.fetch_or(2, SeqCst, guard).tag(), 1);
+    /// assert_eq!(a.load(SeqCst, guard).tag(), 3);
+    /// ```
+    pub fn fetch_or<'g>(&self, val: usize, ord: Ordering, _: &'g Guard) -> Shared<'g, T> {
+        unsafe { Shared::from_usize(self.data.fetch_or(val & low_bits::<T>(), ord)) }
+    }
+
+    /// Bitwise "xor" with the current tag.
+    ///
+    /// Performs a bitwise "xor" operation on the current tag and the argument `val`, and sets the
+    /// new tag to the result. Returns the previous pointer.
+    ///
+    /// This method takes an [`Ordering`] argument which describes the memory ordering of this
+    /// operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Shared};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::<i32>::from(Shared::null().with_tag(1));
+    /// let guard = &epoch::pin();
+    /// assert_eq!(a.fetch_xor(3, SeqCst, guard).tag(), 1);
+    /// assert_eq!(a.load(SeqCst, guard).tag(), 2);
+    /// ```
+    pub fn fetch_xor<'g>(&self, val: usize, ord: Ordering, _: &'g Guard) -> Shared<'g, T> {
+        unsafe { Shared::from_usize(self.data.fetch_xor(val & low_bits::<T>(), ord)) }
+    }
+
+    /// Takes ownership of the pointee.
+    ///
+    /// This consumes the atomic and converts it into [`Owned`]. As [`Atomic`] doesn't have a
+    /// destructor and doesn't drop the pointee while [`Owned`] does, this is suitable for
+    /// destructors of data structures.
+    ///
+    /// # Panics
+    ///
+    /// Panics if this pointer is null, but only in debug mode.
+    ///
+    /// # Safety
+    ///
+    /// This method may be called only if the pointer is valid and nobody else is holding a
+    /// reference to the same object.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use std::mem;
+    /// # use crossbeam_epoch::Atomic;
+    /// struct DataStructure {
+    ///     ptr: Atomic<usize>,
+    /// }
+    ///
+    /// impl Drop for DataStructure {
+    ///     fn drop(&mut self) {
+    ///         // By now the DataStructure lives only in our thread and we are sure we don't hold
+    ///         // any Shared or & to it ourselves.
+    ///         unsafe {
+    ///             drop(mem::replace(&mut self.ptr, Atomic::null()).into_owned());
+    ///         }
+    ///     }
+    /// }
+    /// ```
+    pub unsafe fn into_owned(self) -> Owned<T> {
+        Owned::from_usize(self.data.into_inner())
+    }
+
+    /// Takes ownership of the pointee if it is non-null.
+    ///
+    /// This consumes the atomic and converts it into [`Owned`]. As [`Atomic`] doesn't have a
+    /// destructor and doesn't drop the pointee while [`Owned`] does, this is suitable for
+    /// destructors of data structures.
+    ///
+    /// # Safety
+    ///
+    /// This method may be called only if the pointer is valid and nobody else is holding a
+    /// reference to the same object, or the pointer is null.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use std::mem;
+    /// # use crossbeam_epoch::Atomic;
+    /// struct DataStructure {
+    ///     ptr: Atomic<usize>,
+    /// }
+    ///
+    /// impl Drop for DataStructure {
+    ///     fn drop(&mut self) {
+    ///         // By now the DataStructure lives only in our thread and we are sure we don't hold
+    ///         // any Shared or & to it ourselves, but it may be null, so we have to be careful.
+    ///         let old = mem::replace(&mut self.ptr, Atomic::null());
+    ///         unsafe {
+    ///             if let Some(x) = old.try_into_owned() {
+    ///                 drop(x)
+    ///             }
+    ///         }
+    ///     }
+    /// }
+    /// ```
+    pub unsafe fn try_into_owned(self) -> Option<Owned<T>> {
+        let data = self.data.into_inner();
+        if decompose_tag::<T>(data).0 == 0 {
+            None
+        } else {
+            Some(Owned::from_usize(data))
+        }
+    }
+}
+
+impl<T: ?Sized + Pointable> fmt::Debug for Atomic<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let data = self.data.load(Ordering::SeqCst);
+        let (raw, tag) = decompose_tag::<T>(data);
+
+        f.debug_struct("Atomic")
+            .field("raw", &raw)
+            .field("tag", &tag)
+            .finish()
+    }
+}
+
+impl<T: ?Sized + Pointable> fmt::Pointer for Atomic<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let data = self.data.load(Ordering::SeqCst);
+        let (raw, _) = decompose_tag::<T>(data);
+        fmt::Pointer::fmt(&(unsafe { T::deref(raw) as *const _ }), f)
+    }
+}
+
+impl<T: ?Sized + Pointable> Clone for Atomic<T> {
+    /// Returns a copy of the atomic value.
+    ///
+    /// Note that a `Relaxed` load is used here. If you need synchronization, use it with other
+    /// atomics or fences.
+    fn clone(&self) -> Self {
+        let data = self.data.load(Ordering::Relaxed);
+        Atomic::from_usize(data)
+    }
+}
+
+impl<T: ?Sized + Pointable> Default for Atomic<T> {
+    fn default() -> Self {
+        Atomic::null()
+    }
+}
+
+impl<T: ?Sized + Pointable> From<Owned<T>> for Atomic<T> {
+    /// Returns a new atomic pointer pointing to `owned`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{Atomic, Owned};
+    ///
+    /// let a = Atomic::<i32>::from(Owned::new(1234));
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    fn from(owned: Owned<T>) -> Self {
+        let data = owned.data;
+        mem::forget(owned);
+        Self::from_usize(data)
+    }
+}
+
+impl<T> From<Box<T>> for Atomic<T> {
+    fn from(b: Box<T>) -> Self {
+        Self::from(Owned::from(b))
+    }
+}
+
+impl<T> From<T> for Atomic<T> {
+    fn from(t: T) -> Self {
+        Self::new(t)
+    }
+}
+
+impl<'g, T: ?Sized + Pointable> From<Shared<'g, T>> for Atomic<T> {
+    /// Returns a new atomic pointer pointing to `ptr`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{Atomic, Shared};
+    ///
+    /// let a = Atomic::<i32>::from(Shared::<i32>::null());
+    /// ```
+    fn from(ptr: Shared<'g, T>) -> Self {
+        Self::from_usize(ptr.data)
+    }
+}
+
+impl<T> From<*const T> for Atomic<T> {
+    /// Returns a new atomic pointer pointing to `raw`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::ptr;
+    /// use crossbeam_epoch::Atomic;
+    ///
+    /// let a = Atomic::<i32>::from(ptr::null::<i32>());
+    /// ```
+    fn from(raw: *const T) -> Self {
+        Self::from_usize(raw as usize)
+    }
+}
+
+/// A trait for either `Owned` or `Shared` pointers.
+pub trait Pointer<T: ?Sized + Pointable> {
+    /// Returns the machine representation of the pointer.
+    fn into_usize(self) -> usize;
+
+    /// Returns a new pointer pointing to the tagged pointer `data`.
+    ///
+    /// # Safety
+    ///
+    /// The given `data` should have been created by `Pointer::into_usize()`, and one `data` should
+    /// not be converted back by `Pointer::from_usize()` multiple times.
+    unsafe fn from_usize(data: usize) -> Self;
+}
+
+/// An owned heap-allocated object.
+///
+/// This type is very similar to `Box<T>`.
+///
+/// The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused
+/// least significant bits of the address.
+pub struct Owned<T: ?Sized + Pointable> {
+    data: usize,
+    _marker: PhantomData<Box<T>>,
+}
+
+impl<T: ?Sized + Pointable> Pointer<T> for Owned<T> {
+    #[inline]
+    fn into_usize(self) -> usize {
+        let data = self.data;
+        mem::forget(self);
+        data
+    }
+
+    /// Returns a new pointer pointing to the tagged pointer `data`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if the data is zero in debug mode.
+    #[inline]
+    unsafe fn from_usize(data: usize) -> Self {
+        debug_assert!(data != 0, "converting zero into `Owned`");
+        Owned {
+            data,
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl<T> Owned<T> {
+    /// Returns a new owned pointer pointing to `raw`.
+    ///
+    /// This function is unsafe because improper use may lead to memory problems. Argument `raw`
+    /// must be a valid pointer. Also, a double-free may occur if the function is called twice on
+    /// the same raw pointer.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `raw` is not properly aligned.
+    ///
+    /// # Safety
+    ///
+    /// The given `raw` should have been derived from `Owned`, and one `raw` should not be converted
+    /// back by `Owned::from_raw()` multiple times.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Owned;
+    ///
+    /// let o = unsafe { Owned::from_raw(Box::into_raw(Box::new(1234))) };
+    /// ```
+    pub unsafe fn from_raw(raw: *mut T) -> Owned<T> {
+        let raw = raw as usize;
+        ensure_aligned::<T>(raw);
+        Self::from_usize(raw)
+    }
+
+    /// Converts the owned pointer into a `Box`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Owned;
+    ///
+    /// let o = Owned::new(1234);
+    /// let b: Box<i32> = o.into_box();
+    /// assert_eq!(*b, 1234);
+    /// ```
+    pub fn into_box(self) -> Box<T> {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        mem::forget(self);
+        unsafe { Box::from_raw(raw as *mut _) }
+    }
+
+    /// Allocates `value` on the heap and returns a new owned pointer pointing to it.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Owned;
+    ///
+    /// let o = Owned::new(1234);
+    /// ```
+    pub fn new(init: T) -> Owned<T> {
+        Self::init(init)
+    }
+}
+
+impl<T: ?Sized + Pointable> Owned<T> {
+    /// Allocates `value` on the heap and returns a new owned pointer pointing to it.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Owned;
+    ///
+    /// let o = Owned::<i32>::init(1234);
+    /// ```
+    pub fn init(init: T::Init) -> Owned<T> {
+        unsafe { Self::from_usize(T::init(init)) }
+    }
+
+    /// Converts the owned pointer into a [`Shared`].
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Owned};
+    ///
+    /// let o = Owned::new(1234);
+    /// let guard = &epoch::pin();
+    /// let p = o.into_shared(guard);
+    /// # unsafe { drop(p.into_owned()); } // avoid leak
+    /// ```
+    #[allow(clippy::needless_lifetimes)]
+    pub fn into_shared<'g>(self, _: &'g Guard) -> Shared<'g, T> {
+        unsafe { Shared::from_usize(self.into_usize()) }
+    }
+
+    /// Returns the tag stored within the pointer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Owned;
+    ///
+    /// assert_eq!(Owned::new(1234).tag(), 0);
+    /// ```
+    pub fn tag(&self) -> usize {
+        let (_, tag) = decompose_tag::<T>(self.data);
+        tag
+    }
+
+    /// Returns the same pointer, but tagged with `tag`. `tag` is truncated to be fit into the
+    /// unused bits of the pointer to `T`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Owned;
+    ///
+    /// let o = Owned::new(0u64);
+    /// assert_eq!(o.tag(), 0);
+    /// let o = o.with_tag(2);
+    /// assert_eq!(o.tag(), 2);
+    /// ```
+    pub fn with_tag(self, tag: usize) -> Owned<T> {
+        let data = self.into_usize();
+        unsafe { Self::from_usize(compose_tag::<T>(data, tag)) }
+    }
+}
+
+impl<T: ?Sized + Pointable> Drop for Owned<T> {
+    fn drop(&mut self) {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        unsafe {
+            T::drop(raw);
+        }
+    }
+}
+
+impl<T: ?Sized + Pointable> fmt::Debug for Owned<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let (raw, tag) = decompose_tag::<T>(self.data);
+
+        f.debug_struct("Owned")
+            .field("raw", &raw)
+            .field("tag", &tag)
+            .finish()
+    }
+}
+
+impl<T: Clone> Clone for Owned<T> {
+    fn clone(&self) -> Self {
+        Owned::new((**self).clone()).with_tag(self.tag())
+    }
+}
+
+impl<T: ?Sized + Pointable> Deref for Owned<T> {
+    type Target = T;
+
+    fn deref(&self) -> &T {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        unsafe { T::deref(raw) }
+    }
+}
+
+impl<T: ?Sized + Pointable> DerefMut for Owned<T> {
+    fn deref_mut(&mut self) -> &mut T {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        unsafe { T::deref_mut(raw) }
+    }
+}
+
+impl<T> From<T> for Owned<T> {
+    fn from(t: T) -> Self {
+        Owned::new(t)
+    }
+}
+
+impl<T> From<Box<T>> for Owned<T> {
+    /// Returns a new owned pointer pointing to `b`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if the pointer (the `Box`) is not properly aligned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Owned;
+    ///
+    /// let o = unsafe { Owned::from_raw(Box::into_raw(Box::new(1234))) };
+    /// ```
+    fn from(b: Box<T>) -> Self {
+        unsafe { Self::from_raw(Box::into_raw(b)) }
+    }
+}
+
+impl<T: ?Sized + Pointable> Borrow<T> for Owned<T> {
+    fn borrow(&self) -> &T {
+        self.deref()
+    }
+}
+
+impl<T: ?Sized + Pointable> BorrowMut<T> for Owned<T> {
+    fn borrow_mut(&mut self) -> &mut T {
+        self.deref_mut()
+    }
+}
+
+impl<T: ?Sized + Pointable> AsRef<T> for Owned<T> {
+    fn as_ref(&self) -> &T {
+        self.deref()
+    }
+}
+
+impl<T: ?Sized + Pointable> AsMut<T> for Owned<T> {
+    fn as_mut(&mut self) -> &mut T {
+        self.deref_mut()
+    }
+}
+
+/// A pointer to an object protected by the epoch GC.
+///
+/// The pointer is valid for use only during the lifetime `'g`.
+///
+/// The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused
+/// least significant bits of the address.
+pub struct Shared<'g, T: 'g + ?Sized + Pointable> {
+    data: usize,
+    _marker: PhantomData<(&'g (), *const T)>,
+}
+
+impl<T: ?Sized + Pointable> Clone for Shared<'_, T> {
+    fn clone(&self) -> Self {
+        *self
+    }
+}
+
+impl<T: ?Sized + Pointable> Copy for Shared<'_, T> {}
+
+impl<T: ?Sized + Pointable> Pointer<T> for Shared<'_, T> {
+    #[inline]
+    fn into_usize(self) -> usize {
+        self.data
+    }
+
+    #[inline]
+    unsafe fn from_usize(data: usize) -> Self {
+        Shared {
+            data,
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl<'g, T> Shared<'g, T> {
+    /// Converts the pointer to a raw pointer (without the tag).
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let o = Owned::new(1234);
+    /// let raw = &*o as *const _;
+    /// let a = Atomic::from(o);
+    ///
+    /// let guard = &epoch::pin();
+    /// let p = a.load(SeqCst, guard);
+    /// assert_eq!(p.as_raw(), raw);
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn as_raw(&self) -> *const T {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        raw as *const _
+    }
+}
+
+impl<'g, T: ?Sized + Pointable> Shared<'g, T> {
+    /// Returns a new null pointer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Shared;
+    ///
+    /// let p = Shared::<i32>::null();
+    /// assert!(p.is_null());
+    /// ```
+    pub fn null() -> Shared<'g, T> {
+        Shared {
+            data: 0,
+            _marker: PhantomData,
+        }
+    }
+
+    /// Returns `true` if the pointer is null.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::null();
+    /// let guard = &epoch::pin();
+    /// assert!(a.load(SeqCst, guard).is_null());
+    /// a.store(Owned::new(1234), SeqCst);
+    /// assert!(!a.load(SeqCst, guard).is_null());
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn is_null(&self) -> bool {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        raw == 0
+    }
+
+    /// Dereferences the pointer.
+    ///
+    /// Returns a reference to the pointee that is valid during the lifetime `'g`.
+    ///
+    /// # Safety
+    ///
+    /// Dereferencing a pointer is unsafe because it could be pointing to invalid memory.
+    ///
+    /// Another concern is the possibility of data races due to lack of proper synchronization.
+    /// For example, consider the following scenario:
+    ///
+    /// 1. A thread creates a new object: `a.store(Owned::new(10), Relaxed)`
+    /// 2. Another thread reads it: `*a.load(Relaxed, guard).as_ref().unwrap()`
+    ///
+    /// The problem is that relaxed orderings don't synchronize initialization of the object with
+    /// the read from the second thread. This is a data race. A possible solution would be to use
+    /// `Release` and `Acquire` orderings.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    /// let p = a.load(SeqCst, guard);
+    /// unsafe {
+    ///     assert_eq!(p.deref(), &1234);
+    /// }
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub unsafe fn deref(&self) -> &'g T {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        T::deref(raw)
+    }
+
+    /// Dereferences the pointer.
+    ///
+    /// Returns a mutable reference to the pointee that is valid during the lifetime `'g`.
+    ///
+    /// # Safety
+    ///
+    /// * There is no guarantee that there are no more threads attempting to read/write from/to the
+    ///   actual object at the same time.
+    ///
+    ///   The user must know that there are no concurrent accesses towards the object itself.
+    ///
+    /// * Other than the above, all safety concerns of `deref()` applies here.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(vec![1, 2, 3, 4]);
+    /// let guard = &epoch::pin();
+    ///
+    /// let mut p = a.load(SeqCst, guard);
+    /// unsafe {
+    ///     assert!(!p.is_null());
+    ///     let b = p.deref_mut();
+    ///     assert_eq!(b, &vec![1, 2, 3, 4]);
+    ///     b.push(5);
+    ///     assert_eq!(b, &vec![1, 2, 3, 4, 5]);
+    /// }
+    ///
+    /// let p = a.load(SeqCst, guard);
+    /// unsafe {
+    ///     assert_eq!(p.deref(), &vec![1, 2, 3, 4, 5]);
+    /// }
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub unsafe fn deref_mut(&mut self) -> &'g mut T {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        T::deref_mut(raw)
+    }
+
+    /// Converts the pointer to a reference.
+    ///
+    /// Returns `None` if the pointer is null, or else a reference to the object wrapped in `Some`.
+    ///
+    /// # Safety
+    ///
+    /// Dereferencing a pointer is unsafe because it could be pointing to invalid memory.
+    ///
+    /// Another concern is the possibility of data races due to lack of proper synchronization.
+    /// For example, consider the following scenario:
+    ///
+    /// 1. A thread creates a new object: `a.store(Owned::new(10), Relaxed)`
+    /// 2. Another thread reads it: `*a.load(Relaxed, guard).as_ref().unwrap()`
+    ///
+    /// The problem is that relaxed orderings don't synchronize initialization of the object with
+    /// the read from the second thread. This is a data race. A possible solution would be to use
+    /// `Release` and `Acquire` orderings.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// let guard = &epoch::pin();
+    /// let p = a.load(SeqCst, guard);
+    /// unsafe {
+    ///     assert_eq!(p.as_ref(), Some(&1234));
+    /// }
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub unsafe fn as_ref(&self) -> Option<&'g T> {
+        let (raw, _) = decompose_tag::<T>(self.data);
+        if raw == 0 {
+            None
+        } else {
+            Some(T::deref(raw))
+        }
+    }
+
+    /// Takes ownership of the pointee.
+    ///
+    /// # Panics
+    ///
+    /// Panics if this pointer is null, but only in debug mode.
+    ///
+    /// # Safety
+    ///
+    /// This method may be called only if the pointer is valid and nobody else is holding a
+    /// reference to the same object.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// unsafe {
+    ///     let guard = &epoch::unprotected();
+    ///     let p = a.load(SeqCst, guard);
+    ///     drop(p.into_owned());
+    /// }
+    /// ```
+    pub unsafe fn into_owned(self) -> Owned<T> {
+        debug_assert!(!self.is_null(), "converting a null `Shared` into `Owned`");
+        Owned::from_usize(self.data)
+    }
+
+    /// Takes ownership of the pointee if it is not null.
+    ///
+    /// # Safety
+    ///
+    /// This method may be called only if the pointer is valid and nobody else is holding a
+    /// reference to the same object, or if the pointer is null.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(1234);
+    /// unsafe {
+    ///     let guard = &epoch::unprotected();
+    ///     let p = a.load(SeqCst, guard);
+    ///     if let Some(x) = p.try_into_owned() {
+    ///         drop(x);
+    ///     }
+    /// }
+    /// ```
+    pub unsafe fn try_into_owned(self) -> Option<Owned<T>> {
+        if self.is_null() {
+            None
+        } else {
+            Some(Owned::from_usize(self.data))
+        }
+    }
+
+    /// Returns the tag stored within the pointer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::<u64>::from(Owned::new(0u64).with_tag(2));
+    /// let guard = &epoch::pin();
+    /// let p = a.load(SeqCst, guard);
+    /// assert_eq!(p.tag(), 2);
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn tag(&self) -> usize {
+        let (_, tag) = decompose_tag::<T>(self.data);
+        tag
+    }
+
+    /// Returns the same pointer, but tagged with `tag`. `tag` is truncated to be fit into the
+    /// unused bits of the pointer to `T`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(0u64);
+    /// let guard = &epoch::pin();
+    /// let p1 = a.load(SeqCst, guard);
+    /// let p2 = p1.with_tag(2);
+    ///
+    /// assert_eq!(p1.tag(), 0);
+    /// assert_eq!(p2.tag(), 2);
+    /// assert_eq!(p1.as_raw(), p2.as_raw());
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn with_tag(&self, tag: usize) -> Shared<'g, T> {
+        unsafe { Self::from_usize(compose_tag::<T>(self.data, tag)) }
+    }
+}
+
+impl<T> From<*const T> for Shared<'_, T> {
+    /// Returns a new pointer pointing to `raw`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `raw` is not properly aligned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::Shared;
+    ///
+    /// let p = Shared::from(Box::into_raw(Box::new(1234)) as *const _);
+    /// assert!(!p.is_null());
+    /// # unsafe { drop(p.into_owned()); } // avoid leak
+    /// ```
+    fn from(raw: *const T) -> Self {
+        let raw = raw as usize;
+        ensure_aligned::<T>(raw);
+        unsafe { Self::from_usize(raw) }
+    }
+}
+
+impl<'g, T: ?Sized + Pointable> PartialEq<Shared<'g, T>> for Shared<'g, T> {
+    fn eq(&self, other: &Self) -> bool {
+        self.data == other.data
+    }
+}
+
+impl<T: ?Sized + Pointable> Eq for Shared<'_, T> {}
+
+impl<'g, T: ?Sized + Pointable> PartialOrd<Shared<'g, T>> for Shared<'g, T> {
+    fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
+        self.data.partial_cmp(&other.data)
+    }
+}
+
+impl<T: ?Sized + Pointable> Ord for Shared<'_, T> {
+    fn cmp(&self, other: &Self) -> cmp::Ordering {
+        self.data.cmp(&other.data)
+    }
+}
+
+impl<T: ?Sized + Pointable> fmt::Debug for Shared<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let (raw, tag) = decompose_tag::<T>(self.data);
+
+        f.debug_struct("Shared")
+            .field("raw", &raw)
+            .field("tag", &tag)
+            .finish()
+    }
+}
+
+impl<T: ?Sized + Pointable> fmt::Pointer for Shared<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt::Pointer::fmt(&(unsafe { self.deref() as *const _ }), f)
+    }
+}
+
+impl<T: ?Sized + Pointable> Default for Shared<'_, T> {
+    fn default() -> Self {
+        Shared::null()
+    }
+}
+
+#[cfg(all(test, not(crossbeam_loom)))]
+mod tests {
+    use super::{Owned, Shared};
+    use std::mem::MaybeUninit;
+
+    #[test]
+    fn valid_tag_i8() {
+        Shared::<i8>::null().with_tag(0);
+    }
+
+    #[test]
+    fn valid_tag_i64() {
+        Shared::<i64>::null().with_tag(7);
+    }
+
+    #[test]
+    fn const_atomic_null() {
+        use super::Atomic;
+        static _U: Atomic<u8> = Atomic::<u8>::null();
+    }
+
+    #[test]
+    fn array_init() {
+        let owned = Owned::<[MaybeUninit<usize>]>::init(10);
+        let arr: &[MaybeUninit<usize>] = &owned;
+        assert_eq!(arr.len(), 10);
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/collector.rs.html b/src/crossbeam_epoch/collector.rs.html new file mode 100644 index 0000000000..cc1febf50f --- /dev/null +++ b/src/crossbeam_epoch/collector.rs.html @@ -0,0 +1,931 @@ +collector.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+
/// Epoch-based garbage collector.
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_epoch::Collector;
+///
+/// let collector = Collector::new();
+///
+/// let handle = collector.register();
+/// drop(collector); // `handle` still works after dropping `collector`
+///
+/// handle.pin().flush();
+/// ```
+use core::fmt;
+
+use crate::guard::Guard;
+use crate::internal::{Global, Local};
+use crate::primitive::sync::Arc;
+
+/// An epoch-based garbage collector.
+pub struct Collector {
+    pub(crate) global: Arc<Global>,
+}
+
+unsafe impl Send for Collector {}
+unsafe impl Sync for Collector {}
+
+impl Default for Collector {
+    fn default() -> Self {
+        Self {
+            global: Arc::new(Global::new()),
+        }
+    }
+}
+
+impl Collector {
+    /// Creates a new collector.
+    pub fn new() -> Self {
+        Self::default()
+    }
+
+    /// Registers a new handle for the collector.
+    pub fn register(&self) -> LocalHandle {
+        Local::register(self)
+    }
+}
+
+impl Clone for Collector {
+    /// Creates another reference to the same garbage collector.
+    fn clone(&self) -> Self {
+        Collector {
+            global: self.global.clone(),
+        }
+    }
+}
+
+impl fmt::Debug for Collector {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Collector { .. }")
+    }
+}
+
+impl PartialEq for Collector {
+    /// Checks if both handles point to the same collector.
+    fn eq(&self, rhs: &Collector) -> bool {
+        Arc::ptr_eq(&self.global, &rhs.global)
+    }
+}
+impl Eq for Collector {}
+
+/// A handle to a garbage collector.
+pub struct LocalHandle {
+    pub(crate) local: *const Local,
+}
+
+impl LocalHandle {
+    /// Pins the handle.
+    #[inline]
+    pub fn pin(&self) -> Guard {
+        unsafe { (*self.local).pin() }
+    }
+
+    /// Returns `true` if the handle is pinned.
+    #[inline]
+    pub fn is_pinned(&self) -> bool {
+        unsafe { (*self.local).is_pinned() }
+    }
+
+    /// Returns the `Collector` associated with this handle.
+    #[inline]
+    pub fn collector(&self) -> &Collector {
+        unsafe { (*self.local).collector() }
+    }
+}
+
+impl Drop for LocalHandle {
+    #[inline]
+    fn drop(&mut self) {
+        unsafe {
+            Local::release_handle(&*self.local);
+        }
+    }
+}
+
+impl fmt::Debug for LocalHandle {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("LocalHandle { .. }")
+    }
+}
+
+#[cfg(all(test, not(crossbeam_loom)))]
+mod tests {
+    use std::mem::ManuallyDrop;
+    use std::sync::atomic::{AtomicUsize, Ordering};
+
+    use crossbeam_utils::thread;
+
+    use crate::{Collector, Owned};
+
+    const NUM_THREADS: usize = 8;
+
+    #[test]
+    fn pin_reentrant() {
+        let collector = Collector::new();
+        let handle = collector.register();
+        drop(collector);
+
+        assert!(!handle.is_pinned());
+        {
+            let _guard = &handle.pin();
+            assert!(handle.is_pinned());
+            {
+                let _guard = &handle.pin();
+                assert!(handle.is_pinned());
+            }
+            assert!(handle.is_pinned());
+        }
+        assert!(!handle.is_pinned());
+    }
+
+    #[test]
+    fn flush_local_bag() {
+        let collector = Collector::new();
+        let handle = collector.register();
+        drop(collector);
+
+        for _ in 0..100 {
+            let guard = &handle.pin();
+            unsafe {
+                let a = Owned::new(7).into_shared(guard);
+                guard.defer_destroy(a);
+
+                assert!(!(*guard.local).bag.with(|b| (*b).is_empty()));
+
+                while !(*guard.local).bag.with(|b| (*b).is_empty()) {
+                    guard.flush();
+                }
+            }
+        }
+    }
+
+    #[test]
+    fn garbage_buffering() {
+        let collector = Collector::new();
+        let handle = collector.register();
+        drop(collector);
+
+        let guard = &handle.pin();
+        unsafe {
+            for _ in 0..10 {
+                let a = Owned::new(7).into_shared(guard);
+                guard.defer_destroy(a);
+            }
+            assert!(!(*guard.local).bag.with(|b| (*b).is_empty()));
+        }
+    }
+
+    #[test]
+    fn pin_holds_advance() {
+        #[cfg(miri)]
+        const N: usize = 500;
+        #[cfg(not(miri))]
+        const N: usize = 500_000;
+
+        let collector = Collector::new();
+
+        thread::scope(|scope| {
+            for _ in 0..NUM_THREADS {
+                scope.spawn(|_| {
+                    let handle = collector.register();
+                    for _ in 0..N {
+                        let guard = &handle.pin();
+
+                        let before = collector.global.epoch.load(Ordering::Relaxed);
+                        collector.global.collect(guard);
+                        let after = collector.global.epoch.load(Ordering::Relaxed);
+
+                        assert!(after.wrapping_sub(before) <= 2);
+                    }
+                });
+            }
+        })
+        .unwrap();
+    }
+
+    #[cfg(not(crossbeam_sanitize))] // TODO: assertions failed due to `cfg(crossbeam_sanitize)` reduce `internal::MAX_OBJECTS`
+    #[test]
+    fn incremental() {
+        #[cfg(miri)]
+        const COUNT: usize = 500;
+        #[cfg(not(miri))]
+        const COUNT: usize = 100_000;
+        static DESTROYS: AtomicUsize = AtomicUsize::new(0);
+
+        let collector = Collector::new();
+        let handle = collector.register();
+
+        unsafe {
+            let guard = &handle.pin();
+            for _ in 0..COUNT {
+                let a = Owned::new(7i32).into_shared(guard);
+                guard.defer_unchecked(move || {
+                    drop(a.into_owned());
+                    DESTROYS.fetch_add(1, Ordering::Relaxed);
+                });
+            }
+            guard.flush();
+        }
+
+        let mut last = 0;
+
+        while last < COUNT {
+            let curr = DESTROYS.load(Ordering::Relaxed);
+            assert!(curr - last <= 1024);
+            last = curr;
+
+            let guard = &handle.pin();
+            collector.global.collect(guard);
+        }
+        assert!(DESTROYS.load(Ordering::Relaxed) == COUNT);
+    }
+
+    #[test]
+    fn buffering() {
+        const COUNT: usize = 10;
+        #[cfg(miri)]
+        const N: usize = 500;
+        #[cfg(not(miri))]
+        const N: usize = 100_000;
+        static DESTROYS: AtomicUsize = AtomicUsize::new(0);
+
+        let collector = Collector::new();
+        let handle = collector.register();
+
+        unsafe {
+            let guard = &handle.pin();
+            for _ in 0..COUNT {
+                let a = Owned::new(7i32).into_shared(guard);
+                guard.defer_unchecked(move || {
+                    drop(a.into_owned());
+                    DESTROYS.fetch_add(1, Ordering::Relaxed);
+                });
+            }
+        }
+
+        for _ in 0..N {
+            collector.global.collect(&handle.pin());
+        }
+        assert!(DESTROYS.load(Ordering::Relaxed) < COUNT);
+
+        handle.pin().flush();
+
+        while DESTROYS.load(Ordering::Relaxed) < COUNT {
+            let guard = &handle.pin();
+            collector.global.collect(guard);
+        }
+        assert_eq!(DESTROYS.load(Ordering::Relaxed), COUNT);
+    }
+
+    #[test]
+    fn count_drops() {
+        #[cfg(miri)]
+        const COUNT: usize = 500;
+        #[cfg(not(miri))]
+        const COUNT: usize = 100_000;
+        static DROPS: AtomicUsize = AtomicUsize::new(0);
+
+        struct Elem(#[allow(dead_code)] i32);
+
+        impl Drop for Elem {
+            fn drop(&mut self) {
+                DROPS.fetch_add(1, Ordering::Relaxed);
+            }
+        }
+
+        let collector = Collector::new();
+        let handle = collector.register();
+
+        unsafe {
+            let guard = &handle.pin();
+
+            for _ in 0..COUNT {
+                let a = Owned::new(Elem(7i32)).into_shared(guard);
+                guard.defer_destroy(a);
+            }
+            guard.flush();
+        }
+
+        while DROPS.load(Ordering::Relaxed) < COUNT {
+            let guard = &handle.pin();
+            collector.global.collect(guard);
+        }
+        assert_eq!(DROPS.load(Ordering::Relaxed), COUNT);
+    }
+
+    #[test]
+    fn count_destroy() {
+        #[cfg(miri)]
+        const COUNT: usize = 500;
+        #[cfg(not(miri))]
+        const COUNT: usize = 100_000;
+        static DESTROYS: AtomicUsize = AtomicUsize::new(0);
+
+        let collector = Collector::new();
+        let handle = collector.register();
+
+        unsafe {
+            let guard = &handle.pin();
+
+            for _ in 0..COUNT {
+                let a = Owned::new(7i32).into_shared(guard);
+                guard.defer_unchecked(move || {
+                    drop(a.into_owned());
+                    DESTROYS.fetch_add(1, Ordering::Relaxed);
+                });
+            }
+            guard.flush();
+        }
+
+        while DESTROYS.load(Ordering::Relaxed) < COUNT {
+            let guard = &handle.pin();
+            collector.global.collect(guard);
+        }
+        assert_eq!(DESTROYS.load(Ordering::Relaxed), COUNT);
+    }
+
+    #[test]
+    fn drop_array() {
+        const COUNT: usize = 700;
+        static DROPS: AtomicUsize = AtomicUsize::new(0);
+
+        struct Elem(#[allow(dead_code)] i32);
+
+        impl Drop for Elem {
+            fn drop(&mut self) {
+                DROPS.fetch_add(1, Ordering::Relaxed);
+            }
+        }
+
+        let collector = Collector::new();
+        let handle = collector.register();
+
+        let mut guard = handle.pin();
+
+        let mut v = Vec::with_capacity(COUNT);
+        for i in 0..COUNT {
+            v.push(Elem(i as i32));
+        }
+
+        {
+            let a = Owned::new(v).into_shared(&guard);
+            unsafe {
+                guard.defer_destroy(a);
+            }
+            guard.flush();
+        }
+
+        while DROPS.load(Ordering::Relaxed) < COUNT {
+            guard.repin();
+            collector.global.collect(&guard);
+        }
+        assert_eq!(DROPS.load(Ordering::Relaxed), COUNT);
+    }
+
+    #[test]
+    fn destroy_array() {
+        #[cfg(miri)]
+        const COUNT: usize = 500;
+        #[cfg(not(miri))]
+        const COUNT: usize = 100_000;
+        static DESTROYS: AtomicUsize = AtomicUsize::new(0);
+
+        let collector = Collector::new();
+        let handle = collector.register();
+
+        unsafe {
+            let guard = &handle.pin();
+
+            let mut v = Vec::with_capacity(COUNT);
+            for i in 0..COUNT {
+                v.push(i as i32);
+            }
+
+            let len = v.len();
+            let cap = v.capacity();
+            let ptr = ManuallyDrop::new(v).as_mut_ptr();
+            guard.defer_unchecked(move || {
+                drop(Vec::from_raw_parts(ptr, len, cap));
+                DESTROYS.fetch_add(len, Ordering::Relaxed);
+            });
+            guard.flush();
+        }
+
+        while DESTROYS.load(Ordering::Relaxed) < COUNT {
+            let guard = &handle.pin();
+            collector.global.collect(guard);
+        }
+        assert_eq!(DESTROYS.load(Ordering::Relaxed), COUNT);
+    }
+
+    #[test]
+    fn stress() {
+        const THREADS: usize = 8;
+        #[cfg(miri)]
+        const COUNT: usize = 500;
+        #[cfg(not(miri))]
+        const COUNT: usize = 100_000;
+        static DROPS: AtomicUsize = AtomicUsize::new(0);
+
+        struct Elem(#[allow(dead_code)] i32);
+
+        impl Drop for Elem {
+            fn drop(&mut self) {
+                DROPS.fetch_add(1, Ordering::Relaxed);
+            }
+        }
+
+        let collector = Collector::new();
+
+        thread::scope(|scope| {
+            for _ in 0..THREADS {
+                scope.spawn(|_| {
+                    let handle = collector.register();
+                    for _ in 0..COUNT {
+                        let guard = &handle.pin();
+                        unsafe {
+                            let a = Owned::new(Elem(7i32)).into_shared(guard);
+                            guard.defer_destroy(a);
+                        }
+                    }
+                });
+            }
+        })
+        .unwrap();
+
+        let handle = collector.register();
+        while DROPS.load(Ordering::Relaxed) < COUNT * THREADS {
+            let guard = &handle.pin();
+            collector.global.collect(guard);
+        }
+        assert_eq!(DROPS.load(Ordering::Relaxed), COUNT * THREADS);
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/default.rs.html b/src/crossbeam_epoch/default.rs.html new file mode 100644 index 0000000000..f4f3aeec20 --- /dev/null +++ b/src/crossbeam_epoch/default.rs.html @@ -0,0 +1,189 @@ +default.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+
//! The default garbage collector.
+//!
+//! For each thread, a participant is lazily initialized on its first use, when the current thread
+//! is registered in the default collector.  If initialized, the thread's participant will get
+//! destructed on thread exit, which in turn unregisters the thread.
+
+use crate::collector::{Collector, LocalHandle};
+use crate::guard::Guard;
+use crate::primitive::thread_local;
+#[cfg(not(crossbeam_loom))]
+use crate::sync::once_lock::OnceLock;
+
+fn collector() -> &'static Collector {
+    #[cfg(not(crossbeam_loom))]
+    {
+        /// The global data for the default garbage collector.
+        static COLLECTOR: OnceLock<Collector> = OnceLock::new();
+        COLLECTOR.get_or_init(Collector::new)
+    }
+    // FIXME: loom does not currently provide the equivalent of Lazy:
+    // https://github.com/tokio-rs/loom/issues/263
+    #[cfg(crossbeam_loom)]
+    {
+        loom::lazy_static! {
+            /// The global data for the default garbage collector.
+            static ref COLLECTOR: Collector = Collector::new();
+        }
+        &COLLECTOR
+    }
+}
+
+thread_local! {
+    /// The per-thread participant for the default garbage collector.
+    static HANDLE: LocalHandle = collector().register();
+}
+
+/// Pins the current thread.
+#[inline]
+pub fn pin() -> Guard {
+    with_handle(|handle| handle.pin())
+}
+
+/// Returns `true` if the current thread is pinned.
+#[inline]
+pub fn is_pinned() -> bool {
+    with_handle(|handle| handle.is_pinned())
+}
+
+/// Returns the default global collector.
+pub fn default_collector() -> &'static Collector {
+    collector()
+}
+
+#[inline]
+fn with_handle<F, R>(mut f: F) -> R
+where
+    F: FnMut(&LocalHandle) -> R,
+{
+    HANDLE
+        .try_with(|h| f(h))
+        .unwrap_or_else(|_| f(&collector().register()))
+}
+
+#[cfg(all(test, not(crossbeam_loom)))]
+mod tests {
+    use crossbeam_utils::thread;
+
+    #[test]
+    fn pin_while_exiting() {
+        struct Foo;
+
+        impl Drop for Foo {
+            fn drop(&mut self) {
+                // Pin after `HANDLE` has been dropped. This must not panic.
+                super::pin();
+            }
+        }
+
+        thread_local! {
+            static FOO: Foo = const { Foo };
+        }
+
+        thread::scope(|scope| {
+            scope.spawn(|_| {
+                // Initialize `FOO` and then `HANDLE`.
+                FOO.with(|_| ());
+                super::pin();
+                // At thread exit, `HANDLE` gets dropped first and `FOO` second.
+            });
+        })
+        .unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/deferred.rs.html b/src/crossbeam_epoch/deferred.rs.html new file mode 100644 index 0000000000..eeba1e2ca2 --- /dev/null +++ b/src/crossbeam_epoch/deferred.rs.html @@ -0,0 +1,295 @@ +deferred.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+
use alloc::boxed::Box;
+use core::fmt;
+use core::marker::PhantomData;
+use core::mem::{self, MaybeUninit};
+use core::ptr;
+
+/// Number of words a piece of `Data` can hold.
+///
+/// Three words should be enough for the majority of cases. For example, you can fit inside it the
+/// function pointer together with a fat pointer representing an object that needs to be destroyed.
+const DATA_WORDS: usize = 3;
+
+/// Some space to keep a `FnOnce()` object on the stack.
+type Data = [usize; DATA_WORDS];
+
+/// A `FnOnce()` that is stored inline if small, or otherwise boxed on the heap.
+///
+/// This is a handy way of keeping an unsized `FnOnce()` within a sized structure.
+pub(crate) struct Deferred {
+    call: unsafe fn(*mut u8),
+    data: MaybeUninit<Data>,
+    _marker: PhantomData<*mut ()>, // !Send + !Sync
+}
+
+impl fmt::Debug for Deferred {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
+        f.pad("Deferred { .. }")
+    }
+}
+
+impl Deferred {
+    pub(crate) const NO_OP: Self = {
+        fn no_op_call(_raw: *mut u8) {}
+        Self {
+            call: no_op_call,
+            data: MaybeUninit::uninit(),
+            _marker: PhantomData,
+        }
+    };
+
+    /// Constructs a new `Deferred` from a `FnOnce()`.
+    pub(crate) fn new<F: FnOnce()>(f: F) -> Self {
+        let size = mem::size_of::<F>();
+        let align = mem::align_of::<F>();
+
+        unsafe {
+            if size <= mem::size_of::<Data>() && align <= mem::align_of::<Data>() {
+                let mut data = MaybeUninit::<Data>::uninit();
+                ptr::write(data.as_mut_ptr().cast::<F>(), f);
+
+                unsafe fn call<F: FnOnce()>(raw: *mut u8) {
+                    let f: F = ptr::read(raw.cast::<F>());
+                    f();
+                }
+
+                Deferred {
+                    call: call::<F>,
+                    data,
+                    _marker: PhantomData,
+                }
+            } else {
+                let b: Box<F> = Box::new(f);
+                let mut data = MaybeUninit::<Data>::uninit();
+                ptr::write(data.as_mut_ptr().cast::<Box<F>>(), b);
+
+                unsafe fn call<F: FnOnce()>(raw: *mut u8) {
+                    // It's safe to cast `raw` from `*mut u8` to `*mut Box<F>`, because `raw` is
+                    // originally derived from `*mut Box<F>`.
+                    let b: Box<F> = ptr::read(raw.cast::<Box<F>>());
+                    (*b)();
+                }
+
+                Deferred {
+                    call: call::<F>,
+                    data,
+                    _marker: PhantomData,
+                }
+            }
+        }
+    }
+
+    /// Calls the function.
+    #[inline]
+    pub(crate) fn call(mut self) {
+        let call = self.call;
+        unsafe { call(self.data.as_mut_ptr().cast::<u8>()) };
+    }
+}
+
+#[cfg(all(test, not(crossbeam_loom)))]
+mod tests {
+    use super::Deferred;
+    use std::cell::Cell;
+    use std::convert::identity;
+
+    #[test]
+    fn on_stack() {
+        let fired = &Cell::new(false);
+        let a = [0usize; 1];
+
+        let d = Deferred::new(move || {
+            let _ = identity(a);
+            fired.set(true);
+        });
+
+        assert!(!fired.get());
+        d.call();
+        assert!(fired.get());
+    }
+
+    #[test]
+    fn on_heap() {
+        let fired = &Cell::new(false);
+        let a = [0usize; 10];
+
+        let d = Deferred::new(move || {
+            let _ = identity(a);
+            fired.set(true);
+        });
+
+        assert!(!fired.get());
+        d.call();
+        assert!(fired.get());
+    }
+
+    #[test]
+    fn string() {
+        let a = "hello".to_string();
+        let d = Deferred::new(move || assert_eq!(a, "hello"));
+        d.call();
+    }
+
+    #[test]
+    fn boxed_slice_i32() {
+        let a: Box<[i32]> = vec![2, 3, 5, 7].into_boxed_slice();
+        let d = Deferred::new(move || assert_eq!(*a, [2, 3, 5, 7]));
+        d.call();
+    }
+
+    #[test]
+    fn long_slice_usize() {
+        let a: [usize; 5] = [2, 3, 5, 7, 11];
+        let d = Deferred::new(move || assert_eq!(a, [2, 3, 5, 7, 11]));
+        d.call();
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/epoch.rs.html b/src/crossbeam_epoch/epoch.rs.html new file mode 100644 index 0000000000..cb6c065e08 --- /dev/null +++ b/src/crossbeam_epoch/epoch.rs.html @@ -0,0 +1,267 @@ +epoch.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+
//! The global epoch
+//!
+//! The last bit in this number is unused and is always zero. Every so often the global epoch is
+//! incremented, i.e. we say it "advances". A pinned participant may advance the global epoch only
+//! if all currently pinned participants have been pinned in the current epoch.
+//!
+//! If an object became garbage in some epoch, then we can be sure that after two advancements no
+//! participant will hold a reference to it. That is the crux of safe memory reclamation.
+
+use crate::primitive::sync::atomic::{AtomicUsize, Ordering};
+
+/// An epoch that can be marked as pinned or unpinned.
+///
+/// Internally, the epoch is represented as an integer that wraps around at some unspecified point
+/// and a flag that represents whether it is pinned or unpinned.
+#[derive(Copy, Clone, Default, Debug, Eq, PartialEq)]
+pub(crate) struct Epoch {
+    /// The least significant bit is set if pinned. The rest of the bits hold the epoch.
+    data: usize,
+}
+
+impl Epoch {
+    /// Returns the starting epoch in unpinned state.
+    #[inline]
+    pub(crate) fn starting() -> Self {
+        Self::default()
+    }
+
+    /// Returns the number of epochs `self` is ahead of `rhs`.
+    ///
+    /// Internally, epochs are represented as numbers in the range `(isize::MIN / 2) .. (isize::MAX
+    /// / 2)`, so the returned distance will be in the same interval.
+    pub(crate) fn wrapping_sub(self, rhs: Self) -> isize {
+        // The result is the same with `(self.data & !1).wrapping_sub(rhs.data & !1) as isize >> 1`,
+        // because the possible difference of LSB in `(self.data & !1).wrapping_sub(rhs.data & !1)`
+        // will be ignored in the shift operation.
+        self.data.wrapping_sub(rhs.data & !1) as isize >> 1
+    }
+
+    /// Returns `true` if the epoch is marked as pinned.
+    #[inline]
+    pub(crate) fn is_pinned(self) -> bool {
+        (self.data & 1) == 1
+    }
+
+    /// Returns the same epoch, but marked as pinned.
+    #[inline]
+    pub(crate) fn pinned(self) -> Epoch {
+        Epoch {
+            data: self.data | 1,
+        }
+    }
+
+    /// Returns the same epoch, but marked as unpinned.
+    #[inline]
+    pub(crate) fn unpinned(self) -> Epoch {
+        Epoch {
+            data: self.data & !1,
+        }
+    }
+
+    /// Returns the successor epoch.
+    ///
+    /// The returned epoch will be marked as pinned only if the previous one was as well.
+    #[inline]
+    pub(crate) fn successor(self) -> Epoch {
+        Epoch {
+            data: self.data.wrapping_add(2),
+        }
+    }
+}
+
+/// An atomic value that holds an `Epoch`.
+#[derive(Default, Debug)]
+pub(crate) struct AtomicEpoch {
+    /// Since `Epoch` is just a wrapper around `usize`, an `AtomicEpoch` is similarly represented
+    /// using an `AtomicUsize`.
+    data: AtomicUsize,
+}
+
+impl AtomicEpoch {
+    /// Creates a new atomic epoch.
+    #[inline]
+    pub(crate) fn new(epoch: Epoch) -> Self {
+        let data = AtomicUsize::new(epoch.data);
+        AtomicEpoch { data }
+    }
+
+    /// Loads a value from the atomic epoch.
+    #[inline]
+    pub(crate) fn load(&self, ord: Ordering) -> Epoch {
+        Epoch {
+            data: self.data.load(ord),
+        }
+    }
+
+    /// Stores a value into the atomic epoch.
+    #[inline]
+    pub(crate) fn store(&self, epoch: Epoch, ord: Ordering) {
+        self.data.store(epoch.data, ord);
+    }
+
+    /// Stores a value into the atomic epoch if the current value is the same as `current`.
+    ///
+    /// The return value is a result indicating whether the new value was written and containing
+    /// the previous value. On success this value is guaranteed to be equal to `current`.
+    ///
+    /// This method takes two `Ordering` arguments to describe the memory
+    /// ordering of this operation. `success` describes the required ordering for the
+    /// read-modify-write operation that takes place if the comparison with `current` succeeds.
+    /// `failure` describes the required ordering for the load operation that takes place when
+    /// the comparison fails. Using `Acquire` as success ordering makes the store part
+    /// of this operation `Relaxed`, and using `Release` makes the successful load
+    /// `Relaxed`. The failure ordering can only be `SeqCst`, `Acquire` or `Relaxed`
+    /// and must be equivalent to or weaker than the success ordering.
+    #[inline]
+    pub(crate) fn compare_exchange(
+        &self,
+        current: Epoch,
+        new: Epoch,
+        success: Ordering,
+        failure: Ordering,
+    ) -> Result<Epoch, Epoch> {
+        match self
+            .data
+            .compare_exchange(current.data, new.data, success, failure)
+        {
+            Ok(data) => Ok(Epoch { data }),
+            Err(data) => Err(Epoch { data }),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/guard.rs.html b/src/crossbeam_epoch/guard.rs.html new file mode 100644 index 0000000000..ff39bb6b5f --- /dev/null +++ b/src/crossbeam_epoch/guard.rs.html @@ -0,0 +1,1049 @@ +guard.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+
use core::fmt;
+use core::mem;
+
+use crate::atomic::Shared;
+use crate::collector::Collector;
+use crate::deferred::Deferred;
+use crate::internal::Local;
+
+/// A guard that keeps the current thread pinned.
+///
+/// # Pinning
+///
+/// The current thread is pinned by calling [`pin`], which returns a new guard:
+///
+/// ```
+/// use crossbeam_epoch as epoch;
+///
+/// // It is often convenient to prefix a call to `pin` with a `&` in order to create a reference.
+/// // This is not really necessary, but makes passing references to the guard a bit easier.
+/// let guard = &epoch::pin();
+/// ```
+///
+/// When a guard gets dropped, the current thread is automatically unpinned.
+///
+/// # Pointers on the stack
+///
+/// Having a guard allows us to create pointers on the stack to heap-allocated objects.
+/// For example:
+///
+/// ```
+/// use crossbeam_epoch::{self as epoch, Atomic};
+/// use std::sync::atomic::Ordering::SeqCst;
+///
+/// // Create a heap-allocated number.
+/// let a = Atomic::new(777);
+///
+/// // Pin the current thread.
+/// let guard = &epoch::pin();
+///
+/// // Load the heap-allocated object and create pointer `p` on the stack.
+/// let p = a.load(SeqCst, guard);
+///
+/// // Dereference the pointer and print the value:
+/// if let Some(num) = unsafe { p.as_ref() } {
+///     println!("The number is {}.", num);
+/// }
+/// # unsafe { drop(a.into_owned()); } // avoid leak
+/// ```
+///
+/// # Multiple guards
+///
+/// Pinning is reentrant and it is perfectly legal to create multiple guards. In that case, the
+/// thread will actually be pinned only when the first guard is created and unpinned when the last
+/// one is dropped:
+///
+/// ```
+/// use crossbeam_epoch as epoch;
+///
+/// let guard1 = epoch::pin();
+/// let guard2 = epoch::pin();
+/// assert!(epoch::is_pinned());
+/// drop(guard1);
+/// assert!(epoch::is_pinned());
+/// drop(guard2);
+/// assert!(!epoch::is_pinned());
+/// ```
+///
+/// [`pin`]: super::pin
+pub struct Guard {
+    pub(crate) local: *const Local,
+}
+
+impl Guard {
+    /// Stores a function so that it can be executed at some point after all currently pinned
+    /// threads get unpinned.
+    ///
+    /// This method first stores `f` into the thread-local (or handle-local) cache. If this cache
+    /// becomes full, some functions are moved into the global cache. At the same time, some
+    /// functions from both local and global caches may get executed in order to incrementally
+    /// clean up the caches as they fill up.
+    ///
+    /// There is no guarantee when exactly `f` will be executed. The only guarantee is that it
+    /// won't be executed until all currently pinned threads get unpinned. In theory, `f` might
+    /// never run, but the epoch-based garbage collection will make an effort to execute it
+    /// reasonably soon.
+    ///
+    /// If this method is called from an [`unprotected`] guard, the function will simply be
+    /// executed immediately.
+    pub fn defer<F, R>(&self, f: F)
+    where
+        F: FnOnce() -> R,
+        F: Send + 'static,
+    {
+        unsafe {
+            self.defer_unchecked(f);
+        }
+    }
+
+    /// Stores a function so that it can be executed at some point after all currently pinned
+    /// threads get unpinned.
+    ///
+    /// This method first stores `f` into the thread-local (or handle-local) cache. If this cache
+    /// becomes full, some functions are moved into the global cache. At the same time, some
+    /// functions from both local and global caches may get executed in order to incrementally
+    /// clean up the caches as they fill up.
+    ///
+    /// There is no guarantee when exactly `f` will be executed. The only guarantee is that it
+    /// won't be executed until all currently pinned threads get unpinned. In theory, `f` might
+    /// never run, but the epoch-based garbage collection will make an effort to execute it
+    /// reasonably soon.
+    ///
+    /// If this method is called from an [`unprotected`] guard, the function will simply be
+    /// executed immediately.
+    ///
+    /// # Safety
+    ///
+    /// The given function must not hold reference onto the stack. It is highly recommended that
+    /// the passed function is **always** marked with `move` in order to prevent accidental
+    /// borrows.
+    ///
+    /// ```
+    /// use crossbeam_epoch as epoch;
+    ///
+    /// let guard = &epoch::pin();
+    /// let message = "Hello!";
+    /// unsafe {
+    ///     // ALWAYS use `move` when sending a closure into `defer_unchecked`.
+    ///     guard.defer_unchecked(move || {
+    ///         println!("{}", message);
+    ///     });
+    /// }
+    /// ```
+    ///
+    /// Apart from that, keep in mind that another thread may execute `f`, so anything accessed by
+    /// the closure must be `Send`.
+    ///
+    /// We intentionally didn't require `F: Send`, because Rust's type systems usually cannot prove
+    /// `F: Send` for typical use cases. For example, consider the following code snippet, which
+    /// exemplifies the typical use case of deferring the deallocation of a shared reference:
+    ///
+    /// ```ignore
+    /// let shared = Owned::new(7i32).into_shared(guard);
+    /// guard.defer_unchecked(move || shared.into_owned()); // `Shared` is not `Send`!
+    /// ```
+    ///
+    /// While `Shared` is not `Send`, it's safe for another thread to call the deferred function,
+    /// because it's called only after the grace period and `shared` is no longer shared with other
+    /// threads. But we don't expect type systems to prove this.
+    ///
+    /// # Examples
+    ///
+    /// When a heap-allocated object in a data structure becomes unreachable, it has to be
+    /// deallocated. However, the current thread and other threads may be still holding references
+    /// on the stack to that same object. Therefore it cannot be deallocated before those references
+    /// get dropped. This method can defer deallocation until all those threads get unpinned and
+    /// consequently drop all their references on the stack.
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new("foo");
+    ///
+    /// // Now suppose that `a` is shared among multiple threads and concurrently
+    /// // accessed and modified...
+    ///
+    /// // Pin the current thread.
+    /// let guard = &epoch::pin();
+    ///
+    /// // Steal the object currently stored in `a` and swap it with another one.
+    /// let p = a.swap(Owned::new("bar").into_shared(guard), SeqCst, guard);
+    ///
+    /// if !p.is_null() {
+    ///     // The object `p` is pointing to is now unreachable.
+    ///     // Defer its deallocation until all currently pinned threads get unpinned.
+    ///     unsafe {
+    ///         // ALWAYS use `move` when sending a closure into `defer_unchecked`.
+    ///         guard.defer_unchecked(move || {
+    ///             println!("{} is now being deallocated.", p.deref());
+    ///             // Now we have unique access to the object pointed to by `p` and can turn it
+    ///             // into an `Owned`. Dropping the `Owned` will deallocate the object.
+    ///             drop(p.into_owned());
+    ///         });
+    ///     }
+    /// }
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub unsafe fn defer_unchecked<F, R>(&self, f: F)
+    where
+        F: FnOnce() -> R,
+    {
+        if let Some(local) = self.local.as_ref() {
+            local.defer(Deferred::new(move || drop(f())), self);
+        } else {
+            drop(f());
+        }
+    }
+
+    /// Stores a destructor for an object so that it can be deallocated and dropped at some point
+    /// after all currently pinned threads get unpinned.
+    ///
+    /// This method first stores the destructor into the thread-local (or handle-local) cache. If
+    /// this cache becomes full, some destructors are moved into the global cache. At the same
+    /// time, some destructors from both local and global caches may get executed in order to
+    /// incrementally clean up the caches as they fill up.
+    ///
+    /// There is no guarantee when exactly the destructor will be executed. The only guarantee is
+    /// that it won't be executed until all currently pinned threads get unpinned. In theory, the
+    /// destructor might never run, but the epoch-based garbage collection will make an effort to
+    /// execute it reasonably soon.
+    ///
+    /// If this method is called from an [`unprotected`] guard, the destructor will simply be
+    /// executed immediately.
+    ///
+    /// # Safety
+    ///
+    /// The object must not be reachable by other threads anymore, otherwise it might be still in
+    /// use when the destructor runs.
+    ///
+    /// Apart from that, keep in mind that another thread may execute the destructor, so the object
+    /// must be sendable to other threads.
+    ///
+    /// We intentionally didn't require `T: Send`, because Rust's type systems usually cannot prove
+    /// `T: Send` for typical use cases. For example, consider the following code snippet, which
+    /// exemplifies the typical use case of deferring the deallocation of a shared reference:
+    ///
+    /// ```ignore
+    /// let shared = Owned::new(7i32).into_shared(guard);
+    /// guard.defer_destroy(shared); // `Shared` is not `Send`!
+    /// ```
+    ///
+    /// While `Shared` is not `Send`, it's safe for another thread to call the destructor, because
+    /// it's called only after the grace period and `shared` is no longer shared with other
+    /// threads. But we don't expect type systems to prove this.
+    ///
+    /// # Examples
+    ///
+    /// When a heap-allocated object in a data structure becomes unreachable, it has to be
+    /// deallocated. However, the current thread and other threads may be still holding references
+    /// on the stack to that same object. Therefore it cannot be deallocated before those references
+    /// get dropped. This method can defer deallocation until all those threads get unpinned and
+    /// consequently drop all their references on the stack.
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic, Owned};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new("foo");
+    ///
+    /// // Now suppose that `a` is shared among multiple threads and concurrently
+    /// // accessed and modified...
+    ///
+    /// // Pin the current thread.
+    /// let guard = &epoch::pin();
+    ///
+    /// // Steal the object currently stored in `a` and swap it with another one.
+    /// let p = a.swap(Owned::new("bar").into_shared(guard), SeqCst, guard);
+    ///
+    /// if !p.is_null() {
+    ///     // The object `p` is pointing to is now unreachable.
+    ///     // Defer its deallocation until all currently pinned threads get unpinned.
+    ///     unsafe {
+    ///         guard.defer_destroy(p);
+    ///     }
+    /// }
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub unsafe fn defer_destroy<T>(&self, ptr: Shared<'_, T>) {
+        self.defer_unchecked(move || ptr.into_owned());
+    }
+
+    /// Clears up the thread-local cache of deferred functions by executing them or moving into the
+    /// global cache.
+    ///
+    /// Call this method after deferring execution of a function if you want to get it executed as
+    /// soon as possible. Flushing will make sure it is residing in in the global cache, so that
+    /// any thread has a chance of taking the function and executing it.
+    ///
+    /// If this method is called from an [`unprotected`] guard, it is a no-op (nothing happens).
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch as epoch;
+    ///
+    /// let guard = &epoch::pin();
+    /// guard.defer(move || {
+    ///     println!("This better be printed as soon as possible!");
+    /// });
+    /// guard.flush();
+    /// ```
+    pub fn flush(&self) {
+        if let Some(local) = unsafe { self.local.as_ref() } {
+            local.flush(self);
+        }
+    }
+
+    /// Unpins and then immediately re-pins the thread.
+    ///
+    /// This method is useful when you don't want delay the advancement of the global epoch by
+    /// holding an old epoch. For safety, you should not maintain any guard-based reference across
+    /// the call (the latter is enforced by `&mut self`). The thread will only be repinned if this
+    /// is the only active guard for the current thread.
+    ///
+    /// If this method is called from an [`unprotected`] guard, then the call will be just no-op.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// let a = Atomic::new(777);
+    /// let mut guard = epoch::pin();
+    /// {
+    ///     let p = a.load(SeqCst, &guard);
+    ///     assert_eq!(unsafe { p.as_ref() }, Some(&777));
+    /// }
+    /// guard.repin();
+    /// {
+    ///     let p = a.load(SeqCst, &guard);
+    ///     assert_eq!(unsafe { p.as_ref() }, Some(&777));
+    /// }
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn repin(&mut self) {
+        if let Some(local) = unsafe { self.local.as_ref() } {
+            local.repin();
+        }
+    }
+
+    /// Temporarily unpins the thread, executes the given function and then re-pins the thread.
+    ///
+    /// This method is useful when you need to perform a long-running operation (e.g. sleeping)
+    /// and don't need to maintain any guard-based reference across the call (the latter is enforced
+    /// by `&mut self`). The thread will only be unpinned if this is the only active guard for the
+    /// current thread.
+    ///
+    /// If this method is called from an [`unprotected`] guard, then the passed function is called
+    /// directly without unpinning the thread.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch::{self as epoch, Atomic};
+    /// use std::sync::atomic::Ordering::SeqCst;
+    /// use std::thread;
+    /// use std::time::Duration;
+    ///
+    /// let a = Atomic::new(777);
+    /// let mut guard = epoch::pin();
+    /// {
+    ///     let p = a.load(SeqCst, &guard);
+    ///     assert_eq!(unsafe { p.as_ref() }, Some(&777));
+    /// }
+    /// guard.repin_after(|| thread::sleep(Duration::from_millis(50)));
+    /// {
+    ///     let p = a.load(SeqCst, &guard);
+    ///     assert_eq!(unsafe { p.as_ref() }, Some(&777));
+    /// }
+    /// # unsafe { drop(a.into_owned()); } // avoid leak
+    /// ```
+    pub fn repin_after<F, R>(&mut self, f: F) -> R
+    where
+        F: FnOnce() -> R,
+    {
+        // Ensure the Guard is re-pinned even if the function panics
+        struct ScopeGuard(*const Local);
+        impl Drop for ScopeGuard {
+            fn drop(&mut self) {
+                if let Some(local) = unsafe { self.0.as_ref() } {
+                    mem::forget(local.pin());
+                    local.release_handle();
+                }
+            }
+        }
+
+        if let Some(local) = unsafe { self.local.as_ref() } {
+            // We need to acquire a handle here to ensure the Local doesn't
+            // disappear from under us.
+            local.acquire_handle();
+            local.unpin();
+        }
+
+        let _guard = ScopeGuard(self.local);
+
+        f()
+    }
+
+    /// Returns the `Collector` associated with this guard.
+    ///
+    /// This method is useful when you need to ensure that all guards used with
+    /// a data structure come from the same collector.
+    ///
+    /// If this method is called from an [`unprotected`] guard, then `None` is returned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_epoch as epoch;
+    ///
+    /// let guard1 = epoch::pin();
+    /// let guard2 = epoch::pin();
+    /// assert!(guard1.collector() == guard2.collector());
+    /// ```
+    pub fn collector(&self) -> Option<&Collector> {
+        unsafe { self.local.as_ref().map(|local| local.collector()) }
+    }
+}
+
+impl Drop for Guard {
+    #[inline]
+    fn drop(&mut self) {
+        if let Some(local) = unsafe { self.local.as_ref() } {
+            local.unpin();
+        }
+    }
+}
+
+impl fmt::Debug for Guard {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Guard { .. }")
+    }
+}
+
+/// Returns a reference to a dummy guard that allows unprotected access to [`Atomic`]s.
+///
+/// This guard should be used in special occasions only. Note that it doesn't actually keep any
+/// thread pinned - it's just a fake guard that allows loading from [`Atomic`]s unsafely.
+///
+/// Note that calling [`defer`] with a dummy guard will not defer the function - it will just
+/// execute the function immediately.
+///
+/// If necessary, it's possible to create more dummy guards by cloning: `unprotected().clone()`.
+///
+/// # Safety
+///
+/// Loading and dereferencing data from an [`Atomic`] using this guard is safe only if the
+/// [`Atomic`] is not being concurrently modified by other threads.
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_epoch::{self as epoch, Atomic};
+/// use std::sync::atomic::Ordering::Relaxed;
+///
+/// let a = Atomic::new(7);
+///
+/// unsafe {
+///     // Load `a` without pinning the current thread.
+///     a.load(Relaxed, epoch::unprotected());
+///
+///     // It's possible to create more dummy guards.
+///     let dummy = epoch::unprotected();
+///
+///     dummy.defer(move || {
+///         println!("This gets executed immediately.");
+///     });
+///
+///     // Dropping `dummy` doesn't affect the current thread - it's just a noop.
+/// }
+/// # unsafe { drop(a.into_owned()); } // avoid leak
+/// ```
+///
+/// The most common use of this function is when constructing or destructing a data structure.
+///
+/// For example, we can use a dummy guard in the destructor of a Treiber stack because at that
+/// point no other thread could concurrently modify the [`Atomic`]s we are accessing.
+///
+/// If we were to actually pin the current thread during destruction, that would just unnecessarily
+/// delay garbage collection and incur some performance cost, so in cases like these `unprotected`
+/// is very helpful.
+///
+/// ```
+/// use crossbeam_epoch::{self as epoch, Atomic};
+/// use std::mem::ManuallyDrop;
+/// use std::sync::atomic::Ordering::Relaxed;
+///
+/// struct Stack<T> {
+///     head: Atomic<Node<T>>,
+/// }
+///
+/// struct Node<T> {
+///     data: ManuallyDrop<T>,
+///     next: Atomic<Node<T>>,
+/// }
+///
+/// impl<T> Drop for Stack<T> {
+///     fn drop(&mut self) {
+///         unsafe {
+///             // Unprotected load.
+///             let mut node = self.head.load(Relaxed, epoch::unprotected());
+///
+///             while let Some(n) = node.as_ref() {
+///                 // Unprotected load.
+///                 let next = n.next.load(Relaxed, epoch::unprotected());
+///
+///                 // Take ownership of the node, then drop its data and deallocate it.
+///                 let mut o = node.into_owned();
+///                 ManuallyDrop::drop(&mut o.data);
+///                 drop(o);
+///
+///                 node = next;
+///             }
+///         }
+///     }
+/// }
+/// ```
+///
+/// [`Atomic`]: super::Atomic
+/// [`defer`]: Guard::defer
+#[inline]
+pub unsafe fn unprotected() -> &'static Guard {
+    // An unprotected guard is just a `Guard` with its field `local` set to null.
+    // We make a newtype over `Guard` because `Guard` isn't `Sync`, so can't be directly stored in
+    // a `static`
+    struct GuardWrapper(Guard);
+    unsafe impl Sync for GuardWrapper {}
+    static UNPROTECTED: GuardWrapper = GuardWrapper(Guard {
+        local: core::ptr::null(),
+    });
+    &UNPROTECTED.0
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/internal.rs.html b/src/crossbeam_epoch/internal.rs.html new file mode 100644 index 0000000000..b2e7759724 --- /dev/null +++ b/src/crossbeam_epoch/internal.rs.html @@ -0,0 +1,1203 @@ +internal.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+
//! The global data and participant for garbage collection.
+//!
+//! # Registration
+//!
+//! In order to track all participants in one place, we need some form of participant
+//! registration. When a participant is created, it is registered to a global lock-free
+//! singly-linked list of registries; and when a participant is leaving, it is unregistered from the
+//! list.
+//!
+//! # Pinning
+//!
+//! Every participant contains an integer that tells whether the participant is pinned and if so,
+//! what was the global epoch at the time it was pinned. Participants also hold a pin counter that
+//! aids in periodic global epoch advancement.
+//!
+//! When a participant is pinned, a `Guard` is returned as a witness that the participant is pinned.
+//! Guards are necessary for performing atomic operations, and for freeing/dropping locations.
+//!
+//! # Thread-local bag
+//!
+//! Objects that get unlinked from concurrent data structures must be stashed away until the global
+//! epoch sufficiently advances so that they become safe for destruction. Pointers to such objects
+//! are pushed into a thread-local bag, and when it becomes full, the bag is marked with the current
+//! global epoch and pushed into the global queue of bags. We store objects in thread-local storages
+//! for amortizing the synchronization cost of pushing the garbages to a global queue.
+//!
+//! # Global queue
+//!
+//! Whenever a bag is pushed into a queue, the objects in some bags in the queue are collected and
+//! destroyed along the way. This design reduces contention on data structures. The global queue
+//! cannot be explicitly accessed: the only way to interact with it is by calling functions
+//! `defer()` that adds an object to the thread-local bag, or `collect()` that manually triggers
+//! garbage collection.
+//!
+//! Ideally each instance of concurrent data structure may have its own queue that gets fully
+//! destroyed as soon as the data structure gets dropped.
+
+use crate::primitive::cell::UnsafeCell;
+use crate::primitive::sync::atomic::{self, Ordering};
+use core::cell::Cell;
+use core::mem::{self, ManuallyDrop};
+use core::num::Wrapping;
+use core::{fmt, ptr};
+
+use crossbeam_utils::CachePadded;
+
+use crate::atomic::{Owned, Shared};
+use crate::collector::{Collector, LocalHandle};
+use crate::deferred::Deferred;
+use crate::epoch::{AtomicEpoch, Epoch};
+use crate::guard::{unprotected, Guard};
+use crate::sync::list::{Entry, IsElement, IterError, List};
+use crate::sync::queue::Queue;
+
+/// Maximum number of objects a bag can contain.
+#[cfg(not(any(crossbeam_sanitize, miri)))]
+const MAX_OBJECTS: usize = 64;
+// Makes it more likely to trigger any potential data races.
+#[cfg(any(crossbeam_sanitize, miri))]
+const MAX_OBJECTS: usize = 4;
+
+/// A bag of deferred functions.
+pub(crate) struct Bag {
+    /// Stashed objects.
+    deferreds: [Deferred; MAX_OBJECTS],
+    len: usize,
+}
+
+/// `Bag::try_push()` requires that it is safe for another thread to execute the given functions.
+unsafe impl Send for Bag {}
+
+impl Bag {
+    /// Returns a new, empty bag.
+    pub(crate) fn new() -> Self {
+        Self::default()
+    }
+
+    /// Returns `true` if the bag is empty.
+    pub(crate) fn is_empty(&self) -> bool {
+        self.len == 0
+    }
+
+    /// Attempts to insert a deferred function into the bag.
+    ///
+    /// Returns `Ok(())` if successful, and `Err(deferred)` for the given `deferred` if the bag is
+    /// full.
+    ///
+    /// # Safety
+    ///
+    /// It should be safe for another thread to execute the given function.
+    pub(crate) unsafe fn try_push(&mut self, deferred: Deferred) -> Result<(), Deferred> {
+        if self.len < MAX_OBJECTS {
+            self.deferreds[self.len] = deferred;
+            self.len += 1;
+            Ok(())
+        } else {
+            Err(deferred)
+        }
+    }
+
+    /// Seals the bag with the given epoch.
+    fn seal(self, epoch: Epoch) -> SealedBag {
+        SealedBag { epoch, _bag: self }
+    }
+}
+
+impl Default for Bag {
+    fn default() -> Self {
+        Bag {
+            len: 0,
+            deferreds: [Deferred::NO_OP; MAX_OBJECTS],
+        }
+    }
+}
+
+impl Drop for Bag {
+    fn drop(&mut self) {
+        // Call all deferred functions.
+        for deferred in &mut self.deferreds[..self.len] {
+            let no_op = Deferred::NO_OP;
+            let owned_deferred = mem::replace(deferred, no_op);
+            owned_deferred.call();
+        }
+    }
+}
+
+// can't #[derive(Debug)] because Debug is not implemented for arrays 64 items long
+impl fmt::Debug for Bag {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Bag")
+            .field("deferreds", &&self.deferreds[..self.len])
+            .finish()
+    }
+}
+
+/// A pair of an epoch and a bag.
+#[derive(Default, Debug)]
+struct SealedBag {
+    epoch: Epoch,
+    _bag: Bag,
+}
+
+/// It is safe to share `SealedBag` because `is_expired` only inspects the epoch.
+unsafe impl Sync for SealedBag {}
+
+impl SealedBag {
+    /// Checks if it is safe to drop the bag w.r.t. the given global epoch.
+    fn is_expired(&self, global_epoch: Epoch) -> bool {
+        // A pinned participant can witness at most one epoch advancement. Therefore, any bag that
+        // is within one epoch of the current one cannot be destroyed yet.
+        global_epoch.wrapping_sub(self.epoch) >= 2
+    }
+}
+
+/// The global data for a garbage collector.
+pub(crate) struct Global {
+    /// The intrusive linked list of `Local`s.
+    locals: List<Local>,
+
+    /// The global queue of bags of deferred functions.
+    queue: Queue<SealedBag>,
+
+    /// The global epoch.
+    pub(crate) epoch: CachePadded<AtomicEpoch>,
+}
+
+impl Global {
+    /// Number of bags to destroy.
+    const COLLECT_STEPS: usize = 8;
+
+    /// Creates a new global data for garbage collection.
+    #[inline]
+    pub(crate) fn new() -> Self {
+        Self {
+            locals: List::new(),
+            queue: Queue::new(),
+            epoch: CachePadded::new(AtomicEpoch::new(Epoch::starting())),
+        }
+    }
+
+    /// Pushes the bag into the global queue and replaces the bag with a new empty bag.
+    pub(crate) fn push_bag(&self, bag: &mut Bag, guard: &Guard) {
+        let bag = mem::replace(bag, Bag::new());
+
+        atomic::fence(Ordering::SeqCst);
+
+        let epoch = self.epoch.load(Ordering::Relaxed);
+        self.queue.push(bag.seal(epoch), guard);
+    }
+
+    /// Collects several bags from the global queue and executes deferred functions in them.
+    ///
+    /// Note: This may itself produce garbage and in turn allocate new bags.
+    ///
+    /// `pin()` rarely calls `collect()`, so we want the compiler to place that call on a cold
+    /// path. In other words, we want the compiler to optimize branching for the case when
+    /// `collect()` is not called.
+    #[cold]
+    pub(crate) fn collect(&self, guard: &Guard) {
+        let global_epoch = self.try_advance(guard);
+
+        let steps = if cfg!(crossbeam_sanitize) {
+            usize::max_value()
+        } else {
+            Self::COLLECT_STEPS
+        };
+
+        for _ in 0..steps {
+            match self.queue.try_pop_if(
+                &|sealed_bag: &SealedBag| sealed_bag.is_expired(global_epoch),
+                guard,
+            ) {
+                None => break,
+                Some(sealed_bag) => drop(sealed_bag),
+            }
+        }
+    }
+
+    /// Attempts to advance the global epoch.
+    ///
+    /// The global epoch can advance only if all currently pinned participants have been pinned in
+    /// the current epoch.
+    ///
+    /// Returns the current global epoch.
+    ///
+    /// `try_advance()` is annotated `#[cold]` because it is rarely called.
+    #[cold]
+    pub(crate) fn try_advance(&self, guard: &Guard) -> Epoch {
+        let global_epoch = self.epoch.load(Ordering::Relaxed);
+        atomic::fence(Ordering::SeqCst);
+
+        // TODO(stjepang): `Local`s are stored in a linked list because linked lists are fairly
+        // easy to implement in a lock-free manner. However, traversal can be slow due to cache
+        // misses and data dependencies. We should experiment with other data structures as well.
+        for local in self.locals.iter(guard) {
+            match local {
+                Err(IterError::Stalled) => {
+                    // A concurrent thread stalled this iteration. That thread might also try to
+                    // advance the epoch, in which case we leave the job to it. Otherwise, the
+                    // epoch will not be advanced.
+                    return global_epoch;
+                }
+                Ok(local) => {
+                    let local_epoch = local.epoch.load(Ordering::Relaxed);
+
+                    // If the participant was pinned in a different epoch, we cannot advance the
+                    // global epoch just yet.
+                    if local_epoch.is_pinned() && local_epoch.unpinned() != global_epoch {
+                        return global_epoch;
+                    }
+                }
+            }
+        }
+        atomic::fence(Ordering::Acquire);
+
+        // All pinned participants were pinned in the current global epoch.
+        // Now let's advance the global epoch...
+        //
+        // Note that if another thread already advanced it before us, this store will simply
+        // overwrite the global epoch with the same value. This is true because `try_advance` was
+        // called from a thread that was pinned in `global_epoch`, and the global epoch cannot be
+        // advanced two steps ahead of it.
+        let new_epoch = global_epoch.successor();
+        self.epoch.store(new_epoch, Ordering::Release);
+        new_epoch
+    }
+}
+
+/// Participant for garbage collection.
+#[repr(C)] // Note: `entry` must be the first field
+pub(crate) struct Local {
+    /// A node in the intrusive linked list of `Local`s.
+    entry: Entry,
+
+    /// A reference to the global data.
+    ///
+    /// When all guards and handles get dropped, this reference is destroyed.
+    collector: UnsafeCell<ManuallyDrop<Collector>>,
+
+    /// The local bag of deferred functions.
+    pub(crate) bag: UnsafeCell<Bag>,
+
+    /// The number of guards keeping this participant pinned.
+    guard_count: Cell<usize>,
+
+    /// The number of active handles.
+    handle_count: Cell<usize>,
+
+    /// Total number of pinnings performed.
+    ///
+    /// This is just an auxiliary counter that sometimes kicks off collection.
+    pin_count: Cell<Wrapping<usize>>,
+
+    /// The local epoch.
+    epoch: CachePadded<AtomicEpoch>,
+}
+
+// Make sure `Local` is less than or equal to 2048 bytes.
+// https://github.com/crossbeam-rs/crossbeam/issues/551
+#[cfg(not(any(crossbeam_sanitize, miri)))] // `crossbeam_sanitize` and `miri` reduce the size of `Local`
+#[test]
+fn local_size() {
+    // TODO: https://github.com/crossbeam-rs/crossbeam/issues/869
+    // assert!(
+    //     core::mem::size_of::<Local>() <= 2048,
+    //     "An allocation of `Local` should be <= 2048 bytes."
+    // );
+}
+
+impl Local {
+    /// Number of pinnings after which a participant will execute some deferred functions from the
+    /// global queue.
+    const PINNINGS_BETWEEN_COLLECT: usize = 128;
+
+    /// Registers a new `Local` in the provided `Global`.
+    pub(crate) fn register(collector: &Collector) -> LocalHandle {
+        unsafe {
+            // Since we dereference no pointers in this block, it is safe to use `unprotected`.
+
+            let local = Owned::new(Local {
+                entry: Entry::default(),
+                collector: UnsafeCell::new(ManuallyDrop::new(collector.clone())),
+                bag: UnsafeCell::new(Bag::new()),
+                guard_count: Cell::new(0),
+                handle_count: Cell::new(1),
+                pin_count: Cell::new(Wrapping(0)),
+                epoch: CachePadded::new(AtomicEpoch::new(Epoch::starting())),
+            })
+            .into_shared(unprotected());
+            collector.global.locals.insert(local, unprotected());
+            LocalHandle {
+                local: local.as_raw(),
+            }
+        }
+    }
+
+    /// Returns a reference to the `Global` in which this `Local` resides.
+    #[inline]
+    pub(crate) fn global(&self) -> &Global {
+        &self.collector().global
+    }
+
+    /// Returns a reference to the `Collector` in which this `Local` resides.
+    #[inline]
+    pub(crate) fn collector(&self) -> &Collector {
+        self.collector.with(|c| unsafe { &**c })
+    }
+
+    /// Returns `true` if the current participant is pinned.
+    #[inline]
+    pub(crate) fn is_pinned(&self) -> bool {
+        self.guard_count.get() > 0
+    }
+
+    /// Adds `deferred` to the thread-local bag.
+    ///
+    /// # Safety
+    ///
+    /// It should be safe for another thread to execute the given function.
+    pub(crate) unsafe fn defer(&self, mut deferred: Deferred, guard: &Guard) {
+        let bag = self.bag.with_mut(|b| &mut *b);
+
+        while let Err(d) = bag.try_push(deferred) {
+            self.global().push_bag(bag, guard);
+            deferred = d;
+        }
+    }
+
+    pub(crate) fn flush(&self, guard: &Guard) {
+        let bag = self.bag.with_mut(|b| unsafe { &mut *b });
+
+        if !bag.is_empty() {
+            self.global().push_bag(bag, guard);
+        }
+
+        self.global().collect(guard);
+    }
+
+    /// Pins the `Local`.
+    #[inline]
+    pub(crate) fn pin(&self) -> Guard {
+        let guard = Guard { local: self };
+
+        let guard_count = self.guard_count.get();
+        self.guard_count.set(guard_count.checked_add(1).unwrap());
+
+        if guard_count == 0 {
+            let global_epoch = self.global().epoch.load(Ordering::Relaxed);
+            let new_epoch = global_epoch.pinned();
+
+            // Now we must store `new_epoch` into `self.epoch` and execute a `SeqCst` fence.
+            // The fence makes sure that any future loads from `Atomic`s will not happen before
+            // this store.
+            if cfg!(all(
+                any(target_arch = "x86", target_arch = "x86_64"),
+                not(miri)
+            )) {
+                // HACK(stjepang): On x86 architectures there are two different ways of executing
+                // a `SeqCst` fence.
+                //
+                // 1. `atomic::fence(SeqCst)`, which compiles into a `mfence` instruction.
+                // 2. `_.compare_exchange(_, _, SeqCst, SeqCst)`, which compiles into a `lock cmpxchg`
+                //    instruction.
+                //
+                // Both instructions have the effect of a full barrier, but benchmarks have shown
+                // that the second one makes pinning faster in this particular case.  It is not
+                // clear that this is permitted by the C++ memory model (SC fences work very
+                // differently from SC accesses), but experimental evidence suggests that this
+                // works fine.  Using inline assembly would be a viable (and correct) alternative,
+                // but alas, that is not possible on stable Rust.
+                let current = Epoch::starting();
+                let res = self.epoch.compare_exchange(
+                    current,
+                    new_epoch,
+                    Ordering::SeqCst,
+                    Ordering::SeqCst,
+                );
+                debug_assert!(res.is_ok(), "participant was expected to be unpinned");
+                // We add a compiler fence to make it less likely for LLVM to do something wrong
+                // here.  Formally, this is not enough to get rid of data races; practically,
+                // it should go a long way.
+                atomic::compiler_fence(Ordering::SeqCst);
+            } else {
+                self.epoch.store(new_epoch, Ordering::Relaxed);
+                atomic::fence(Ordering::SeqCst);
+            }
+
+            // Increment the pin counter.
+            let count = self.pin_count.get();
+            self.pin_count.set(count + Wrapping(1));
+
+            // After every `PINNINGS_BETWEEN_COLLECT` try advancing the epoch and collecting
+            // some garbage.
+            if count.0 % Self::PINNINGS_BETWEEN_COLLECT == 0 {
+                self.global().collect(&guard);
+            }
+        }
+
+        guard
+    }
+
+    /// Unpins the `Local`.
+    #[inline]
+    pub(crate) fn unpin(&self) {
+        let guard_count = self.guard_count.get();
+        self.guard_count.set(guard_count - 1);
+
+        if guard_count == 1 {
+            self.epoch.store(Epoch::starting(), Ordering::Release);
+
+            if self.handle_count.get() == 0 {
+                self.finalize();
+            }
+        }
+    }
+
+    /// Unpins and then pins the `Local`.
+    #[inline]
+    pub(crate) fn repin(&self) {
+        let guard_count = self.guard_count.get();
+
+        // Update the local epoch only if there's only one guard.
+        if guard_count == 1 {
+            let epoch = self.epoch.load(Ordering::Relaxed);
+            let global_epoch = self.global().epoch.load(Ordering::Relaxed).pinned();
+
+            // Update the local epoch only if the global epoch is greater than the local epoch.
+            if epoch != global_epoch {
+                // We store the new epoch with `Release` because we need to ensure any memory
+                // accesses from the previous epoch do not leak into the new one.
+                self.epoch.store(global_epoch, Ordering::Release);
+
+                // However, we don't need a following `SeqCst` fence, because it is safe for memory
+                // accesses from the new epoch to be executed before updating the local epoch. At
+                // worse, other threads will see the new epoch late and delay GC slightly.
+            }
+        }
+    }
+
+    /// Increments the handle count.
+    #[inline]
+    pub(crate) fn acquire_handle(&self) {
+        let handle_count = self.handle_count.get();
+        debug_assert!(handle_count >= 1);
+        self.handle_count.set(handle_count + 1);
+    }
+
+    /// Decrements the handle count.
+    #[inline]
+    pub(crate) fn release_handle(&self) {
+        let guard_count = self.guard_count.get();
+        let handle_count = self.handle_count.get();
+        debug_assert!(handle_count >= 1);
+        self.handle_count.set(handle_count - 1);
+
+        if guard_count == 0 && handle_count == 1 {
+            self.finalize();
+        }
+    }
+
+    /// Removes the `Local` from the global linked list.
+    #[cold]
+    fn finalize(&self) {
+        debug_assert_eq!(self.guard_count.get(), 0);
+        debug_assert_eq!(self.handle_count.get(), 0);
+
+        // Temporarily increment handle count. This is required so that the following call to `pin`
+        // doesn't call `finalize` again.
+        self.handle_count.set(1);
+        unsafe {
+            // Pin and move the local bag into the global queue. It's important that `push_bag`
+            // doesn't defer destruction on any new garbage.
+            let guard = &self.pin();
+            self.global()
+                .push_bag(self.bag.with_mut(|b| &mut *b), guard);
+        }
+        // Revert the handle count back to zero.
+        self.handle_count.set(0);
+
+        unsafe {
+            // Take the reference to the `Global` out of this `Local`. Since we're not protected
+            // by a guard at this time, it's crucial that the reference is read before marking the
+            // `Local` as deleted.
+            let collector: Collector = ptr::read(self.collector.with(|c| &*(*c)));
+
+            // Mark this node in the linked list as deleted.
+            self.entry.delete(unprotected());
+
+            // Finally, drop the reference to the global. Note that this might be the last reference
+            // to the `Global`. If so, the global data will be destroyed and all deferred functions
+            // in its queue will be executed.
+            drop(collector);
+        }
+    }
+}
+
+impl IsElement<Self> for Local {
+    fn entry_of(local: &Self) -> &Entry {
+        // SAFETY: `Local` is `repr(C)` and `entry` is the first field of it.
+        unsafe {
+            let entry_ptr = (local as *const Self).cast::<Entry>();
+            &*entry_ptr
+        }
+    }
+
+    unsafe fn element_of(entry: &Entry) -> &Self {
+        // SAFETY: `Local` is `repr(C)` and `entry` is the first field of it.
+        let local_ptr = (entry as *const Entry).cast::<Self>();
+        &*local_ptr
+    }
+
+    unsafe fn finalize(entry: &Entry, guard: &Guard) {
+        guard.defer_destroy(Shared::from(Self::element_of(entry) as *const _));
+    }
+}
+
+#[cfg(all(test, not(crossbeam_loom)))]
+mod tests {
+    use std::sync::atomic::{AtomicUsize, Ordering};
+
+    use super::*;
+
+    #[test]
+    fn check_defer() {
+        static FLAG: AtomicUsize = AtomicUsize::new(0);
+        fn set() {
+            FLAG.store(42, Ordering::Relaxed);
+        }
+
+        let d = Deferred::new(set);
+        assert_eq!(FLAG.load(Ordering::Relaxed), 0);
+        d.call();
+        assert_eq!(FLAG.load(Ordering::Relaxed), 42);
+    }
+
+    #[test]
+    fn check_bag() {
+        static FLAG: AtomicUsize = AtomicUsize::new(0);
+        fn incr() {
+            FLAG.fetch_add(1, Ordering::Relaxed);
+        }
+
+        let mut bag = Bag::new();
+        assert!(bag.is_empty());
+
+        for _ in 0..MAX_OBJECTS {
+            assert!(unsafe { bag.try_push(Deferred::new(incr)).is_ok() });
+            assert!(!bag.is_empty());
+            assert_eq!(FLAG.load(Ordering::Relaxed), 0);
+        }
+
+        let result = unsafe { bag.try_push(Deferred::new(incr)) };
+        assert!(result.is_err());
+        assert!(!bag.is_empty());
+        assert_eq!(FLAG.load(Ordering::Relaxed), 0);
+
+        drop(bag);
+        assert_eq!(FLAG.load(Ordering::Relaxed), MAX_OBJECTS);
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/lib.rs.html b/src/crossbeam_epoch/lib.rs.html new file mode 100644 index 0000000000..1a9b06b372 --- /dev/null +++ b/src/crossbeam_epoch/lib.rs.html @@ -0,0 +1,335 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+
//! Epoch-based memory reclamation.
+//!
+//! An interesting problem concurrent collections deal with comes from the remove operation.
+//! Suppose that a thread removes an element from a lock-free map, while another thread is reading
+//! that same element at the same time. The first thread must wait until the second thread stops
+//! reading the element. Only then it is safe to destruct it.
+//!
+//! Programming languages that come with garbage collectors solve this problem trivially. The
+//! garbage collector will destruct the removed element when no thread can hold a reference to it
+//! anymore.
+//!
+//! This crate implements a basic memory reclamation mechanism, which is based on epochs. When an
+//! element gets removed from a concurrent collection, it is inserted into a pile of garbage and
+//! marked with the current epoch. Every time a thread accesses a collection, it checks the current
+//! epoch, attempts to increment it, and destructs some garbage that became so old that no thread
+//! can be referencing it anymore.
+//!
+//! That is the general mechanism behind epoch-based memory reclamation, but the details are a bit
+//! more complicated. Anyhow, memory reclamation is designed to be fully automatic and something
+//! users of concurrent collections don't have to worry much about.
+//!
+//! # Pointers
+//!
+//! Concurrent collections are built using atomic pointers. This module provides [`Atomic`], which
+//! is just a shared atomic pointer to a heap-allocated object. Loading an [`Atomic`] yields a
+//! [`Shared`], which is an epoch-protected pointer through which the loaded object can be safely
+//! read.
+//!
+//! # Pinning
+//!
+//! Before an [`Atomic`] can be loaded, a participant must be [`pin`]ned. By pinning a participant
+//! we declare that any object that gets removed from now on must not be destructed just
+//! yet. Garbage collection of newly removed objects is suspended until the participant gets
+//! unpinned.
+//!
+//! # Garbage
+//!
+//! Objects that get removed from concurrent collections must be stashed away until all currently
+//! pinned participants get unpinned. Such objects can be stored into a thread-local or global
+//! storage, where they are kept until the right time for their destruction comes.
+//!
+//! There is a global shared instance of garbage queue. You can [`defer`](Guard::defer) the execution of an
+//! arbitrary function until the global epoch is advanced enough. Most notably, concurrent data
+//! structures may defer the deallocation of an object.
+//!
+//! # APIs
+//!
+//! For majority of use cases, just use the default garbage collector by invoking [`pin`]. If you
+//! want to create your own garbage collector, use the [`Collector`] API.
+
+#![doc(test(
+    no_crate_inject,
+    attr(
+        deny(warnings, rust_2018_idioms),
+        allow(dead_code, unused_assignments, unused_variables)
+    )
+))]
+#![warn(
+    missing_docs,
+    missing_debug_implementations,
+    rust_2018_idioms,
+    unreachable_pub
+)]
+#![cfg_attr(not(feature = "std"), no_std)]
+
+#[cfg(crossbeam_loom)]
+extern crate loom_crate as loom;
+
+#[cfg(crossbeam_loom)]
+#[allow(unused_imports, dead_code)]
+mod primitive {
+    pub(crate) mod cell {
+        pub(crate) use loom::cell::UnsafeCell;
+    }
+    pub(crate) mod sync {
+        pub(crate) mod atomic {
+            pub(crate) use loom::sync::atomic::{fence, AtomicPtr, AtomicUsize, Ordering};
+
+            // FIXME: loom does not support compiler_fence at the moment.
+            // https://github.com/tokio-rs/loom/issues/117
+            // we use fence as a stand-in for compiler_fence for the time being.
+            // this may miss some races since fence is stronger than compiler_fence,
+            // but it's the best we can do for the time being.
+            pub(crate) use self::fence as compiler_fence;
+        }
+        pub(crate) use loom::sync::Arc;
+    }
+    pub(crate) use loom::thread_local;
+}
+#[cfg(target_has_atomic = "ptr")]
+#[cfg(not(crossbeam_loom))]
+#[allow(unused_imports, dead_code)]
+mod primitive {
+    pub(crate) mod cell {
+        #[derive(Debug)]
+        #[repr(transparent)]
+        pub(crate) struct UnsafeCell<T>(::core::cell::UnsafeCell<T>);
+
+        // loom's UnsafeCell has a slightly different API than the standard library UnsafeCell.
+        // Since we want the rest of the code to be agnostic to whether it's running under loom or
+        // not, we write this small wrapper that provides the loom-supported API for the standard
+        // library UnsafeCell. This is also what the loom documentation recommends:
+        // https://github.com/tokio-rs/loom#handling-loom-api-differences
+        impl<T> UnsafeCell<T> {
+            #[inline]
+            pub(crate) const fn new(data: T) -> UnsafeCell<T> {
+                UnsafeCell(::core::cell::UnsafeCell::new(data))
+            }
+
+            #[inline]
+            pub(crate) fn with<R>(&self, f: impl FnOnce(*const T) -> R) -> R {
+                f(self.0.get())
+            }
+
+            #[inline]
+            pub(crate) fn with_mut<R>(&self, f: impl FnOnce(*mut T) -> R) -> R {
+                f(self.0.get())
+            }
+        }
+    }
+    pub(crate) mod sync {
+        pub(crate) mod atomic {
+            pub(crate) use core::sync::atomic::{
+                compiler_fence, fence, AtomicPtr, AtomicUsize, Ordering,
+            };
+        }
+        #[cfg(feature = "alloc")]
+        pub(crate) use alloc::sync::Arc;
+    }
+
+    #[cfg(feature = "std")]
+    pub(crate) use std::thread_local;
+}
+
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+extern crate alloc;
+
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+mod atomic;
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+mod collector;
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+mod deferred;
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+mod epoch;
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+mod guard;
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+mod internal;
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+mod sync;
+
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+#[allow(deprecated)]
+pub use crate::atomic::{CompareAndSetError, CompareAndSetOrdering};
+#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
+pub use crate::{
+    atomic::{Atomic, CompareExchangeError, Owned, Pointable, Pointer, Shared},
+    collector::{Collector, LocalHandle},
+    guard::{unprotected, Guard},
+};
+
+#[cfg(feature = "std")]
+mod default;
+#[cfg(feature = "std")]
+pub use crate::default::{default_collector, is_pinned, pin};
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/sync/list.rs.html b/src/crossbeam_epoch/sync/list.rs.html new file mode 100644 index 0000000000..5d37a35ed9 --- /dev/null +++ b/src/crossbeam_epoch/sync/list.rs.html @@ -0,0 +1,977 @@ +list.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+
//! Lock-free intrusive linked list.
+//!
+//! Ideas from Michael.  High Performance Dynamic Lock-Free Hash Tables and List-Based Sets.  SPAA
+//! 2002.  <http://dl.acm.org/citation.cfm?id=564870.564881>
+
+use core::marker::PhantomData;
+use core::sync::atomic::Ordering::{Acquire, Relaxed, Release};
+
+use crate::{unprotected, Atomic, Guard, Shared};
+
+/// An entry in a linked list.
+///
+/// An Entry is accessed from multiple threads, so it would be beneficial to put it in a different
+/// cache-line than thread-local data in terms of performance.
+#[derive(Debug)]
+pub(crate) struct Entry {
+    /// The next entry in the linked list.
+    /// If the tag is 1, this entry is marked as deleted.
+    next: Atomic<Entry>,
+}
+
+/// Implementing this trait asserts that the type `T` can be used as an element in the intrusive
+/// linked list defined in this module. `T` has to contain (or otherwise be linked to) an instance
+/// of `Entry`.
+///
+/// # Example
+///
+/// ```ignore
+/// struct A {
+///     entry: Entry,
+///     data: usize,
+/// }
+///
+/// impl IsElement<A> for A {
+///     fn entry_of(a: &A) -> &Entry {
+///         let entry_ptr = ((a as usize) + offset_of!(A, entry)) as *const Entry;
+///         unsafe { &*entry_ptr }
+///     }
+///
+///     unsafe fn element_of(entry: &Entry) -> &T {
+///         let elem_ptr = ((entry as usize) - offset_of!(A, entry)) as *const T;
+///         &*elem_ptr
+///     }
+///
+///     unsafe fn finalize(entry: &Entry, guard: &Guard) {
+///         guard.defer_destroy(Shared::from(Self::element_of(entry) as *const _));
+///     }
+/// }
+/// ```
+///
+/// This trait is implemented on a type separate from `T` (although it can be just `T`), because
+/// one type might be placeable into multiple lists, in which case it would require multiple
+/// implementations of `IsElement`. In such cases, each struct implementing `IsElement<T>`
+/// represents a distinct `Entry` in `T`.
+///
+/// For example, we can insert the following struct into two lists using `entry1` for one
+/// and `entry2` for the other:
+///
+/// ```ignore
+/// struct B {
+///     entry1: Entry,
+///     entry2: Entry,
+///     data: usize,
+/// }
+/// ```
+///
+pub(crate) trait IsElement<T> {
+    /// Returns a reference to this element's `Entry`.
+    fn entry_of(_: &T) -> &Entry;
+
+    /// Given a reference to an element's entry, returns that element.
+    ///
+    /// ```ignore
+    /// let elem = ListElement::new();
+    /// assert_eq!(elem.entry_of(),
+    ///            unsafe { ListElement::element_of(elem.entry_of()) } );
+    /// ```
+    ///
+    /// # Safety
+    ///
+    /// The caller has to guarantee that the `Entry` is called with was retrieved from an instance
+    /// of the element type (`T`).
+    unsafe fn element_of(_: &Entry) -> &T;
+
+    /// The function that is called when an entry is unlinked from list.
+    ///
+    /// # Safety
+    ///
+    /// The caller has to guarantee that the `Entry` is called with was retrieved from an instance
+    /// of the element type (`T`).
+    unsafe fn finalize(_: &Entry, _: &Guard);
+}
+
+/// A lock-free, intrusive linked list of type `T`.
+#[derive(Debug)]
+pub(crate) struct List<T, C: IsElement<T> = T> {
+    /// The head of the linked list.
+    head: Atomic<Entry>,
+
+    /// The phantom data for using `T` and `C`.
+    _marker: PhantomData<(T, C)>,
+}
+
+/// An iterator used for retrieving values from the list.
+pub(crate) struct Iter<'g, T, C: IsElement<T>> {
+    /// The guard that protects the iteration.
+    guard: &'g Guard,
+
+    /// Pointer from the predecessor to the current entry.
+    pred: &'g Atomic<Entry>,
+
+    /// The current entry.
+    curr: Shared<'g, Entry>,
+
+    /// The list head, needed for restarting iteration.
+    head: &'g Atomic<Entry>,
+
+    /// Logically, we store a borrow of an instance of `T` and
+    /// use the type information from `C`.
+    _marker: PhantomData<(&'g T, C)>,
+}
+
+/// An error that occurs during iteration over the list.
+#[derive(PartialEq, Debug)]
+pub(crate) enum IterError {
+    /// A concurrent thread modified the state of the list at the same place that this iterator
+    /// was inspecting. Subsequent iteration will restart from the beginning of the list.
+    Stalled,
+}
+
+impl Default for Entry {
+    /// Returns the empty entry.
+    fn default() -> Self {
+        Self {
+            next: Atomic::null(),
+        }
+    }
+}
+
+impl Entry {
+    /// Marks this entry as deleted, deferring the actual deallocation to a later iteration.
+    ///
+    /// # Safety
+    ///
+    /// The entry should be a member of a linked list, and it should not have been deleted.
+    /// It should be safe to call `C::finalize` on the entry after the `guard` is dropped, where `C`
+    /// is the associated helper for the linked list.
+    pub(crate) unsafe fn delete(&self, guard: &Guard) {
+        self.next.fetch_or(1, Release, guard);
+    }
+}
+
+impl<T, C: IsElement<T>> List<T, C> {
+    /// Returns a new, empty linked list.
+    pub(crate) fn new() -> Self {
+        Self {
+            head: Atomic::null(),
+            _marker: PhantomData,
+        }
+    }
+
+    /// Inserts `entry` into the head of the list.
+    ///
+    /// # Safety
+    ///
+    /// You should guarantee that:
+    ///
+    /// - `container` is not null
+    /// - `container` is immovable, e.g. inside an `Owned`
+    /// - the same `Entry` is not inserted more than once
+    /// - the inserted object will be removed before the list is dropped
+    pub(crate) unsafe fn insert<'g>(&'g self, container: Shared<'g, T>, guard: &'g Guard) {
+        // Insert right after head, i.e. at the beginning of the list.
+        let to = &self.head;
+        // Get the intrusively stored Entry of the new element to insert.
+        let entry: &Entry = C::entry_of(container.deref());
+        // Make a Shared ptr to that Entry.
+        let entry_ptr = Shared::from(entry as *const _);
+        // Read the current successor of where we want to insert.
+        let mut next = to.load(Relaxed, guard);
+
+        loop {
+            // Set the Entry of the to-be-inserted element to point to the previous successor of
+            // `to`.
+            entry.next.store(next, Relaxed);
+            match to.compare_exchange_weak(next, entry_ptr, Release, Relaxed, guard) {
+                Ok(_) => break,
+                // We lost the race or weak CAS failed spuriously. Update the successor and try
+                // again.
+                Err(err) => next = err.current,
+            }
+        }
+    }
+
+    /// Returns an iterator over all objects.
+    ///
+    /// # Caveat
+    ///
+    /// Every object that is inserted at the moment this function is called and persists at least
+    /// until the end of iteration will be returned. Since this iterator traverses a lock-free
+    /// linked list that may be concurrently modified, some additional caveats apply:
+    ///
+    /// 1. If a new object is inserted during iteration, it may or may not be returned.
+    /// 2. If an object is deleted during iteration, it may or may not be returned.
+    /// 3. The iteration may be aborted when it lost in a race condition. In this case, the winning
+    ///    thread will continue to iterate over the same list.
+    pub(crate) fn iter<'g>(&'g self, guard: &'g Guard) -> Iter<'g, T, C> {
+        Iter {
+            guard,
+            pred: &self.head,
+            curr: self.head.load(Acquire, guard),
+            head: &self.head,
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl<T, C: IsElement<T>> Drop for List<T, C> {
+    fn drop(&mut self) {
+        unsafe {
+            let guard = unprotected();
+            let mut curr = self.head.load(Relaxed, guard);
+            while let Some(c) = curr.as_ref() {
+                let succ = c.next.load(Relaxed, guard);
+                // Verify that all elements have been removed from the list.
+                assert_eq!(succ.tag(), 1);
+
+                C::finalize(curr.deref(), guard);
+                curr = succ;
+            }
+        }
+    }
+}
+
+impl<'g, T: 'g, C: IsElement<T>> Iterator for Iter<'g, T, C> {
+    type Item = Result<&'g T, IterError>;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        while let Some(c) = unsafe { self.curr.as_ref() } {
+            let succ = c.next.load(Acquire, self.guard);
+
+            if succ.tag() == 1 {
+                // This entry was removed. Try unlinking it from the list.
+                let succ = succ.with_tag(0);
+
+                // The tag should always be zero, because removing a node after a logically deleted
+                // node leaves the list in an invalid state.
+                debug_assert!(self.curr.tag() == 0);
+
+                // Try to unlink `curr` from the list, and get the new value of `self.pred`.
+                let succ = match self
+                    .pred
+                    .compare_exchange(self.curr, succ, Acquire, Acquire, self.guard)
+                {
+                    Ok(_) => {
+                        // We succeeded in unlinking `curr`, so we have to schedule
+                        // deallocation. Deferred drop is okay, because `list.delete()` can only be
+                        // called if `T: 'static`.
+                        unsafe {
+                            C::finalize(self.curr.deref(), self.guard);
+                        }
+
+                        // `succ` is the new value of `self.pred`.
+                        succ
+                    }
+                    Err(e) => {
+                        // `e.current` is the current value of `self.pred`.
+                        e.current
+                    }
+                };
+
+                // If the predecessor node is already marked as deleted, we need to restart from
+                // `head`.
+                if succ.tag() != 0 {
+                    self.pred = self.head;
+                    self.curr = self.head.load(Acquire, self.guard);
+
+                    return Some(Err(IterError::Stalled));
+                }
+
+                // Move over the removed by only advancing `curr`, not `pred`.
+                self.curr = succ;
+                continue;
+            }
+
+            // Move one step forward.
+            self.pred = &c.next;
+            self.curr = succ;
+
+            return Some(Ok(unsafe { C::element_of(c) }));
+        }
+
+        // We reached the end of the list.
+        None
+    }
+}
+
+#[cfg(all(test, not(crossbeam_loom)))]
+mod tests {
+    use super::*;
+    use crate::{Collector, Owned};
+    use crossbeam_utils::thread;
+    use std::sync::Barrier;
+
+    impl IsElement<Entry> for Entry {
+        fn entry_of(entry: &Entry) -> &Entry {
+            entry
+        }
+
+        unsafe fn element_of(entry: &Entry) -> &Entry {
+            entry
+        }
+
+        unsafe fn finalize(entry: &Entry, guard: &Guard) {
+            guard.defer_destroy(Shared::from(Self::element_of(entry) as *const _));
+        }
+    }
+
+    /// Checks whether the list retains inserted elements
+    /// and returns them in the correct order.
+    #[test]
+    fn insert() {
+        let collector = Collector::new();
+        let handle = collector.register();
+        let guard = handle.pin();
+
+        let l: List<Entry> = List::new();
+
+        let e1 = Owned::new(Entry::default()).into_shared(&guard);
+        let e2 = Owned::new(Entry::default()).into_shared(&guard);
+        let e3 = Owned::new(Entry::default()).into_shared(&guard);
+
+        unsafe {
+            l.insert(e1, &guard);
+            l.insert(e2, &guard);
+            l.insert(e3, &guard);
+        }
+
+        let mut iter = l.iter(&guard);
+        let maybe_e3 = iter.next();
+        assert!(maybe_e3.is_some());
+        assert!(maybe_e3.unwrap().unwrap() as *const Entry == e3.as_raw());
+        let maybe_e2 = iter.next();
+        assert!(maybe_e2.is_some());
+        assert!(maybe_e2.unwrap().unwrap() as *const Entry == e2.as_raw());
+        let maybe_e1 = iter.next();
+        assert!(maybe_e1.is_some());
+        assert!(maybe_e1.unwrap().unwrap() as *const Entry == e1.as_raw());
+        assert!(iter.next().is_none());
+
+        unsafe {
+            e1.as_ref().unwrap().delete(&guard);
+            e2.as_ref().unwrap().delete(&guard);
+            e3.as_ref().unwrap().delete(&guard);
+        }
+    }
+
+    /// Checks whether elements can be removed from the list and whether
+    /// the correct elements are removed.
+    #[test]
+    fn delete() {
+        let collector = Collector::new();
+        let handle = collector.register();
+        let guard = handle.pin();
+
+        let l: List<Entry> = List::new();
+
+        let e1 = Owned::new(Entry::default()).into_shared(&guard);
+        let e2 = Owned::new(Entry::default()).into_shared(&guard);
+        let e3 = Owned::new(Entry::default()).into_shared(&guard);
+        unsafe {
+            l.insert(e1, &guard);
+            l.insert(e2, &guard);
+            l.insert(e3, &guard);
+            e2.as_ref().unwrap().delete(&guard);
+        }
+
+        let mut iter = l.iter(&guard);
+        let maybe_e3 = iter.next();
+        assert!(maybe_e3.is_some());
+        assert!(maybe_e3.unwrap().unwrap() as *const Entry == e3.as_raw());
+        let maybe_e1 = iter.next();
+        assert!(maybe_e1.is_some());
+        assert!(maybe_e1.unwrap().unwrap() as *const Entry == e1.as_raw());
+        assert!(iter.next().is_none());
+
+        unsafe {
+            e1.as_ref().unwrap().delete(&guard);
+            e3.as_ref().unwrap().delete(&guard);
+        }
+
+        let mut iter = l.iter(&guard);
+        assert!(iter.next().is_none());
+    }
+
+    const THREADS: usize = 8;
+    const ITERS: usize = 512;
+
+    /// Contends the list on insert and delete operations to make sure they can run concurrently.
+    #[test]
+    fn insert_delete_multi() {
+        let collector = Collector::new();
+
+        let l: List<Entry> = List::new();
+        let b = Barrier::new(THREADS);
+
+        thread::scope(|s| {
+            for _ in 0..THREADS {
+                s.spawn(|_| {
+                    b.wait();
+
+                    let handle = collector.register();
+                    let guard: Guard = handle.pin();
+                    let mut v = Vec::with_capacity(ITERS);
+
+                    for _ in 0..ITERS {
+                        let e = Owned::new(Entry::default()).into_shared(&guard);
+                        v.push(e);
+                        unsafe {
+                            l.insert(e, &guard);
+                        }
+                    }
+
+                    for e in v {
+                        unsafe {
+                            e.as_ref().unwrap().delete(&guard);
+                        }
+                    }
+                });
+            }
+        })
+        .unwrap();
+
+        let handle = collector.register();
+        let guard = handle.pin();
+
+        let mut iter = l.iter(&guard);
+        assert!(iter.next().is_none());
+    }
+
+    /// Contends the list on iteration to make sure that it can be iterated over concurrently.
+    #[test]
+    fn iter_multi() {
+        let collector = Collector::new();
+
+        let l: List<Entry> = List::new();
+        let b = Barrier::new(THREADS);
+
+        thread::scope(|s| {
+            for _ in 0..THREADS {
+                s.spawn(|_| {
+                    b.wait();
+
+                    let handle = collector.register();
+                    let guard: Guard = handle.pin();
+                    let mut v = Vec::with_capacity(ITERS);
+
+                    for _ in 0..ITERS {
+                        let e = Owned::new(Entry::default()).into_shared(&guard);
+                        v.push(e);
+                        unsafe {
+                            l.insert(e, &guard);
+                        }
+                    }
+
+                    let mut iter = l.iter(&guard);
+                    for _ in 0..ITERS {
+                        assert!(iter.next().is_some());
+                    }
+
+                    for e in v {
+                        unsafe {
+                            e.as_ref().unwrap().delete(&guard);
+                        }
+                    }
+                });
+            }
+        })
+        .unwrap();
+
+        let handle = collector.register();
+        let guard = handle.pin();
+
+        let mut iter = l.iter(&guard);
+        assert!(iter.next().is_none());
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/sync/mod.rs.html b/src/crossbeam_epoch/sync/mod.rs.html new file mode 100644 index 0000000000..d73cbdcc57 --- /dev/null +++ b/src/crossbeam_epoch/sync/mod.rs.html @@ -0,0 +1,17 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+
//! Synchronization primitives.
+
+pub(crate) mod list;
+#[cfg(feature = "std")]
+#[cfg(not(crossbeam_loom))]
+pub(crate) mod once_lock;
+pub(crate) mod queue;
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/sync/once_lock.rs.html b/src/crossbeam_epoch/sync/once_lock.rs.html new file mode 100644 index 0000000000..a5d5ed9111 --- /dev/null +++ b/src/crossbeam_epoch/sync/once_lock.rs.html @@ -0,0 +1,179 @@ +once_lock.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+
// Based on unstable std::sync::OnceLock.
+//
+// Source: https://github.com/rust-lang/rust/blob/8e9c93df464b7ada3fc7a1c8ccddd9dcb24ee0a0/library/std/src/sync/once_lock.rs
+
+use core::cell::UnsafeCell;
+use core::mem::MaybeUninit;
+use std::sync::Once;
+
+pub(crate) struct OnceLock<T> {
+    once: Once,
+    value: UnsafeCell<MaybeUninit<T>>,
+    // Unlike std::sync::OnceLock, we don't need PhantomData here because
+    // we don't use #[may_dangle].
+}
+
+unsafe impl<T: Sync + Send> Sync for OnceLock<T> {}
+unsafe impl<T: Send> Send for OnceLock<T> {}
+
+impl<T> OnceLock<T> {
+    /// Creates a new empty cell.
+    #[must_use]
+    pub(crate) const fn new() -> Self {
+        Self {
+            once: Once::new(),
+            value: UnsafeCell::new(MaybeUninit::uninit()),
+        }
+    }
+
+    /// Gets the contents of the cell, initializing it with `f` if the cell
+    /// was empty.
+    ///
+    /// Many threads may call `get_or_init` concurrently with different
+    /// initializing functions, but it is guaranteed that only one function
+    /// will be executed.
+    ///
+    /// # Panics
+    ///
+    /// If `f` panics, the panic is propagated to the caller, and the cell
+    /// remains uninitialized.
+    ///
+    /// It is an error to reentrantly initialize the cell from `f`. The
+    /// exact outcome is unspecified. Current implementation deadlocks, but
+    /// this may be changed to a panic in the future.
+    pub(crate) fn get_or_init<F>(&self, f: F) -> &T
+    where
+        F: FnOnce() -> T,
+    {
+        // Fast path check
+        if self.once.is_completed() {
+            // SAFETY: The inner value has been initialized
+            return unsafe { self.get_unchecked() };
+        }
+        self.initialize(f);
+
+        // SAFETY: The inner value has been initialized
+        unsafe { self.get_unchecked() }
+    }
+
+    #[cold]
+    fn initialize<F>(&self, f: F)
+    where
+        F: FnOnce() -> T,
+    {
+        let slot = self.value.get();
+
+        self.once.call_once(|| {
+            let value = f();
+            unsafe { slot.write(MaybeUninit::new(value)) }
+        });
+    }
+
+    /// # Safety
+    ///
+    /// The value must be initialized
+    unsafe fn get_unchecked(&self) -> &T {
+        debug_assert!(self.once.is_completed());
+        &*self.value.get().cast::<T>()
+    }
+}
+
+impl<T> Drop for OnceLock<T> {
+    fn drop(&mut self) {
+        if self.once.is_completed() {
+            // SAFETY: The inner value has been initialized
+            unsafe { (*self.value.get()).assume_init_drop() };
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_epoch/sync/queue.rs.html b/src/crossbeam_epoch/sync/queue.rs.html new file mode 100644 index 0000000000..e741b7f09b --- /dev/null +++ b/src/crossbeam_epoch/sync/queue.rs.html @@ -0,0 +1,939 @@ +queue.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+
//! Michael-Scott lock-free queue.
+//!
+//! Usable with any number of producers and consumers.
+//!
+//! Michael and Scott.  Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue
+//! Algorithms.  PODC 1996.  <http://dl.acm.org/citation.cfm?id=248106>
+//!
+//! Simon Doherty, Lindsay Groves, Victor Luchangco, and Mark Moir. 2004b. Formal Verification of a
+//! Practical Lock-Free Queue Algorithm. <https://doi.org/10.1007/978-3-540-30232-2_7>
+
+use core::mem::MaybeUninit;
+use core::sync::atomic::Ordering::{Acquire, Relaxed, Release};
+
+use crossbeam_utils::CachePadded;
+
+use crate::{unprotected, Atomic, Guard, Owned, Shared};
+
+// The representation here is a singly-linked list, with a sentinel node at the front. In general
+// the `tail` pointer may lag behind the actual tail. Non-sentinel nodes are either all `Data` or
+// all `Blocked` (requests for data from blocked threads).
+#[derive(Debug)]
+pub(crate) struct Queue<T> {
+    head: CachePadded<Atomic<Node<T>>>,
+    tail: CachePadded<Atomic<Node<T>>>,
+}
+
+struct Node<T> {
+    /// The slot in which a value of type `T` can be stored.
+    ///
+    /// The type of `data` is `MaybeUninit<T>` because a `Node<T>` doesn't always contain a `T`.
+    /// For example, the sentinel node in a queue never contains a value: its slot is always empty.
+    /// Other nodes start their life with a push operation and contain a value until it gets popped
+    /// out. After that such empty nodes get added to the collector for destruction.
+    data: MaybeUninit<T>,
+
+    next: Atomic<Node<T>>,
+}
+
+// Any particular `T` should never be accessed concurrently, so no need for `Sync`.
+unsafe impl<T: Send> Sync for Queue<T> {}
+unsafe impl<T: Send> Send for Queue<T> {}
+
+impl<T> Queue<T> {
+    /// Create a new, empty queue.
+    pub(crate) fn new() -> Queue<T> {
+        let q = Queue {
+            head: CachePadded::new(Atomic::null()),
+            tail: CachePadded::new(Atomic::null()),
+        };
+        let sentinel = Owned::new(Node {
+            data: MaybeUninit::uninit(),
+            next: Atomic::null(),
+        });
+        unsafe {
+            let guard = unprotected();
+            let sentinel = sentinel.into_shared(guard);
+            q.head.store(sentinel, Relaxed);
+            q.tail.store(sentinel, Relaxed);
+            q
+        }
+    }
+
+    /// Attempts to atomically place `n` into the `next` pointer of `onto`, and returns `true` on
+    /// success. The queue's `tail` pointer may be updated.
+    #[inline(always)]
+    fn push_internal(
+        &self,
+        onto: Shared<'_, Node<T>>,
+        new: Shared<'_, Node<T>>,
+        guard: &Guard,
+    ) -> bool {
+        // is `onto` the actual tail?
+        let o = unsafe { onto.deref() };
+        let next = o.next.load(Acquire, guard);
+        if unsafe { next.as_ref().is_some() } {
+            // if not, try to "help" by moving the tail pointer forward
+            let _ = self
+                .tail
+                .compare_exchange(onto, next, Release, Relaxed, guard);
+            false
+        } else {
+            // looks like the actual tail; attempt to link in `n`
+            let result = o
+                .next
+                .compare_exchange(Shared::null(), new, Release, Relaxed, guard)
+                .is_ok();
+            if result {
+                // try to move the tail pointer forward
+                let _ = self
+                    .tail
+                    .compare_exchange(onto, new, Release, Relaxed, guard);
+            }
+            result
+        }
+    }
+
+    /// Adds `t` to the back of the queue, possibly waking up threads blocked on `pop`.
+    pub(crate) fn push(&self, t: T, guard: &Guard) {
+        let new = Owned::new(Node {
+            data: MaybeUninit::new(t),
+            next: Atomic::null(),
+        });
+        let new = Owned::into_shared(new, guard);
+
+        loop {
+            // We push onto the tail, so we'll start optimistically by looking there first.
+            let tail = self.tail.load(Acquire, guard);
+
+            // Attempt to push onto the `tail` snapshot; fails if `tail.next` has changed.
+            if self.push_internal(tail, new, guard) {
+                break;
+            }
+        }
+    }
+
+    /// Attempts to pop a data node. `Ok(None)` if queue is empty; `Err(())` if lost race to pop.
+    #[inline(always)]
+    fn pop_internal(&self, guard: &Guard) -> Result<Option<T>, ()> {
+        let head = self.head.load(Acquire, guard);
+        let h = unsafe { head.deref() };
+        let next = h.next.load(Acquire, guard);
+        match unsafe { next.as_ref() } {
+            Some(n) => unsafe {
+                self.head
+                    .compare_exchange(head, next, Release, Relaxed, guard)
+                    .map(|_| {
+                        let tail = self.tail.load(Relaxed, guard);
+                        // Advance the tail so that we don't retire a pointer to a reachable node.
+                        if head == tail {
+                            let _ = self
+                                .tail
+                                .compare_exchange(tail, next, Release, Relaxed, guard);
+                        }
+                        guard.defer_destroy(head);
+                        Some(n.data.assume_init_read())
+                    })
+                    .map_err(|_| ())
+            },
+            None => Ok(None),
+        }
+    }
+
+    /// Attempts to pop a data node, if the data satisfies the given condition. `Ok(None)` if queue
+    /// is empty or the data does not satisfy the condition; `Err(())` if lost race to pop.
+    #[inline(always)]
+    fn pop_if_internal<F>(&self, condition: F, guard: &Guard) -> Result<Option<T>, ()>
+    where
+        T: Sync,
+        F: Fn(&T) -> bool,
+    {
+        let head = self.head.load(Acquire, guard);
+        let h = unsafe { head.deref() };
+        let next = h.next.load(Acquire, guard);
+        match unsafe { next.as_ref() } {
+            Some(n) if condition(unsafe { &*n.data.as_ptr() }) => unsafe {
+                self.head
+                    .compare_exchange(head, next, Release, Relaxed, guard)
+                    .map(|_| {
+                        let tail = self.tail.load(Relaxed, guard);
+                        // Advance the tail so that we don't retire a pointer to a reachable node.
+                        if head == tail {
+                            let _ = self
+                                .tail
+                                .compare_exchange(tail, next, Release, Relaxed, guard);
+                        }
+                        guard.defer_destroy(head);
+                        Some(n.data.assume_init_read())
+                    })
+                    .map_err(|_| ())
+            },
+            None | Some(_) => Ok(None),
+        }
+    }
+
+    /// Attempts to dequeue from the front.
+    ///
+    /// Returns `None` if the queue is observed to be empty.
+    pub(crate) fn try_pop(&self, guard: &Guard) -> Option<T> {
+        loop {
+            if let Ok(head) = self.pop_internal(guard) {
+                return head;
+            }
+        }
+    }
+
+    /// Attempts to dequeue from the front, if the item satisfies the given condition.
+    ///
+    /// Returns `None` if the queue is observed to be empty, or the head does not satisfy the given
+    /// condition.
+    pub(crate) fn try_pop_if<F>(&self, condition: F, guard: &Guard) -> Option<T>
+    where
+        T: Sync,
+        F: Fn(&T) -> bool,
+    {
+        loop {
+            if let Ok(head) = self.pop_if_internal(&condition, guard) {
+                return head;
+            }
+        }
+    }
+}
+
+impl<T> Drop for Queue<T> {
+    fn drop(&mut self) {
+        unsafe {
+            let guard = unprotected();
+
+            while self.try_pop(guard).is_some() {}
+
+            // Destroy the remaining sentinel node.
+            let sentinel = self.head.load(Relaxed, guard);
+            drop(sentinel.into_owned());
+        }
+    }
+}
+
+#[cfg(all(test, not(crossbeam_loom)))]
+mod test {
+    use super::*;
+    use crate::pin;
+    use crossbeam_utils::thread;
+
+    struct Queue<T> {
+        queue: super::Queue<T>,
+    }
+
+    impl<T> Queue<T> {
+        pub(crate) fn new() -> Queue<T> {
+            Queue {
+                queue: super::Queue::new(),
+            }
+        }
+
+        pub(crate) fn push(&self, t: T) {
+            let guard = &pin();
+            self.queue.push(t, guard);
+        }
+
+        pub(crate) fn is_empty(&self) -> bool {
+            let guard = &pin();
+            let head = self.queue.head.load(Acquire, guard);
+            let h = unsafe { head.deref() };
+            h.next.load(Acquire, guard).is_null()
+        }
+
+        pub(crate) fn try_pop(&self) -> Option<T> {
+            let guard = &pin();
+            self.queue.try_pop(guard)
+        }
+
+        pub(crate) fn pop(&self) -> T {
+            loop {
+                match self.try_pop() {
+                    None => continue,
+                    Some(t) => return t,
+                }
+            }
+        }
+    }
+
+    #[cfg(miri)]
+    const CONC_COUNT: i64 = 1000;
+    #[cfg(not(miri))]
+    const CONC_COUNT: i64 = 1000000;
+
+    #[test]
+    fn push_try_pop_1() {
+        let q: Queue<i64> = Queue::new();
+        assert!(q.is_empty());
+        q.push(37);
+        assert!(!q.is_empty());
+        assert_eq!(q.try_pop(), Some(37));
+        assert!(q.is_empty());
+    }
+
+    #[test]
+    fn push_try_pop_2() {
+        let q: Queue<i64> = Queue::new();
+        assert!(q.is_empty());
+        q.push(37);
+        q.push(48);
+        assert_eq!(q.try_pop(), Some(37));
+        assert!(!q.is_empty());
+        assert_eq!(q.try_pop(), Some(48));
+        assert!(q.is_empty());
+    }
+
+    #[test]
+    fn push_try_pop_many_seq() {
+        let q: Queue<i64> = Queue::new();
+        assert!(q.is_empty());
+        for i in 0..200 {
+            q.push(i)
+        }
+        assert!(!q.is_empty());
+        for i in 0..200 {
+            assert_eq!(q.try_pop(), Some(i));
+        }
+        assert!(q.is_empty());
+    }
+
+    #[test]
+    fn push_pop_1() {
+        let q: Queue<i64> = Queue::new();
+        assert!(q.is_empty());
+        q.push(37);
+        assert!(!q.is_empty());
+        assert_eq!(q.pop(), 37);
+        assert!(q.is_empty());
+    }
+
+    #[test]
+    fn push_pop_2() {
+        let q: Queue<i64> = Queue::new();
+        q.push(37);
+        q.push(48);
+        assert_eq!(q.pop(), 37);
+        assert_eq!(q.pop(), 48);
+    }
+
+    #[test]
+    fn push_pop_many_seq() {
+        let q: Queue<i64> = Queue::new();
+        assert!(q.is_empty());
+        for i in 0..200 {
+            q.push(i)
+        }
+        assert!(!q.is_empty());
+        for i in 0..200 {
+            assert_eq!(q.pop(), i);
+        }
+        assert!(q.is_empty());
+    }
+
+    #[test]
+    fn push_try_pop_many_spsc() {
+        let q: Queue<i64> = Queue::new();
+        assert!(q.is_empty());
+
+        thread::scope(|scope| {
+            scope.spawn(|_| {
+                let mut next = 0;
+
+                while next < CONC_COUNT {
+                    if let Some(elem) = q.try_pop() {
+                        assert_eq!(elem, next);
+                        next += 1;
+                    }
+                }
+            });
+
+            for i in 0..CONC_COUNT {
+                q.push(i)
+            }
+        })
+        .unwrap();
+    }
+
+    #[test]
+    fn push_try_pop_many_spmc() {
+        fn recv(_t: i32, q: &Queue<i64>) {
+            let mut cur = -1;
+            for _i in 0..CONC_COUNT {
+                if let Some(elem) = q.try_pop() {
+                    assert!(elem > cur);
+                    cur = elem;
+
+                    if cur == CONC_COUNT - 1 {
+                        break;
+                    }
+                }
+            }
+        }
+
+        let q: Queue<i64> = Queue::new();
+        assert!(q.is_empty());
+        thread::scope(|scope| {
+            for i in 0..3 {
+                let q = &q;
+                scope.spawn(move |_| recv(i, q));
+            }
+
+            scope.spawn(|_| {
+                for i in 0..CONC_COUNT {
+                    q.push(i);
+                }
+            });
+        })
+        .unwrap();
+    }
+
+    #[test]
+    fn push_try_pop_many_mpmc() {
+        enum LR {
+            Left(i64),
+            Right(i64),
+        }
+
+        let q: Queue<LR> = Queue::new();
+        assert!(q.is_empty());
+
+        thread::scope(|scope| {
+            for _t in 0..2 {
+                scope.spawn(|_| {
+                    for i in CONC_COUNT - 1..CONC_COUNT {
+                        q.push(LR::Left(i))
+                    }
+                });
+                scope.spawn(|_| {
+                    for i in CONC_COUNT - 1..CONC_COUNT {
+                        q.push(LR::Right(i))
+                    }
+                });
+                scope.spawn(|_| {
+                    let mut vl = vec![];
+                    let mut vr = vec![];
+                    for _i in 0..CONC_COUNT {
+                        match q.try_pop() {
+                            Some(LR::Left(x)) => vl.push(x),
+                            Some(LR::Right(x)) => vr.push(x),
+                            _ => {}
+                        }
+                    }
+
+                    let mut vl2 = vl.clone();
+                    let mut vr2 = vr.clone();
+                    vl2.sort_unstable();
+                    vr2.sort_unstable();
+
+                    assert_eq!(vl, vl2);
+                    assert_eq!(vr, vr2);
+                });
+            }
+        })
+        .unwrap();
+    }
+
+    #[test]
+    fn push_pop_many_spsc() {
+        let q: Queue<i64> = Queue::new();
+
+        thread::scope(|scope| {
+            scope.spawn(|_| {
+                let mut next = 0;
+                while next < CONC_COUNT {
+                    assert_eq!(q.pop(), next);
+                    next += 1;
+                }
+            });
+
+            for i in 0..CONC_COUNT {
+                q.push(i)
+            }
+        })
+        .unwrap();
+        assert!(q.is_empty());
+    }
+
+    #[test]
+    fn is_empty_dont_pop() {
+        let q: Queue<i64> = Queue::new();
+        q.push(20);
+        q.push(20);
+        assert!(!q.is_empty());
+        assert!(!q.is_empty());
+        assert!(q.try_pop().is_some());
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/atomic/atomic_cell.rs.html b/src/crossbeam_utils/atomic/atomic_cell.rs.html new file mode 100644 index 0000000000..618f506aa4 --- /dev/null +++ b/src/crossbeam_utils/atomic/atomic_cell.rs.html @@ -0,0 +1,2367 @@ +atomic_cell.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+
// Necessary for implementing atomic methods for `AtomicUnit`
+#![allow(clippy::unit_arg)]
+
+use crate::primitive::sync::atomic::{self, Ordering};
+use crate::CachePadded;
+use core::cell::UnsafeCell;
+use core::cmp;
+use core::fmt;
+use core::mem::{self, ManuallyDrop, MaybeUninit};
+use core::panic::{RefUnwindSafe, UnwindSafe};
+use core::ptr;
+
+use super::seq_lock::SeqLock;
+
+/// A thread-safe mutable memory location.
+///
+/// This type is equivalent to [`Cell`], except it can also be shared among multiple threads.
+///
+/// Operations on `AtomicCell`s use atomic instructions whenever possible, and synchronize using
+/// global locks otherwise. You can call [`AtomicCell::<T>::is_lock_free()`] to check whether
+/// atomic instructions or locks will be used.
+///
+/// Atomic loads use the [`Acquire`] ordering and atomic stores use the [`Release`] ordering.
+///
+/// [`Cell`]: std::cell::Cell
+/// [`AtomicCell::<T>::is_lock_free()`]: AtomicCell::is_lock_free
+/// [`Acquire`]: std::sync::atomic::Ordering::Acquire
+/// [`Release`]: std::sync::atomic::Ordering::Release
+#[repr(transparent)]
+pub struct AtomicCell<T> {
+    /// The inner value.
+    ///
+    /// If this value can be transmuted into a primitive atomic type, it will be treated as such.
+    /// Otherwise, all potentially concurrent operations on this data will be protected by a global
+    /// lock.
+    ///
+    /// Using MaybeUninit to prevent code outside the cell from observing partially initialized state:
+    /// <https://github.com/crossbeam-rs/crossbeam/issues/833>
+    ///
+    /// Note:
+    /// - we'll never store uninitialized `T` due to our API only using initialized `T`.
+    /// - this `MaybeUninit` does *not* fix <https://github.com/crossbeam-rs/crossbeam/issues/315>.
+    value: UnsafeCell<MaybeUninit<T>>,
+}
+
+unsafe impl<T: Send> Send for AtomicCell<T> {}
+unsafe impl<T: Send> Sync for AtomicCell<T> {}
+
+impl<T> UnwindSafe for AtomicCell<T> {}
+impl<T> RefUnwindSafe for AtomicCell<T> {}
+
+impl<T> AtomicCell<T> {
+    /// Creates a new atomic cell initialized with `val`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(7);
+    /// ```
+    pub const fn new(val: T) -> AtomicCell<T> {
+        AtomicCell {
+            value: UnsafeCell::new(MaybeUninit::new(val)),
+        }
+    }
+
+    /// Consumes the atomic and returns the contained value.
+    ///
+    /// This is safe because passing `self` by value guarantees that no other threads are
+    /// concurrently accessing the atomic data.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(7);
+    /// let v = a.into_inner();
+    ///
+    /// assert_eq!(v, 7);
+    /// ```
+    pub fn into_inner(self) -> T {
+        let this = ManuallyDrop::new(self);
+        // SAFETY:
+        // - passing `self` by value guarantees that no other threads are concurrently
+        //   accessing the atomic data
+        // - the raw pointer passed in is valid because we got it from an owned value.
+        // - `ManuallyDrop` prevents double dropping `T`
+        unsafe { this.as_ptr().read() }
+    }
+
+    /// Returns `true` if operations on values of this type are lock-free.
+    ///
+    /// If the compiler or the platform doesn't support the necessary atomic instructions,
+    /// `AtomicCell<T>` will use global locks for every potentially concurrent atomic operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// // This type is internally represented as `AtomicUsize` so we can just use atomic
+    /// // operations provided by it.
+    /// assert_eq!(AtomicCell::<usize>::is_lock_free(), true);
+    ///
+    /// // A wrapper struct around `isize`.
+    /// struct Foo {
+    ///     bar: isize,
+    /// }
+    /// // `AtomicCell<Foo>` will be internally represented as `AtomicIsize`.
+    /// assert_eq!(AtomicCell::<Foo>::is_lock_free(), true);
+    ///
+    /// // Operations on zero-sized types are always lock-free.
+    /// assert_eq!(AtomicCell::<()>::is_lock_free(), true);
+    ///
+    /// // Very large types cannot be represented as any of the standard atomic types, so atomic
+    /// // operations on them will have to use global locks for synchronization.
+    /// assert_eq!(AtomicCell::<[u8; 1000]>::is_lock_free(), false);
+    /// ```
+    pub const fn is_lock_free() -> bool {
+        atomic_is_lock_free::<T>()
+    }
+
+    /// Stores `val` into the atomic cell.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(7);
+    ///
+    /// assert_eq!(a.load(), 7);
+    /// a.store(8);
+    /// assert_eq!(a.load(), 8);
+    /// ```
+    pub fn store(&self, val: T) {
+        if mem::needs_drop::<T>() {
+            drop(self.swap(val));
+        } else {
+            unsafe {
+                atomic_store(self.as_ptr(), val);
+            }
+        }
+    }
+
+    /// Stores `val` into the atomic cell and returns the previous value.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(7);
+    ///
+    /// assert_eq!(a.load(), 7);
+    /// assert_eq!(a.swap(8), 7);
+    /// assert_eq!(a.load(), 8);
+    /// ```
+    pub fn swap(&self, val: T) -> T {
+        unsafe { atomic_swap(self.as_ptr(), val) }
+    }
+
+    /// Returns a raw pointer to the underlying data in this atomic cell.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(5);
+    ///
+    /// let ptr = a.as_ptr();
+    /// ```
+    #[inline]
+    pub fn as_ptr(&self) -> *mut T {
+        self.value.get().cast::<T>()
+    }
+}
+
+impl<T: Default> AtomicCell<T> {
+    /// Takes the value of the atomic cell, leaving `Default::default()` in its place.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(5);
+    /// let five = a.take();
+    ///
+    /// assert_eq!(five, 5);
+    /// assert_eq!(a.into_inner(), 0);
+    /// ```
+    pub fn take(&self) -> T {
+        self.swap(Default::default())
+    }
+}
+
+impl<T: Copy> AtomicCell<T> {
+    /// Loads a value from the atomic cell.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(7);
+    ///
+    /// assert_eq!(a.load(), 7);
+    /// ```
+    pub fn load(&self) -> T {
+        unsafe { atomic_load(self.as_ptr()) }
+    }
+}
+
+impl<T: Copy + Eq> AtomicCell<T> {
+    /// If the current value equals `current`, stores `new` into the atomic cell.
+    ///
+    /// The return value is always the previous value. If it is equal to `current`, then the value
+    /// was updated.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # #![allow(deprecated)]
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(1);
+    ///
+    /// assert_eq!(a.compare_and_swap(2, 3), 1);
+    /// assert_eq!(a.load(), 1);
+    ///
+    /// assert_eq!(a.compare_and_swap(1, 2), 1);
+    /// assert_eq!(a.load(), 2);
+    /// ```
+    // TODO: remove in the next major version.
+    #[deprecated(note = "Use `compare_exchange` instead")]
+    pub fn compare_and_swap(&self, current: T, new: T) -> T {
+        match self.compare_exchange(current, new) {
+            Ok(v) => v,
+            Err(v) => v,
+        }
+    }
+
+    /// If the current value equals `current`, stores `new` into the atomic cell.
+    ///
+    /// The return value is a result indicating whether the new value was written and containing
+    /// the previous value. On success this value is guaranteed to be equal to `current`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(1);
+    ///
+    /// assert_eq!(a.compare_exchange(2, 3), Err(1));
+    /// assert_eq!(a.load(), 1);
+    ///
+    /// assert_eq!(a.compare_exchange(1, 2), Ok(1));
+    /// assert_eq!(a.load(), 2);
+    /// ```
+    pub fn compare_exchange(&self, current: T, new: T) -> Result<T, T> {
+        unsafe { atomic_compare_exchange_weak(self.as_ptr(), current, new) }
+    }
+
+    /// Fetches the value, and applies a function to it that returns an optional
+    /// new value. Returns a `Result` of `Ok(previous_value)` if the function returned `Some(_)`, else
+    /// `Err(previous_value)`.
+    ///
+    /// Note: This may call the function multiple times if the value has been changed from other threads in
+    /// the meantime, as long as the function returns `Some(_)`, but the function will have been applied
+    /// only once to the stored value.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(7);
+    /// assert_eq!(a.fetch_update(|_| None), Err(7));
+    /// assert_eq!(a.fetch_update(|a| Some(a + 1)), Ok(7));
+    /// assert_eq!(a.fetch_update(|a| Some(a + 1)), Ok(8));
+    /// assert_eq!(a.load(), 9);
+    /// ```
+    #[inline]
+    pub fn fetch_update<F>(&self, mut f: F) -> Result<T, T>
+    where
+        F: FnMut(T) -> Option<T>,
+    {
+        let mut prev = self.load();
+        while let Some(next) = f(prev) {
+            match self.compare_exchange(prev, next) {
+                x @ Ok(_) => return x,
+                Err(next_prev) => prev = next_prev,
+            }
+        }
+        Err(prev)
+    }
+}
+
+// `MaybeUninit` prevents `T` from being dropped, so we need to implement `Drop`
+// for `AtomicCell` to avoid leaks of non-`Copy` types.
+impl<T> Drop for AtomicCell<T> {
+    fn drop(&mut self) {
+        if mem::needs_drop::<T>() {
+            // SAFETY:
+            // - the mutable reference guarantees that no other threads are concurrently accessing the atomic data
+            // - the raw pointer passed in is valid because we got it from a reference
+            // - `MaybeUninit` prevents double dropping `T`
+            unsafe {
+                self.as_ptr().drop_in_place();
+            }
+        }
+    }
+}
+
+macro_rules! atomic {
+    // If values of type `$t` can be transmuted into values of the primitive atomic type `$atomic`,
+    // declares variable `$a` of type `$atomic` and executes `$atomic_op`, breaking out of the loop.
+    (@check, $t:ty, $atomic:ty, $a:ident, $atomic_op:expr) => {
+        if can_transmute::<$t, $atomic>() {
+            let $a: &$atomic;
+            break $atomic_op;
+        }
+    };
+
+    // If values of type `$t` can be transmuted into values of a primitive atomic type, declares
+    // variable `$a` of that type and executes `$atomic_op`. Otherwise, just executes
+    // `$fallback_op`.
+    ($t:ty, $a:ident, $atomic_op:expr, $fallback_op:expr) => {
+        loop {
+            atomic!(@check, $t, AtomicUnit, $a, $atomic_op);
+
+            atomic!(@check, $t, atomic::AtomicU8, $a, $atomic_op);
+            atomic!(@check, $t, atomic::AtomicU16, $a, $atomic_op);
+            atomic!(@check, $t, atomic::AtomicU32, $a, $atomic_op);
+            #[cfg(target_has_atomic = "64")]
+            atomic!(@check, $t, atomic::AtomicU64, $a, $atomic_op);
+            // TODO: AtomicU128 is unstable
+            // atomic!(@check, $t, atomic::AtomicU128, $a, $atomic_op);
+
+            break $fallback_op;
+        }
+    };
+}
+
+macro_rules! impl_arithmetic {
+    ($t:ty, fallback, $example:tt) => {
+        impl AtomicCell<$t> {
+            /// Increments the current value by `val` and returns the previous value.
+            ///
+            /// The addition wraps on overflow.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_add(3), 7);
+            /// assert_eq!(a.load(), 10);
+            /// ```
+            #[inline]
+            pub fn fetch_add(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value = value.wrapping_add(val);
+                old
+            }
+
+            /// Decrements the current value by `val` and returns the previous value.
+            ///
+            /// The subtraction wraps on overflow.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_sub(3), 7);
+            /// assert_eq!(a.load(), 4);
+            /// ```
+            #[inline]
+            pub fn fetch_sub(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value = value.wrapping_sub(val);
+                old
+            }
+
+            /// Applies bitwise "and" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_and(3), 7);
+            /// assert_eq!(a.load(), 3);
+            /// ```
+            #[inline]
+            pub fn fetch_and(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value &= val;
+                old
+            }
+
+            /// Applies bitwise "nand" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_nand(3), 7);
+            /// assert_eq!(a.load(), !(7 & 3));
+            /// ```
+            #[inline]
+            pub fn fetch_nand(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value = !(old & val);
+                old
+            }
+
+            /// Applies bitwise "or" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_or(16), 7);
+            /// assert_eq!(a.load(), 23);
+            /// ```
+            #[inline]
+            pub fn fetch_or(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value |= val;
+                old
+            }
+
+            /// Applies bitwise "xor" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_xor(2), 7);
+            /// assert_eq!(a.load(), 5);
+            /// ```
+            #[inline]
+            pub fn fetch_xor(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value ^= val;
+                old
+            }
+
+            /// Compares and sets the maximum of the current value and `val`,
+            /// and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_max(2), 7);
+            /// assert_eq!(a.load(), 7);
+            /// ```
+            #[inline]
+            pub fn fetch_max(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value = cmp::max(old, val);
+                old
+            }
+
+            /// Compares and sets the minimum of the current value and `val`,
+            /// and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_min(2), 7);
+            /// assert_eq!(a.load(), 2);
+            /// ```
+            #[inline]
+            pub fn fetch_min(&self, val: $t) -> $t {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value = cmp::min(old, val);
+                old
+            }
+        }
+    };
+    ($t:ty, $atomic:ident, $example:tt) => {
+        impl AtomicCell<$t> {
+            /// Increments the current value by `val` and returns the previous value.
+            ///
+            /// The addition wraps on overflow.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_add(3), 7);
+            /// assert_eq!(a.load(), 10);
+            /// ```
+            #[inline]
+            pub fn fetch_add(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_add(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value = value.wrapping_add(val);
+                        old
+                    }
+                }
+            }
+
+            /// Decrements the current value by `val` and returns the previous value.
+            ///
+            /// The subtraction wraps on overflow.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_sub(3), 7);
+            /// assert_eq!(a.load(), 4);
+            /// ```
+            #[inline]
+            pub fn fetch_sub(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_sub(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value = value.wrapping_sub(val);
+                        old
+                    }
+                }
+            }
+
+            /// Applies bitwise "and" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_and(3), 7);
+            /// assert_eq!(a.load(), 3);
+            /// ```
+            #[inline]
+            pub fn fetch_and(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_and(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value &= val;
+                        old
+                    }
+                }
+            }
+
+            /// Applies bitwise "nand" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_nand(3), 7);
+            /// assert_eq!(a.load(), !(7 & 3));
+            /// ```
+            #[inline]
+            pub fn fetch_nand(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_nand(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value = !(old & val);
+                        old
+                    }
+                }
+            }
+
+            /// Applies bitwise "or" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_or(16), 7);
+            /// assert_eq!(a.load(), 23);
+            /// ```
+            #[inline]
+            pub fn fetch_or(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_or(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value |= val;
+                        old
+                    }
+                }
+            }
+
+            /// Applies bitwise "xor" to the current value and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_xor(2), 7);
+            /// assert_eq!(a.load(), 5);
+            /// ```
+            #[inline]
+            pub fn fetch_xor(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_xor(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value ^= val;
+                        old
+                    }
+                }
+            }
+
+            /// Compares and sets the maximum of the current value and `val`,
+            /// and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_max(9), 7);
+            /// assert_eq!(a.load(), 9);
+            /// ```
+            #[inline]
+            pub fn fetch_max(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_max(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value = cmp::max(old, val);
+                        old
+                    }
+                }
+            }
+
+            /// Compares and sets the minimum of the current value and `val`,
+            /// and returns the previous value.
+            ///
+            /// # Examples
+            ///
+            /// ```
+            /// use crossbeam_utils::atomic::AtomicCell;
+            ///
+            #[doc = $example]
+            ///
+            /// assert_eq!(a.fetch_min(2), 7);
+            /// assert_eq!(a.load(), 2);
+            /// ```
+            #[inline]
+            pub fn fetch_min(&self, val: $t) -> $t {
+                atomic! {
+                    $t, _a,
+                    {
+                        let a = unsafe { &*(self.as_ptr() as *const atomic::$atomic) };
+                        a.fetch_min(val, Ordering::AcqRel)
+                    },
+                    {
+                        let _guard = lock(self.as_ptr() as usize).write();
+                        let value = unsafe { &mut *(self.as_ptr()) };
+                        let old = *value;
+                        *value = cmp::min(old, val);
+                        old
+                    }
+                }
+            }
+        }
+    };
+}
+
+impl_arithmetic!(u8, AtomicU8, "let a = AtomicCell::new(7u8);");
+impl_arithmetic!(i8, AtomicI8, "let a = AtomicCell::new(7i8);");
+impl_arithmetic!(u16, AtomicU16, "let a = AtomicCell::new(7u16);");
+impl_arithmetic!(i16, AtomicI16, "let a = AtomicCell::new(7i16);");
+
+impl_arithmetic!(u32, AtomicU32, "let a = AtomicCell::new(7u32);");
+impl_arithmetic!(i32, AtomicI32, "let a = AtomicCell::new(7i32);");
+
+#[cfg(target_has_atomic = "64")]
+impl_arithmetic!(u64, AtomicU64, "let a = AtomicCell::new(7u64);");
+#[cfg(target_has_atomic = "64")]
+impl_arithmetic!(i64, AtomicI64, "let a = AtomicCell::new(7i64);");
+#[cfg(not(target_has_atomic = "64"))]
+impl_arithmetic!(u64, fallback, "let a = AtomicCell::new(7u64);");
+#[cfg(not(target_has_atomic = "64"))]
+impl_arithmetic!(i64, fallback, "let a = AtomicCell::new(7i64);");
+
+// TODO: AtomicU128 is unstable
+// impl_arithmetic!(u128, AtomicU128, "let a = AtomicCell::new(7u128);");
+// impl_arithmetic!(i128, AtomicI128, "let a = AtomicCell::new(7i128);");
+impl_arithmetic!(u128, fallback, "let a = AtomicCell::new(7u128);");
+impl_arithmetic!(i128, fallback, "let a = AtomicCell::new(7i128);");
+
+impl_arithmetic!(usize, AtomicUsize, "let a = AtomicCell::new(7usize);");
+impl_arithmetic!(isize, AtomicIsize, "let a = AtomicCell::new(7isize);");
+
+impl AtomicCell<bool> {
+    /// Applies logical "and" to the current value and returns the previous value.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(true);
+    ///
+    /// assert_eq!(a.fetch_and(true), true);
+    /// assert_eq!(a.load(), true);
+    ///
+    /// assert_eq!(a.fetch_and(false), true);
+    /// assert_eq!(a.load(), false);
+    /// ```
+    #[inline]
+    pub fn fetch_and(&self, val: bool) -> bool {
+        atomic! {
+            bool, _a,
+            {
+                let a = unsafe { &*(self.as_ptr() as *const atomic::AtomicBool) };
+                a.fetch_and(val, Ordering::AcqRel)
+            },
+            {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value &= val;
+                old
+            }
+        }
+    }
+
+    /// Applies logical "nand" to the current value and returns the previous value.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(true);
+    ///
+    /// assert_eq!(a.fetch_nand(false), true);
+    /// assert_eq!(a.load(), true);
+    ///
+    /// assert_eq!(a.fetch_nand(true), true);
+    /// assert_eq!(a.load(), false);
+    ///
+    /// assert_eq!(a.fetch_nand(false), false);
+    /// assert_eq!(a.load(), true);
+    /// ```
+    #[inline]
+    pub fn fetch_nand(&self, val: bool) -> bool {
+        atomic! {
+            bool, _a,
+            {
+                let a = unsafe { &*(self.as_ptr() as *const atomic::AtomicBool) };
+                a.fetch_nand(val, Ordering::AcqRel)
+            },
+            {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value = !(old & val);
+                old
+            }
+        }
+    }
+
+    /// Applies logical "or" to the current value and returns the previous value.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(false);
+    ///
+    /// assert_eq!(a.fetch_or(false), false);
+    /// assert_eq!(a.load(), false);
+    ///
+    /// assert_eq!(a.fetch_or(true), false);
+    /// assert_eq!(a.load(), true);
+    /// ```
+    #[inline]
+    pub fn fetch_or(&self, val: bool) -> bool {
+        atomic! {
+            bool, _a,
+            {
+                let a = unsafe { &*(self.as_ptr() as *const atomic::AtomicBool) };
+                a.fetch_or(val, Ordering::AcqRel)
+            },
+            {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value |= val;
+                old
+            }
+        }
+    }
+
+    /// Applies logical "xor" to the current value and returns the previous value.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::atomic::AtomicCell;
+    ///
+    /// let a = AtomicCell::new(true);
+    ///
+    /// assert_eq!(a.fetch_xor(false), true);
+    /// assert_eq!(a.load(), true);
+    ///
+    /// assert_eq!(a.fetch_xor(true), true);
+    /// assert_eq!(a.load(), false);
+    /// ```
+    #[inline]
+    pub fn fetch_xor(&self, val: bool) -> bool {
+        atomic! {
+            bool, _a,
+            {
+                let a = unsafe { &*(self.as_ptr() as *const atomic::AtomicBool) };
+                a.fetch_xor(val, Ordering::AcqRel)
+            },
+            {
+                let _guard = lock(self.as_ptr() as usize).write();
+                let value = unsafe { &mut *(self.as_ptr()) };
+                let old = *value;
+                *value ^= val;
+                old
+            }
+        }
+    }
+}
+
+impl<T: Default> Default for AtomicCell<T> {
+    fn default() -> AtomicCell<T> {
+        AtomicCell::new(T::default())
+    }
+}
+
+impl<T> From<T> for AtomicCell<T> {
+    #[inline]
+    fn from(val: T) -> AtomicCell<T> {
+        AtomicCell::new(val)
+    }
+}
+
+impl<T: Copy + fmt::Debug> fmt::Debug for AtomicCell<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("AtomicCell")
+            .field("value", &self.load())
+            .finish()
+    }
+}
+
+/// Returns `true` if values of type `A` can be transmuted into values of type `B`.
+const fn can_transmute<A, B>() -> bool {
+    // Sizes must be equal, but alignment of `A` must be greater or equal than that of `B`.
+    (mem::size_of::<A>() == mem::size_of::<B>()) & (mem::align_of::<A>() >= mem::align_of::<B>())
+}
+
+/// Returns a reference to the global lock associated with the `AtomicCell` at address `addr`.
+///
+/// This function is used to protect atomic data which doesn't fit into any of the primitive atomic
+/// types in `std::sync::atomic`. Operations on such atomics must therefore use a global lock.
+///
+/// However, there is not only one global lock but an array of many locks, and one of them is
+/// picked based on the given address. Having many locks reduces contention and improves
+/// scalability.
+#[inline]
+#[must_use]
+fn lock(addr: usize) -> &'static SeqLock {
+    // The number of locks is a prime number because we want to make sure `addr % LEN` gets
+    // dispersed across all locks.
+    //
+    // Note that addresses are always aligned to some power of 2, depending on type `T` in
+    // `AtomicCell<T>`. If `LEN` was an even number, then `addr % LEN` would be an even number,
+    // too, which means only half of the locks would get utilized!
+    //
+    // It is also possible for addresses to accidentally get aligned to a number that is not a
+    // power of 2. Consider this example:
+    //
+    // ```
+    // #[repr(C)]
+    // struct Foo {
+    //     a: AtomicCell<u8>,
+    //     b: u8,
+    //     c: u8,
+    // }
+    // ```
+    //
+    // Now, if we have a slice of type `&[Foo]`, it is possible that field `a` in all items gets
+    // stored at addresses that are multiples of 3. It'd be too bad if `LEN` was divisible by 3.
+    // In order to protect from such cases, we simply choose a large prime number for `LEN`.
+    const LEN: usize = 67;
+    #[allow(clippy::declare_interior_mutable_const)]
+    const L: CachePadded<SeqLock> = CachePadded::new(SeqLock::new());
+    static LOCKS: [CachePadded<SeqLock>; LEN] = [L; LEN];
+
+    // If the modulus is a constant number, the compiler will use crazy math to transform this into
+    // a sequence of cheap arithmetic operations rather than using the slow modulo instruction.
+    &LOCKS[addr % LEN]
+}
+
+/// An atomic `()`.
+///
+/// All operations are noops.
+struct AtomicUnit;
+
+impl AtomicUnit {
+    #[inline]
+    fn load(&self, _order: Ordering) {}
+
+    #[inline]
+    fn store(&self, _val: (), _order: Ordering) {}
+
+    #[inline]
+    fn swap(&self, _val: (), _order: Ordering) {}
+
+    #[inline]
+    fn compare_exchange_weak(
+        &self,
+        _current: (),
+        _new: (),
+        _success: Ordering,
+        _failure: Ordering,
+    ) -> Result<(), ()> {
+        Ok(())
+    }
+}
+
+/// Returns `true` if operations on `AtomicCell<T>` are lock-free.
+const fn atomic_is_lock_free<T>() -> bool {
+    atomic! { T, _a, true, false }
+}
+
+/// Atomically reads data from `src`.
+///
+/// This operation uses the `Acquire` ordering. If possible, an atomic instructions is used, and a
+/// global lock otherwise.
+unsafe fn atomic_load<T>(src: *mut T) -> T
+where
+    T: Copy,
+{
+    atomic! {
+        T, a,
+        {
+            a = &*(src as *const _ as *const _);
+            mem::transmute_copy(&a.load(Ordering::Acquire))
+        },
+        {
+            let lock = lock(src as usize);
+
+            // Try doing an optimistic read first.
+            if let Some(stamp) = lock.optimistic_read() {
+                // We need a volatile read here because other threads might concurrently modify the
+                // value. In theory, data races are *always* UB, even if we use volatile reads and
+                // discard the data when a data race is detected. The proper solution would be to
+                // do atomic reads and atomic writes, but we can't atomically read and write all
+                // kinds of data since `AtomicU8` is not available on stable Rust yet.
+                // Load as `MaybeUninit` because we may load a value that is not valid as `T`.
+                let val = ptr::read_volatile(src.cast::<MaybeUninit<T>>());
+
+                if lock.validate_read(stamp) {
+                    return val.assume_init();
+                }
+            }
+
+            // Grab a regular write lock so that writers don't starve this load.
+            let guard = lock.write();
+            let val = ptr::read(src);
+            // The value hasn't been changed. Drop the guard without incrementing the stamp.
+            guard.abort();
+            val
+        }
+    }
+}
+
+/// Atomically writes `val` to `dst`.
+///
+/// This operation uses the `Release` ordering. If possible, an atomic instructions is used, and a
+/// global lock otherwise.
+unsafe fn atomic_store<T>(dst: *mut T, val: T) {
+    atomic! {
+        T, a,
+        {
+            a = &*(dst as *const _ as *const _);
+            a.store(mem::transmute_copy(&val), Ordering::Release);
+            mem::forget(val);
+        },
+        {
+            let _guard = lock(dst as usize).write();
+            ptr::write(dst, val);
+        }
+    }
+}
+
+/// Atomically swaps data at `dst` with `val`.
+///
+/// This operation uses the `AcqRel` ordering. If possible, an atomic instructions is used, and a
+/// global lock otherwise.
+unsafe fn atomic_swap<T>(dst: *mut T, val: T) -> T {
+    atomic! {
+        T, a,
+        {
+            a = &*(dst as *const _ as *const _);
+            let res = mem::transmute_copy(&a.swap(mem::transmute_copy(&val), Ordering::AcqRel));
+            mem::forget(val);
+            res
+        },
+        {
+            let _guard = lock(dst as usize).write();
+            ptr::replace(dst, val)
+        }
+    }
+}
+
+/// Atomically compares data at `dst` to `current` and, if equal byte-for-byte, exchanges data at
+/// `dst` with `new`.
+///
+/// Returns the old value on success, or the current value at `dst` on failure.
+///
+/// This operation uses the `AcqRel` ordering. If possible, an atomic instructions is used, and a
+/// global lock otherwise.
+#[allow(clippy::let_unit_value)]
+unsafe fn atomic_compare_exchange_weak<T>(dst: *mut T, mut current: T, new: T) -> Result<T, T>
+where
+    T: Copy + Eq,
+{
+    atomic! {
+        T, a,
+        {
+            a = &*(dst as *const _ as *const _);
+            let mut current_raw = mem::transmute_copy(&current);
+            let new_raw = mem::transmute_copy(&new);
+
+            loop {
+                match a.compare_exchange_weak(
+                    current_raw,
+                    new_raw,
+                    Ordering::AcqRel,
+                    Ordering::Acquire,
+                ) {
+                    Ok(_) => break Ok(current),
+                    Err(previous_raw) => {
+                        let previous = mem::transmute_copy(&previous_raw);
+
+                        if !T::eq(&previous, &current) {
+                            break Err(previous);
+                        }
+
+                        // The compare-exchange operation has failed and didn't store `new`. The
+                        // failure is either spurious, or `previous` was semantically equal to
+                        // `current` but not byte-equal. Let's retry with `previous` as the new
+                        // `current`.
+                        current = previous;
+                        current_raw = previous_raw;
+                    }
+                }
+            }
+        },
+        {
+            let guard = lock(dst as usize).write();
+
+            if T::eq(&*dst, &current) {
+                Ok(ptr::replace(dst, new))
+            } else {
+                let val = ptr::read(dst);
+                // The value hasn't been changed. Drop the guard without incrementing the stamp.
+                guard.abort();
+                Err(val)
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/atomic/consume.rs.html b/src/crossbeam_utils/atomic/consume.rs.html new file mode 100644 index 0000000000..42965e2185 --- /dev/null +++ b/src/crossbeam_utils/atomic/consume.rs.html @@ -0,0 +1,225 @@ +consume.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+
#[cfg(not(crossbeam_no_atomic))]
+use core::sync::atomic::Ordering;
+
+/// Trait which allows reading from primitive atomic types with "consume" ordering.
+pub trait AtomicConsume {
+    /// Type returned by `load_consume`.
+    type Val;
+
+    /// Loads a value from the atomic using a "consume" memory ordering.
+    ///
+    /// This is similar to the "acquire" ordering, except that an ordering is
+    /// only guaranteed with operations that "depend on" the result of the load.
+    /// However consume loads are usually much faster than acquire loads on
+    /// architectures with a weak memory model since they don't require memory
+    /// fence instructions.
+    ///
+    /// The exact definition of "depend on" is a bit vague, but it works as you
+    /// would expect in practice since a lot of software, especially the Linux
+    /// kernel, rely on this behavior.
+    ///
+    /// This is currently only implemented on ARM and AArch64, where a fence
+    /// can be avoided. On other architectures this will fall back to a simple
+    /// `load(Ordering::Acquire)`.
+    fn load_consume(&self) -> Self::Val;
+}
+
+#[cfg(not(crossbeam_no_atomic))]
+// Miri and Loom don't support "consume" ordering and ThreadSanitizer doesn't treat
+// load(Relaxed) + compiler_fence(Acquire) as "consume" load.
+// LLVM generates machine code equivalent to fence(Acquire) in compiler_fence(Acquire)
+// on PowerPC, MIPS, etc. (https://godbolt.org/z/hffvjvW7h), so for now the fence
+// can be actually avoided here only on ARM and AArch64. See also
+// https://github.com/rust-lang/rust/issues/62256.
+#[cfg(all(
+    any(target_arch = "arm", target_arch = "aarch64"),
+    not(any(miri, crossbeam_loom, crossbeam_sanitize_thread)),
+))]
+macro_rules! impl_consume {
+    () => {
+        #[inline]
+        fn load_consume(&self) -> Self::Val {
+            use crate::primitive::sync::atomic::compiler_fence;
+            let result = self.load(Ordering::Relaxed);
+            compiler_fence(Ordering::Acquire);
+            result
+        }
+    };
+}
+
+#[cfg(not(crossbeam_no_atomic))]
+#[cfg(not(all(
+    any(target_arch = "arm", target_arch = "aarch64"),
+    not(any(miri, crossbeam_loom, crossbeam_sanitize_thread)),
+)))]
+macro_rules! impl_consume {
+    () => {
+        #[inline]
+        fn load_consume(&self) -> Self::Val {
+            self.load(Ordering::Acquire)
+        }
+    };
+}
+
+macro_rules! impl_atomic {
+    ($atomic:ident, $val:ty) => {
+        #[cfg(not(crossbeam_no_atomic))]
+        impl AtomicConsume for core::sync::atomic::$atomic {
+            type Val = $val;
+            impl_consume!();
+        }
+        #[cfg(crossbeam_loom)]
+        impl AtomicConsume for loom::sync::atomic::$atomic {
+            type Val = $val;
+            impl_consume!();
+        }
+    };
+}
+
+impl_atomic!(AtomicBool, bool);
+impl_atomic!(AtomicUsize, usize);
+impl_atomic!(AtomicIsize, isize);
+impl_atomic!(AtomicU8, u8);
+impl_atomic!(AtomicI8, i8);
+impl_atomic!(AtomicU16, u16);
+impl_atomic!(AtomicI16, i16);
+#[cfg(any(target_has_atomic = "32", not(target_pointer_width = "16")))]
+impl_atomic!(AtomicU32, u32);
+#[cfg(any(target_has_atomic = "32", not(target_pointer_width = "16")))]
+impl_atomic!(AtomicI32, i32);
+#[cfg(any(
+    target_has_atomic = "64",
+    not(any(target_pointer_width = "16", target_pointer_width = "32")),
+))]
+impl_atomic!(AtomicU64, u64);
+#[cfg(any(
+    target_has_atomic = "64",
+    not(any(target_pointer_width = "16", target_pointer_width = "32")),
+))]
+impl_atomic!(AtomicI64, i64);
+
+#[cfg(not(crossbeam_no_atomic))]
+impl<T> AtomicConsume for core::sync::atomic::AtomicPtr<T> {
+    type Val = *mut T;
+    impl_consume!();
+}
+
+#[cfg(crossbeam_loom)]
+impl<T> AtomicConsume for loom::sync::atomic::AtomicPtr<T> {
+    type Val = *mut T;
+    impl_consume!();
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/atomic/mod.rs.html b/src/crossbeam_utils/atomic/mod.rs.html new file mode 100644 index 0000000000..805a1d3c4e --- /dev/null +++ b/src/crossbeam_utils/atomic/mod.rs.html @@ -0,0 +1,67 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
//! Atomic types.
+//!
+//! * [`AtomicCell`], a thread-safe mutable memory location.
+//! * [`AtomicConsume`], for reading from primitive atomic types with "consume" ordering.
+
+#[cfg(target_has_atomic = "ptr")]
+#[cfg(not(crossbeam_loom))]
+// Use "wide" sequence lock if the pointer width <= 32 for preventing its counter against wrap
+// around.
+//
+// In narrow architectures (pointer width <= 16), the counter is still <= 32-bit and may be
+// vulnerable to wrap around. But it's mostly okay, since in such a primitive hardware, the
+// counter will not be increased that fast.
+// Note that Rust (and C99) pointers must be at least 16-bit (i.e., 8-bit targets are impossible): https://github.com/rust-lang/rust/pull/49305
+#[cfg_attr(
+    any(target_pointer_width = "16", target_pointer_width = "32"),
+    path = "seq_lock_wide.rs"
+)]
+mod seq_lock;
+
+#[cfg(target_has_atomic = "ptr")]
+// We cannot provide AtomicCell under cfg(crossbeam_loom) because loom's atomic
+// types have a different in-memory representation than the underlying type.
+// TODO: The latest loom supports fences, so fallback using seqlock may be available.
+#[cfg(not(crossbeam_loom))]
+mod atomic_cell;
+#[cfg(target_has_atomic = "ptr")]
+#[cfg(not(crossbeam_loom))]
+pub use atomic_cell::AtomicCell;
+
+mod consume;
+pub use consume::AtomicConsume;
+
\ No newline at end of file diff --git a/src/crossbeam_utils/atomic/seq_lock.rs.html b/src/crossbeam_utils/atomic/seq_lock.rs.html new file mode 100644 index 0000000000..d8e15bc227 --- /dev/null +++ b/src/crossbeam_utils/atomic/seq_lock.rs.html @@ -0,0 +1,227 @@ +seq_lock.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+
use core::mem;
+use core::sync::atomic::{self, AtomicUsize, Ordering};
+
+use crate::Backoff;
+
+/// A simple stamped lock.
+pub(crate) struct SeqLock {
+    /// The current state of the lock.
+    ///
+    /// All bits except the least significant one hold the current stamp. When locked, the state
+    /// equals 1 and doesn't contain a valid stamp.
+    state: AtomicUsize,
+}
+
+impl SeqLock {
+    pub(crate) const fn new() -> Self {
+        Self {
+            state: AtomicUsize::new(0),
+        }
+    }
+
+    /// If not locked, returns the current stamp.
+    ///
+    /// This method should be called before optimistic reads.
+    #[inline]
+    pub(crate) fn optimistic_read(&self) -> Option<usize> {
+        let state = self.state.load(Ordering::Acquire);
+        if state == 1 {
+            None
+        } else {
+            Some(state)
+        }
+    }
+
+    /// Returns `true` if the current stamp is equal to `stamp`.
+    ///
+    /// This method should be called after optimistic reads to check whether they are valid. The
+    /// argument `stamp` should correspond to the one returned by method `optimistic_read`.
+    #[inline]
+    pub(crate) fn validate_read(&self, stamp: usize) -> bool {
+        atomic::fence(Ordering::Acquire);
+        self.state.load(Ordering::Relaxed) == stamp
+    }
+
+    /// Grabs the lock for writing.
+    #[inline]
+    pub(crate) fn write(&'static self) -> SeqLockWriteGuard {
+        let backoff = Backoff::new();
+        loop {
+            let previous = self.state.swap(1, Ordering::Acquire);
+
+            if previous != 1 {
+                atomic::fence(Ordering::Release);
+
+                return SeqLockWriteGuard {
+                    lock: self,
+                    state: previous,
+                };
+            }
+
+            backoff.snooze();
+        }
+    }
+}
+
+/// An RAII guard that releases the lock and increments the stamp when dropped.
+pub(crate) struct SeqLockWriteGuard {
+    /// The parent lock.
+    lock: &'static SeqLock,
+
+    /// The stamp before locking.
+    state: usize,
+}
+
+impl SeqLockWriteGuard {
+    /// Releases the lock without incrementing the stamp.
+    #[inline]
+    pub(crate) fn abort(self) {
+        self.lock.state.store(self.state, Ordering::Release);
+
+        // We specifically don't want to call drop(), since that's
+        // what increments the stamp.
+        mem::forget(self);
+    }
+}
+
+impl Drop for SeqLockWriteGuard {
+    #[inline]
+    fn drop(&mut self) {
+        // Release the lock and increment the stamp.
+        self.lock
+            .state
+            .store(self.state.wrapping_add(2), Ordering::Release);
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::SeqLock;
+
+    #[test]
+    fn test_abort() {
+        static LK: SeqLock = SeqLock::new();
+        let before = LK.optimistic_read().unwrap();
+        {
+            let guard = LK.write();
+            guard.abort();
+        }
+        let after = LK.optimistic_read().unwrap();
+        assert_eq!(before, after, "aborted write does not update the stamp");
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/backoff.rs.html b/src/crossbeam_utils/backoff.rs.html new file mode 100644 index 0000000000..b6c878a139 --- /dev/null +++ b/src/crossbeam_utils/backoff.rs.html @@ -0,0 +1,577 @@ +backoff.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+
use crate::primitive::hint;
+use core::cell::Cell;
+use core::fmt;
+
+const SPIN_LIMIT: u32 = 6;
+const YIELD_LIMIT: u32 = 10;
+
+/// Performs exponential backoff in spin loops.
+///
+/// Backing off in spin loops reduces contention and improves overall performance.
+///
+/// This primitive can execute *YIELD* and *PAUSE* instructions, yield the current thread to the OS
+/// scheduler, and tell when is a good time to block the thread using a different synchronization
+/// mechanism. Each step of the back off procedure takes roughly twice as long as the previous
+/// step.
+///
+/// # Examples
+///
+/// Backing off in a lock-free loop:
+///
+/// ```
+/// use crossbeam_utils::Backoff;
+/// use std::sync::atomic::AtomicUsize;
+/// use std::sync::atomic::Ordering::SeqCst;
+///
+/// fn fetch_mul(a: &AtomicUsize, b: usize) -> usize {
+///     let backoff = Backoff::new();
+///     loop {
+///         let val = a.load(SeqCst);
+///         if a.compare_exchange(val, val.wrapping_mul(b), SeqCst, SeqCst).is_ok() {
+///             return val;
+///         }
+///         backoff.spin();
+///     }
+/// }
+/// ```
+///
+/// Waiting for an [`AtomicBool`] to become `true`:
+///
+/// ```
+/// use crossbeam_utils::Backoff;
+/// use std::sync::atomic::AtomicBool;
+/// use std::sync::atomic::Ordering::SeqCst;
+///
+/// fn spin_wait(ready: &AtomicBool) {
+///     let backoff = Backoff::new();
+///     while !ready.load(SeqCst) {
+///         backoff.snooze();
+///     }
+/// }
+/// ```
+///
+/// Waiting for an [`AtomicBool`] to become `true` and parking the thread after a long wait.
+/// Note that whoever sets the atomic variable to `true` must notify the parked thread by calling
+/// [`unpark()`]:
+///
+/// ```
+/// use crossbeam_utils::Backoff;
+/// use std::sync::atomic::AtomicBool;
+/// use std::sync::atomic::Ordering::SeqCst;
+/// use std::thread;
+///
+/// fn blocking_wait(ready: &AtomicBool) {
+///     let backoff = Backoff::new();
+///     while !ready.load(SeqCst) {
+///         if backoff.is_completed() {
+///             thread::park();
+///         } else {
+///             backoff.snooze();
+///         }
+///     }
+/// }
+/// ```
+///
+/// [`is_completed`]: Backoff::is_completed
+/// [`std::thread::park()`]: std::thread::park
+/// [`Condvar`]: std::sync::Condvar
+/// [`AtomicBool`]: std::sync::atomic::AtomicBool
+/// [`unpark()`]: std::thread::Thread::unpark
+pub struct Backoff {
+    step: Cell<u32>,
+}
+
+impl Backoff {
+    /// Creates a new `Backoff`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::Backoff;
+    ///
+    /// let backoff = Backoff::new();
+    /// ```
+    #[inline]
+    pub fn new() -> Self {
+        Backoff { step: Cell::new(0) }
+    }
+
+    /// Resets the `Backoff`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::Backoff;
+    ///
+    /// let backoff = Backoff::new();
+    /// backoff.reset();
+    /// ```
+    #[inline]
+    pub fn reset(&self) {
+        self.step.set(0);
+    }
+
+    /// Backs off in a lock-free loop.
+    ///
+    /// This method should be used when we need to retry an operation because another thread made
+    /// progress.
+    ///
+    /// The processor may yield using the *YIELD* or *PAUSE* instruction.
+    ///
+    /// # Examples
+    ///
+    /// Backing off in a lock-free loop:
+    ///
+    /// ```
+    /// use crossbeam_utils::Backoff;
+    /// use std::sync::atomic::AtomicUsize;
+    /// use std::sync::atomic::Ordering::SeqCst;
+    ///
+    /// fn fetch_mul(a: &AtomicUsize, b: usize) -> usize {
+    ///     let backoff = Backoff::new();
+    ///     loop {
+    ///         let val = a.load(SeqCst);
+    ///         if a.compare_exchange(val, val.wrapping_mul(b), SeqCst, SeqCst).is_ok() {
+    ///             return val;
+    ///         }
+    ///         backoff.spin();
+    ///     }
+    /// }
+    ///
+    /// let a = AtomicUsize::new(7);
+    /// assert_eq!(fetch_mul(&a, 8), 7);
+    /// assert_eq!(a.load(SeqCst), 56);
+    /// ```
+    #[inline]
+    pub fn spin(&self) {
+        for _ in 0..1 << self.step.get().min(SPIN_LIMIT) {
+            hint::spin_loop();
+        }
+
+        if self.step.get() <= SPIN_LIMIT {
+            self.step.set(self.step.get() + 1);
+        }
+    }
+
+    /// Backs off in a blocking loop.
+    ///
+    /// This method should be used when we need to wait for another thread to make progress.
+    ///
+    /// The processor may yield using the *YIELD* or *PAUSE* instruction and the current thread
+    /// may yield by giving up a timeslice to the OS scheduler.
+    ///
+    /// In `#[no_std]` environments, this method is equivalent to [`spin`].
+    ///
+    /// If possible, use [`is_completed`] to check when it is advised to stop using backoff and
+    /// block the current thread using a different synchronization mechanism instead.
+    ///
+    /// [`spin`]: Backoff::spin
+    /// [`is_completed`]: Backoff::is_completed
+    ///
+    /// # Examples
+    ///
+    /// Waiting for an [`AtomicBool`] to become `true`:
+    ///
+    /// ```
+    /// use crossbeam_utils::Backoff;
+    /// use std::sync::Arc;
+    /// use std::sync::atomic::AtomicBool;
+    /// use std::sync::atomic::Ordering::SeqCst;
+    /// use std::thread;
+    /// use std::time::Duration;
+    ///
+    /// fn spin_wait(ready: &AtomicBool) {
+    ///     let backoff = Backoff::new();
+    ///     while !ready.load(SeqCst) {
+    ///         backoff.snooze();
+    ///     }
+    /// }
+    ///
+    /// let ready = Arc::new(AtomicBool::new(false));
+    /// let ready2 = ready.clone();
+    ///
+    /// thread::spawn(move || {
+    ///     thread::sleep(Duration::from_millis(100));
+    ///     ready2.store(true, SeqCst);
+    /// });
+    ///
+    /// assert_eq!(ready.load(SeqCst), false);
+    /// spin_wait(&ready);
+    /// assert_eq!(ready.load(SeqCst), true);
+    /// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
+    /// ```
+    ///
+    /// [`AtomicBool`]: std::sync::atomic::AtomicBool
+    #[inline]
+    pub fn snooze(&self) {
+        if self.step.get() <= SPIN_LIMIT {
+            for _ in 0..1 << self.step.get() {
+                hint::spin_loop();
+            }
+        } else {
+            #[cfg(not(feature = "std"))]
+            for _ in 0..1 << self.step.get() {
+                hint::spin_loop();
+            }
+
+            #[cfg(feature = "std")]
+            ::std::thread::yield_now();
+        }
+
+        if self.step.get() <= YIELD_LIMIT {
+            self.step.set(self.step.get() + 1);
+        }
+    }
+
+    /// Returns `true` if exponential backoff has completed and blocking the thread is advised.
+    ///
+    /// # Examples
+    ///
+    /// Waiting for an [`AtomicBool`] to become `true` and parking the thread after a long wait:
+    ///
+    /// ```
+    /// use crossbeam_utils::Backoff;
+    /// use std::sync::Arc;
+    /// use std::sync::atomic::AtomicBool;
+    /// use std::sync::atomic::Ordering::SeqCst;
+    /// use std::thread;
+    /// use std::time::Duration;
+    ///
+    /// fn blocking_wait(ready: &AtomicBool) {
+    ///     let backoff = Backoff::new();
+    ///     while !ready.load(SeqCst) {
+    ///         if backoff.is_completed() {
+    ///             thread::park();
+    ///         } else {
+    ///             backoff.snooze();
+    ///         }
+    ///     }
+    /// }
+    ///
+    /// let ready = Arc::new(AtomicBool::new(false));
+    /// let ready2 = ready.clone();
+    /// let waiter = thread::current();
+    ///
+    /// thread::spawn(move || {
+    ///     thread::sleep(Duration::from_millis(100));
+    ///     ready2.store(true, SeqCst);
+    ///     waiter.unpark();
+    /// });
+    ///
+    /// assert_eq!(ready.load(SeqCst), false);
+    /// blocking_wait(&ready);
+    /// assert_eq!(ready.load(SeqCst), true);
+    /// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
+    /// ```
+    ///
+    /// [`AtomicBool`]: std::sync::atomic::AtomicBool
+    #[inline]
+    pub fn is_completed(&self) -> bool {
+        self.step.get() > YIELD_LIMIT
+    }
+}
+
+impl fmt::Debug for Backoff {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Backoff")
+            .field("step", &self.step)
+            .field("is_completed", &self.is_completed())
+            .finish()
+    }
+}
+
+impl Default for Backoff {
+    fn default() -> Backoff {
+        Backoff::new()
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/cache_padded.rs.html b/src/crossbeam_utils/cache_padded.rs.html new file mode 100644 index 0000000000..00563f5d94 --- /dev/null +++ b/src/crossbeam_utils/cache_padded.rs.html @@ -0,0 +1,433 @@ +cache_padded.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+
use core::fmt;
+use core::ops::{Deref, DerefMut};
+
+/// Pads and aligns a value to the length of a cache line.
+///
+/// In concurrent programming, sometimes it is desirable to make sure commonly accessed pieces of
+/// data are not placed into the same cache line. Updating an atomic value invalidates the whole
+/// cache line it belongs to, which makes the next access to the same cache line slower for other
+/// CPU cores. Use `CachePadded` to ensure updating one piece of data doesn't invalidate other
+/// cached data.
+///
+/// # Size and alignment
+///
+/// Cache lines are assumed to be N bytes long, depending on the architecture:
+///
+/// * On x86-64, aarch64, and powerpc64, N = 128.
+/// * On arm, mips, mips64, sparc, and hexagon, N = 32.
+/// * On m68k, N = 16.
+/// * On s390x, N = 256.
+/// * On all others, N = 64.
+///
+/// Note that N is just a reasonable guess and is not guaranteed to match the actual cache line
+/// length of the machine the program is running on. On modern Intel architectures, spatial
+/// prefetcher is pulling pairs of 64-byte cache lines at a time, so we pessimistically assume that
+/// cache lines are 128 bytes long.
+///
+/// The size of `CachePadded<T>` is the smallest multiple of N bytes large enough to accommodate
+/// a value of type `T`.
+///
+/// The alignment of `CachePadded<T>` is the maximum of N bytes and the alignment of `T`.
+///
+/// # Examples
+///
+/// Alignment and padding:
+///
+/// ```
+/// use crossbeam_utils::CachePadded;
+///
+/// let array = [CachePadded::new(1i8), CachePadded::new(2i8)];
+/// let addr1 = &*array[0] as *const i8 as usize;
+/// let addr2 = &*array[1] as *const i8 as usize;
+///
+/// assert!(addr2 - addr1 >= 32);
+/// assert_eq!(addr1 % 32, 0);
+/// assert_eq!(addr2 % 32, 0);
+/// ```
+///
+/// When building a concurrent queue with a head and a tail index, it is wise to place them in
+/// different cache lines so that concurrent threads pushing and popping elements don't invalidate
+/// each other's cache lines:
+///
+/// ```
+/// use crossbeam_utils::CachePadded;
+/// use std::sync::atomic::AtomicUsize;
+///
+/// struct Queue<T> {
+///     head: CachePadded<AtomicUsize>,
+///     tail: CachePadded<AtomicUsize>,
+///     buffer: *mut T,
+/// }
+/// ```
+#[derive(Clone, Copy, Default, Hash, PartialEq, Eq)]
+// Starting from Intel's Sandy Bridge, spatial prefetcher is now pulling pairs of 64-byte cache
+// lines at a time, so we have to align to 128 bytes rather than 64.
+//
+// Sources:
+// - https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
+// - https://github.com/facebook/folly/blob/1b5288e6eea6df074758f877c849b6e73bbb9fbb/folly/lang/Align.h#L107
+//
+// ARM's big.LITTLE architecture has asymmetric cores and "big" cores have 128-byte cache line size.
+//
+// Sources:
+// - https://www.mono-project.com/news/2016/09/12/arm64-icache/
+//
+// powerpc64 has 128-byte cache line size.
+//
+// Sources:
+// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_ppc64x.go#L9
+// - https://github.com/torvalds/linux/blob/3516bd729358a2a9b090c1905bd2a3fa926e24c6/arch/powerpc/include/asm/cache.h#L26
+#[cfg_attr(
+    any(
+        target_arch = "x86_64",
+        target_arch = "aarch64",
+        target_arch = "powerpc64",
+    ),
+    repr(align(128))
+)]
+// arm, mips, mips64, sparc, and hexagon have 32-byte cache line size.
+//
+// Sources:
+// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_arm.go#L7
+// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips.go#L7
+// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mipsle.go#L7
+// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips64x.go#L9
+// - https://github.com/torvalds/linux/blob/3516bd729358a2a9b090c1905bd2a3fa926e24c6/arch/sparc/include/asm/cache.h#L17
+// - https://github.com/torvalds/linux/blob/3516bd729358a2a9b090c1905bd2a3fa926e24c6/arch/hexagon/include/asm/cache.h#L12
+#[cfg_attr(
+    any(
+        target_arch = "arm",
+        target_arch = "mips",
+        target_arch = "mips32r6",
+        target_arch = "mips64",
+        target_arch = "mips64r6",
+        target_arch = "sparc",
+        target_arch = "hexagon",
+    ),
+    repr(align(32))
+)]
+// m68k has 16-byte cache line size.
+//
+// Sources:
+// - https://github.com/torvalds/linux/blob/3516bd729358a2a9b090c1905bd2a3fa926e24c6/arch/m68k/include/asm/cache.h#L9
+#[cfg_attr(target_arch = "m68k", repr(align(16)))]
+// s390x has 256-byte cache line size.
+//
+// Sources:
+// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_s390x.go#L7
+// - https://github.com/torvalds/linux/blob/3516bd729358a2a9b090c1905bd2a3fa926e24c6/arch/s390/include/asm/cache.h#L13
+#[cfg_attr(target_arch = "s390x", repr(align(256)))]
+// x86, wasm, riscv, and sparc64 have 64-byte cache line size.
+//
+// Sources:
+// - https://github.com/golang/go/blob/dda2991c2ea0c5914714469c4defc2562a907230/src/internal/cpu/cpu_x86.go#L9
+// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_wasm.go#L7
+// - https://github.com/torvalds/linux/blob/3516bd729358a2a9b090c1905bd2a3fa926e24c6/arch/riscv/include/asm/cache.h#L10
+// - https://github.com/torvalds/linux/blob/3516bd729358a2a9b090c1905bd2a3fa926e24c6/arch/sparc/include/asm/cache.h#L19
+//
+// All others are assumed to have 64-byte cache line size.
+#[cfg_attr(
+    not(any(
+        target_arch = "x86_64",
+        target_arch = "aarch64",
+        target_arch = "powerpc64",
+        target_arch = "arm",
+        target_arch = "mips",
+        target_arch = "mips32r6",
+        target_arch = "mips64",
+        target_arch = "mips64r6",
+        target_arch = "sparc",
+        target_arch = "hexagon",
+        target_arch = "m68k",
+        target_arch = "s390x",
+    )),
+    repr(align(64))
+)]
+pub struct CachePadded<T> {
+    value: T,
+}
+
+unsafe impl<T: Send> Send for CachePadded<T> {}
+unsafe impl<T: Sync> Sync for CachePadded<T> {}
+
+impl<T> CachePadded<T> {
+    /// Pads and aligns a value to the length of a cache line.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::CachePadded;
+    ///
+    /// let padded_value = CachePadded::new(1);
+    /// ```
+    pub const fn new(t: T) -> CachePadded<T> {
+        CachePadded::<T> { value: t }
+    }
+
+    /// Returns the inner value.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::CachePadded;
+    ///
+    /// let padded_value = CachePadded::new(7);
+    /// let value = padded_value.into_inner();
+    /// assert_eq!(value, 7);
+    /// ```
+    pub fn into_inner(self) -> T {
+        self.value
+    }
+}
+
+impl<T> Deref for CachePadded<T> {
+    type Target = T;
+
+    fn deref(&self) -> &T {
+        &self.value
+    }
+}
+
+impl<T> DerefMut for CachePadded<T> {
+    fn deref_mut(&mut self) -> &mut T {
+        &mut self.value
+    }
+}
+
+impl<T: fmt::Debug> fmt::Debug for CachePadded<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("CachePadded")
+            .field("value", &self.value)
+            .finish()
+    }
+}
+
+impl<T> From<T> for CachePadded<T> {
+    fn from(t: T) -> Self {
+        CachePadded::new(t)
+    }
+}
+
+impl<T: fmt::Display> fmt::Display for CachePadded<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt::Display::fmt(&self.value, f)
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/lib.rs.html b/src/crossbeam_utils/lib.rs.html new file mode 100644 index 0000000000..ef88df98bf --- /dev/null +++ b/src/crossbeam_utils/lib.rs.html @@ -0,0 +1,223 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+
//! Miscellaneous tools for concurrent programming.
+//!
+//! ## Atomics
+//!
+//! * [`AtomicCell`], a thread-safe mutable memory location.
+//! * [`AtomicConsume`], for reading from primitive atomic types with "consume" ordering.
+//!
+//! ## Thread synchronization
+//!
+//! * [`Parker`], a thread parking primitive.
+//! * [`ShardedLock`], a sharded reader-writer lock with fast concurrent reads.
+//! * [`WaitGroup`], for synchronizing the beginning or end of some computation.
+//!
+//! ## Utilities
+//!
+//! * [`Backoff`], for exponential backoff in spin loops.
+//! * [`CachePadded`], for padding and aligning a value to the length of a cache line.
+//! * [`scope`], for spawning threads that borrow local variables from the stack.
+//!
+//! [`AtomicCell`]: atomic::AtomicCell
+//! [`AtomicConsume`]: atomic::AtomicConsume
+//! [`Parker`]: sync::Parker
+//! [`ShardedLock`]: sync::ShardedLock
+//! [`WaitGroup`]: sync::WaitGroup
+//! [`scope`]: thread::scope
+
+#![no_std]
+#![doc(test(
+    no_crate_inject,
+    attr(
+        deny(warnings, rust_2018_idioms),
+        allow(dead_code, unused_assignments, unused_variables)
+    )
+))]
+#![warn(
+    missing_docs,
+    missing_debug_implementations,
+    rust_2018_idioms,
+    unreachable_pub
+)]
+
+#[cfg(feature = "std")]
+extern crate std;
+
+#[cfg(crossbeam_loom)]
+#[allow(unused_imports)]
+mod primitive {
+    pub(crate) mod hint {
+        pub(crate) use loom::hint::spin_loop;
+    }
+    pub(crate) mod sync {
+        pub(crate) mod atomic {
+            pub(crate) use loom::sync::atomic::{
+                AtomicBool, AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize, AtomicU16,
+                AtomicU32, AtomicU64, AtomicU8, AtomicUsize, Ordering,
+            };
+
+            // FIXME: loom does not support compiler_fence at the moment.
+            // https://github.com/tokio-rs/loom/issues/117
+            // we use fence as a stand-in for compiler_fence for the time being.
+            // this may miss some races since fence is stronger than compiler_fence,
+            // but it's the best we can do for the time being.
+            pub(crate) use loom::sync::atomic::fence as compiler_fence;
+        }
+        pub(crate) use loom::sync::{Arc, Condvar, Mutex};
+    }
+}
+#[cfg(not(crossbeam_loom))]
+#[allow(unused_imports)]
+mod primitive {
+    pub(crate) mod hint {
+        pub(crate) use core::hint::spin_loop;
+    }
+    pub(crate) mod sync {
+        pub(crate) mod atomic {
+            pub(crate) use core::sync::atomic::{compiler_fence, Ordering};
+            #[cfg(not(crossbeam_no_atomic))]
+            pub(crate) use core::sync::atomic::{
+                AtomicBool, AtomicI16, AtomicI8, AtomicIsize, AtomicU16, AtomicU8, AtomicUsize,
+            };
+            #[cfg(not(crossbeam_no_atomic))]
+            #[cfg(any(target_has_atomic = "32", not(target_pointer_width = "16")))]
+            pub(crate) use core::sync::atomic::{AtomicI32, AtomicU32};
+            #[cfg(not(crossbeam_no_atomic))]
+            #[cfg(any(
+                target_has_atomic = "64",
+                not(any(target_pointer_width = "16", target_pointer_width = "32")),
+            ))]
+            pub(crate) use core::sync::atomic::{AtomicI64, AtomicU64};
+        }
+
+        #[cfg(feature = "std")]
+        pub(crate) use std::sync::{Arc, Condvar, Mutex};
+    }
+}
+
+pub mod atomic;
+
+mod cache_padded;
+pub use crate::cache_padded::CachePadded;
+
+mod backoff;
+pub use crate::backoff::Backoff;
+
+#[cfg(feature = "std")]
+pub mod sync;
+
+#[cfg(feature = "std")]
+#[cfg(not(crossbeam_loom))]
+pub mod thread;
+
\ No newline at end of file diff --git a/src/crossbeam_utils/sync/mod.rs.html b/src/crossbeam_utils/sync/mod.rs.html new file mode 100644 index 0000000000..07c2ffdf33 --- /dev/null +++ b/src/crossbeam_utils/sync/mod.rs.html @@ -0,0 +1,37 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+
//! Thread synchronization primitives.
+//!
+//! * [`Parker`], a thread parking primitive.
+//! * [`ShardedLock`], a sharded reader-writer lock with fast concurrent reads.
+//! * [`WaitGroup`], for synchronizing the beginning or end of some computation.
+
+#[cfg(not(crossbeam_loom))]
+mod once_lock;
+mod parker;
+#[cfg(not(crossbeam_loom))]
+mod sharded_lock;
+mod wait_group;
+
+pub use self::parker::{Parker, Unparker};
+#[cfg(not(crossbeam_loom))]
+pub use self::sharded_lock::{ShardedLock, ShardedLockReadGuard, ShardedLockWriteGuard};
+pub use self::wait_group::WaitGroup;
+
\ No newline at end of file diff --git a/src/crossbeam_utils/sync/once_lock.rs.html b/src/crossbeam_utils/sync/once_lock.rs.html new file mode 100644 index 0000000000..e02a840c66 --- /dev/null +++ b/src/crossbeam_utils/sync/once_lock.rs.html @@ -0,0 +1,179 @@ +once_lock.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+
// Based on unstable std::sync::OnceLock.
+//
+// Source: https://github.com/rust-lang/rust/blob/8e9c93df464b7ada3fc7a1c8ccddd9dcb24ee0a0/library/std/src/sync/once_lock.rs
+
+use core::cell::UnsafeCell;
+use core::mem::MaybeUninit;
+use std::sync::Once;
+
+pub(crate) struct OnceLock<T> {
+    once: Once,
+    value: UnsafeCell<MaybeUninit<T>>,
+    // Unlike std::sync::OnceLock, we don't need PhantomData here because
+    // we don't use #[may_dangle].
+}
+
+unsafe impl<T: Sync + Send> Sync for OnceLock<T> {}
+unsafe impl<T: Send> Send for OnceLock<T> {}
+
+impl<T> OnceLock<T> {
+    /// Creates a new empty cell.
+    #[must_use]
+    pub(crate) const fn new() -> Self {
+        Self {
+            once: Once::new(),
+            value: UnsafeCell::new(MaybeUninit::uninit()),
+        }
+    }
+
+    /// Gets the contents of the cell, initializing it with `f` if the cell
+    /// was empty.
+    ///
+    /// Many threads may call `get_or_init` concurrently with different
+    /// initializing functions, but it is guaranteed that only one function
+    /// will be executed.
+    ///
+    /// # Panics
+    ///
+    /// If `f` panics, the panic is propagated to the caller, and the cell
+    /// remains uninitialized.
+    ///
+    /// It is an error to reentrantly initialize the cell from `f`. The
+    /// exact outcome is unspecified. Current implementation deadlocks, but
+    /// this may be changed to a panic in the future.
+    pub(crate) fn get_or_init<F>(&self, f: F) -> &T
+    where
+        F: FnOnce() -> T,
+    {
+        // Fast path check
+        if self.once.is_completed() {
+            // SAFETY: The inner value has been initialized
+            return unsafe { self.get_unchecked() };
+        }
+        self.initialize(f);
+
+        // SAFETY: The inner value has been initialized
+        unsafe { self.get_unchecked() }
+    }
+
+    #[cold]
+    fn initialize<F>(&self, f: F)
+    where
+        F: FnOnce() -> T,
+    {
+        let slot = self.value.get();
+
+        self.once.call_once(|| {
+            let value = f();
+            unsafe { slot.write(MaybeUninit::new(value)) }
+        });
+    }
+
+    /// # Safety
+    ///
+    /// The value must be initialized
+    unsafe fn get_unchecked(&self) -> &T {
+        debug_assert!(self.once.is_completed());
+        &*self.value.get().cast::<T>()
+    }
+}
+
+impl<T> Drop for OnceLock<T> {
+    fn drop(&mut self) {
+        if self.once.is_completed() {
+            // SAFETY: The inner value has been initialized
+            unsafe { (*self.value.get()).assume_init_drop() };
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/sync/parker.rs.html b/src/crossbeam_utils/sync/parker.rs.html new file mode 100644 index 0000000000..39d19d3409 --- /dev/null +++ b/src/crossbeam_utils/sync/parker.rs.html @@ -0,0 +1,833 @@ +parker.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+
use crate::primitive::sync::atomic::{AtomicUsize, Ordering::SeqCst};
+use crate::primitive::sync::{Arc, Condvar, Mutex};
+use std::fmt;
+use std::marker::PhantomData;
+use std::time::{Duration, Instant};
+
+/// A thread parking primitive.
+///
+/// Conceptually, each `Parker` has an associated token which is initially not present:
+///
+/// * The [`park`] method blocks the current thread unless or until the token is available, at
+///   which point it automatically consumes the token.
+///
+/// * The [`park_timeout`] and [`park_deadline`] methods work the same as [`park`], but block for
+///   a specified maximum time.
+///
+/// * The [`unpark`] method atomically makes the token available if it wasn't already. Because the
+///   token is initially absent, [`unpark`] followed by [`park`] will result in the second call
+///   returning immediately.
+///
+/// In other words, each `Parker` acts a bit like a spinlock that can be locked and unlocked using
+/// [`park`] and [`unpark`].
+///
+/// # Examples
+///
+/// ```
+/// use std::thread;
+/// use std::time::Duration;
+/// use crossbeam_utils::sync::Parker;
+///
+/// let p = Parker::new();
+/// let u = p.unparker().clone();
+///
+/// // Make the token available.
+/// u.unpark();
+/// // Wakes up immediately and consumes the token.
+/// p.park();
+///
+/// thread::spawn(move || {
+///     thread::sleep(Duration::from_millis(500));
+///     u.unpark();
+/// });
+///
+/// // Wakes up when `u.unpark()` provides the token.
+/// p.park();
+/// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
+/// ```
+///
+/// [`park`]: Parker::park
+/// [`park_timeout`]: Parker::park_timeout
+/// [`park_deadline`]: Parker::park_deadline
+/// [`unpark`]: Unparker::unpark
+pub struct Parker {
+    unparker: Unparker,
+    _marker: PhantomData<*const ()>,
+}
+
+unsafe impl Send for Parker {}
+
+impl Default for Parker {
+    fn default() -> Self {
+        Self {
+            unparker: Unparker {
+                inner: Arc::new(Inner {
+                    state: AtomicUsize::new(EMPTY),
+                    lock: Mutex::new(()),
+                    cvar: Condvar::new(),
+                }),
+            },
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl Parker {
+    /// Creates a new `Parker`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    /// ```
+    ///
+    pub fn new() -> Parker {
+        Self::default()
+    }
+
+    /// Blocks the current thread until the token is made available.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    /// let u = p.unparker().clone();
+    ///
+    /// // Make the token available.
+    /// u.unpark();
+    ///
+    /// // Wakes up immediately and consumes the token.
+    /// p.park();
+    /// ```
+    pub fn park(&self) {
+        self.unparker.inner.park(None);
+    }
+
+    /// Blocks the current thread until the token is made available, but only for a limited time.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::time::Duration;
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    ///
+    /// // Waits for the token to become available, but will not wait longer than 500 ms.
+    /// p.park_timeout(Duration::from_millis(500));
+    /// ```
+    pub fn park_timeout(&self, timeout: Duration) {
+        match Instant::now().checked_add(timeout) {
+            Some(deadline) => self.park_deadline(deadline),
+            None => self.park(),
+        }
+    }
+
+    /// Blocks the current thread until the token is made available, or until a certain deadline.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::time::{Duration, Instant};
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    /// let deadline = Instant::now() + Duration::from_millis(500);
+    ///
+    /// // Waits for the token to become available, but will not wait longer than 500 ms.
+    /// p.park_deadline(deadline);
+    /// ```
+    pub fn park_deadline(&self, deadline: Instant) {
+        self.unparker.inner.park(Some(deadline))
+    }
+
+    /// Returns a reference to an associated [`Unparker`].
+    ///
+    /// The returned [`Unparker`] doesn't have to be used by reference - it can also be cloned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    /// let u = p.unparker().clone();
+    ///
+    /// // Make the token available.
+    /// u.unpark();
+    /// // Wakes up immediately and consumes the token.
+    /// p.park();
+    /// ```
+    ///
+    /// [`park`]: Parker::park
+    /// [`park_timeout`]: Parker::park_timeout
+    pub fn unparker(&self) -> &Unparker {
+        &self.unparker
+    }
+
+    /// Converts a `Parker` into a raw pointer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    /// let raw = Parker::into_raw(p);
+    /// # let _ = unsafe { Parker::from_raw(raw) };
+    /// ```
+    pub fn into_raw(this: Parker) -> *const () {
+        Unparker::into_raw(this.unparker)
+    }
+
+    /// Converts a raw pointer into a `Parker`.
+    ///
+    /// # Safety
+    ///
+    /// This method is safe to use only with pointers returned by [`Parker::into_raw`].
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    /// let raw = Parker::into_raw(p);
+    /// let p = unsafe { Parker::from_raw(raw) };
+    /// ```
+    pub unsafe fn from_raw(ptr: *const ()) -> Parker {
+        Parker {
+            unparker: Unparker::from_raw(ptr),
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl fmt::Debug for Parker {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Parker { .. }")
+    }
+}
+
+/// Unparks a thread parked by the associated [`Parker`].
+pub struct Unparker {
+    inner: Arc<Inner>,
+}
+
+unsafe impl Send for Unparker {}
+unsafe impl Sync for Unparker {}
+
+impl Unparker {
+    /// Atomically makes the token available if it is not already.
+    ///
+    /// This method will wake up the thread blocked on [`park`] or [`park_timeout`], if there is
+    /// any.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::thread;
+    /// use std::time::Duration;
+    /// use crossbeam_utils::sync::Parker;
+    ///
+    /// let p = Parker::new();
+    /// let u = p.unparker().clone();
+    ///
+    /// thread::spawn(move || {
+    ///     thread::sleep(Duration::from_millis(500));
+    ///     u.unpark();
+    /// });
+    ///
+    /// // Wakes up when `u.unpark()` provides the token.
+    /// p.park();
+    /// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
+    /// ```
+    ///
+    /// [`park`]: Parker::park
+    /// [`park_timeout`]: Parker::park_timeout
+    pub fn unpark(&self) {
+        self.inner.unpark()
+    }
+
+    /// Converts an `Unparker` into a raw pointer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::{Parker, Unparker};
+    ///
+    /// let p = Parker::new();
+    /// let u = p.unparker().clone();
+    /// let raw = Unparker::into_raw(u);
+    /// # let _ = unsafe { Unparker::from_raw(raw) };
+    /// ```
+    pub fn into_raw(this: Unparker) -> *const () {
+        Arc::into_raw(this.inner).cast::<()>()
+    }
+
+    /// Converts a raw pointer into an `Unparker`.
+    ///
+    /// # Safety
+    ///
+    /// This method is safe to use only with pointers returned by [`Unparker::into_raw`].
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::{Parker, Unparker};
+    ///
+    /// let p = Parker::new();
+    /// let u = p.unparker().clone();
+    ///
+    /// let raw = Unparker::into_raw(u);
+    /// let u = unsafe { Unparker::from_raw(raw) };
+    /// ```
+    pub unsafe fn from_raw(ptr: *const ()) -> Unparker {
+        Unparker {
+            inner: Arc::from_raw(ptr.cast::<Inner>()),
+        }
+    }
+}
+
+impl fmt::Debug for Unparker {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Unparker { .. }")
+    }
+}
+
+impl Clone for Unparker {
+    fn clone(&self) -> Unparker {
+        Unparker {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+const EMPTY: usize = 0;
+const PARKED: usize = 1;
+const NOTIFIED: usize = 2;
+
+struct Inner {
+    state: AtomicUsize,
+    lock: Mutex<()>,
+    cvar: Condvar,
+}
+
+impl Inner {
+    fn park(&self, deadline: Option<Instant>) {
+        // If we were previously notified then we consume this notification and return quickly.
+        if self
+            .state
+            .compare_exchange(NOTIFIED, EMPTY, SeqCst, SeqCst)
+            .is_ok()
+        {
+            return;
+        }
+
+        // If the timeout is zero, then there is no need to actually block.
+        if let Some(deadline) = deadline {
+            if deadline <= Instant::now() {
+                return;
+            }
+        }
+
+        // Otherwise we need to coordinate going to sleep.
+        let mut m = self.lock.lock().unwrap();
+
+        match self.state.compare_exchange(EMPTY, PARKED, SeqCst, SeqCst) {
+            Ok(_) => {}
+            // Consume this notification to avoid spurious wakeups in the next park.
+            Err(NOTIFIED) => {
+                // We must read `state` here, even though we know it will be `NOTIFIED`. This is
+                // because `unpark` may have been called again since we read `NOTIFIED` in the
+                // `compare_exchange` above. We must perform an acquire operation that synchronizes
+                // with that `unpark` to observe any writes it made before the call to `unpark`. To
+                // do that we must read from the write it made to `state`.
+                let old = self.state.swap(EMPTY, SeqCst);
+                assert_eq!(old, NOTIFIED, "park state changed unexpectedly");
+                return;
+            }
+            Err(n) => panic!("inconsistent park_timeout state: {}", n),
+        }
+
+        loop {
+            // Block the current thread on the conditional variable.
+            m = match deadline {
+                None => self.cvar.wait(m).unwrap(),
+                Some(deadline) => {
+                    let now = Instant::now();
+                    if now < deadline {
+                        // We could check for a timeout here, in the return value of wait_timeout,
+                        // but in the case that a timeout and an unpark arrive simultaneously, we
+                        // prefer to report the former.
+                        self.cvar.wait_timeout(m, deadline - now).unwrap().0
+                    } else {
+                        // We've timed out; swap out the state back to empty on our way out
+                        match self.state.swap(EMPTY, SeqCst) {
+                            NOTIFIED | PARKED => return,
+                            n => panic!("inconsistent park_timeout state: {}", n),
+                        };
+                    }
+                }
+            };
+
+            if self
+                .state
+                .compare_exchange(NOTIFIED, EMPTY, SeqCst, SeqCst)
+                .is_ok()
+            {
+                // got a notification
+                return;
+            }
+
+            // Spurious wakeup, go back to sleep. Alternatively, if we timed out, it will be caught
+            // in the branch above, when we discover the deadline is in the past
+        }
+    }
+
+    pub(crate) fn unpark(&self) {
+        // To ensure the unparked thread will observe any writes we made before this call, we must
+        // perform a release operation that `park` can synchronize with. To do that we must write
+        // `NOTIFIED` even if `state` is already `NOTIFIED`. That is why this must be a swap rather
+        // than a compare-and-swap that returns if it reads `NOTIFIED` on failure.
+        match self.state.swap(NOTIFIED, SeqCst) {
+            EMPTY => return,    // no one was waiting
+            NOTIFIED => return, // already unparked
+            PARKED => {}        // gotta go wake someone up
+            _ => panic!("inconsistent state in unpark"),
+        }
+
+        // There is a period between when the parked thread sets `state` to `PARKED` (or last
+        // checked `state` in the case of a spurious wakeup) and when it actually waits on `cvar`.
+        // If we were to notify during this period it would be ignored and then when the parked
+        // thread went to sleep it would never wake up. Fortunately, it has `lock` locked at this
+        // stage so we can acquire `lock` to wait until it is ready to receive the notification.
+        //
+        // Releasing `lock` before the call to `notify_one` means that when the parked thread wakes
+        // it doesn't get woken only to have to wait for us to release `lock`.
+        drop(self.lock.lock().unwrap());
+        self.cvar.notify_one();
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/sync/sharded_lock.rs.html b/src/crossbeam_utils/sync/sharded_lock.rs.html new file mode 100644 index 0000000000..c02e7d096b --- /dev/null +++ b/src/crossbeam_utils/sync/sharded_lock.rs.html @@ -0,0 +1,1279 @@ +sharded_lock.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+
use std::boxed::Box;
+use std::cell::UnsafeCell;
+use std::collections::HashMap;
+use std::fmt;
+use std::marker::PhantomData;
+use std::mem;
+use std::ops::{Deref, DerefMut};
+use std::panic::{RefUnwindSafe, UnwindSafe};
+use std::sync::{LockResult, PoisonError, TryLockError, TryLockResult};
+use std::sync::{Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard};
+use std::thread::{self, ThreadId};
+use std::vec::Vec;
+
+use crate::sync::once_lock::OnceLock;
+use crate::CachePadded;
+
+/// The number of shards per sharded lock. Must be a power of two.
+const NUM_SHARDS: usize = 8;
+
+/// A shard containing a single reader-writer lock.
+struct Shard {
+    /// The inner reader-writer lock.
+    lock: RwLock<()>,
+
+    /// The write-guard keeping this shard locked.
+    ///
+    /// Write operations will lock each shard and store the guard here. These guards get dropped at
+    /// the same time the big guard is dropped.
+    write_guard: UnsafeCell<Option<RwLockWriteGuard<'static, ()>>>,
+}
+
+/// A sharded reader-writer lock.
+///
+/// This lock is equivalent to [`RwLock`], except read operations are faster and write operations
+/// are slower.
+///
+/// A `ShardedLock` is internally made of a list of *shards*, each being a [`RwLock`] occupying a
+/// single cache line. Read operations will pick one of the shards depending on the current thread
+/// and lock it. Write operations need to lock all shards in succession.
+///
+/// By splitting the lock into shards, concurrent read operations will in most cases choose
+/// different shards and thus update different cache lines, which is good for scalability. However,
+/// write operations need to do more work and are therefore slower than usual.
+///
+/// The priority policy of the lock is dependent on the underlying operating system's
+/// implementation, and this type does not guarantee that any particular policy will be used.
+///
+/// # Poisoning
+///
+/// A `ShardedLock`, like [`RwLock`], will become poisoned on a panic. Note that it may only be
+/// poisoned if a panic occurs while a write operation is in progress. If a panic occurs in any
+/// read operation, the lock will not be poisoned.
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_utils::sync::ShardedLock;
+///
+/// let lock = ShardedLock::new(5);
+///
+/// // Any number of read locks can be held at once.
+/// {
+///     let r1 = lock.read().unwrap();
+///     let r2 = lock.read().unwrap();
+///     assert_eq!(*r1, 5);
+///     assert_eq!(*r2, 5);
+/// } // Read locks are dropped at this point.
+///
+/// // However, only one write lock may be held.
+/// {
+///     let mut w = lock.write().unwrap();
+///     *w += 1;
+///     assert_eq!(*w, 6);
+/// } // Write lock is dropped here.
+/// ```
+///
+/// [`RwLock`]: std::sync::RwLock
+pub struct ShardedLock<T: ?Sized> {
+    /// A list of locks protecting the internal data.
+    shards: Box<[CachePadded<Shard>]>,
+
+    /// The internal data.
+    value: UnsafeCell<T>,
+}
+
+unsafe impl<T: ?Sized + Send> Send for ShardedLock<T> {}
+unsafe impl<T: ?Sized + Send + Sync> Sync for ShardedLock<T> {}
+
+impl<T: ?Sized> UnwindSafe for ShardedLock<T> {}
+impl<T: ?Sized> RefUnwindSafe for ShardedLock<T> {}
+
+impl<T> ShardedLock<T> {
+    /// Creates a new sharded reader-writer lock.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    ///
+    /// let lock = ShardedLock::new(5);
+    /// ```
+    pub fn new(value: T) -> ShardedLock<T> {
+        ShardedLock {
+            shards: (0..NUM_SHARDS)
+                .map(|_| {
+                    CachePadded::new(Shard {
+                        lock: RwLock::new(()),
+                        write_guard: UnsafeCell::new(None),
+                    })
+                })
+                .collect::<Box<[_]>>(),
+            value: UnsafeCell::new(value),
+        }
+    }
+
+    /// Consumes this lock, returning the underlying data.
+    ///
+    /// # Errors
+    ///
+    /// This method will return an error if the lock is poisoned. A lock gets poisoned when a write
+    /// operation panics.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    ///
+    /// let lock = ShardedLock::new(String::new());
+    /// {
+    ///     let mut s = lock.write().unwrap();
+    ///     *s = "modified".to_owned();
+    /// }
+    /// assert_eq!(lock.into_inner().unwrap(), "modified");
+    /// ```
+    pub fn into_inner(self) -> LockResult<T> {
+        let is_poisoned = self.is_poisoned();
+        let inner = self.value.into_inner();
+
+        if is_poisoned {
+            Err(PoisonError::new(inner))
+        } else {
+            Ok(inner)
+        }
+    }
+}
+
+impl<T: ?Sized> ShardedLock<T> {
+    /// Returns `true` if the lock is poisoned.
+    ///
+    /// If another thread can still access the lock, it may become poisoned at any time. A `false`
+    /// result should not be trusted without additional synchronization.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    /// use std::sync::Arc;
+    /// use std::thread;
+    ///
+    /// let lock = Arc::new(ShardedLock::new(0));
+    /// let c_lock = lock.clone();
+    ///
+    /// let _ = thread::spawn(move || {
+    ///     let _lock = c_lock.write().unwrap();
+    ///     panic!(); // the lock gets poisoned
+    /// }).join();
+    /// assert_eq!(lock.is_poisoned(), true);
+    /// ```
+    pub fn is_poisoned(&self) -> bool {
+        self.shards[0].lock.is_poisoned()
+    }
+
+    /// Returns a mutable reference to the underlying data.
+    ///
+    /// Since this call borrows the lock mutably, no actual locking needs to take place.
+    ///
+    /// # Errors
+    ///
+    /// This method will return an error if the lock is poisoned. A lock gets poisoned when a write
+    /// operation panics.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    ///
+    /// let mut lock = ShardedLock::new(0);
+    /// *lock.get_mut().unwrap() = 10;
+    /// assert_eq!(*lock.read().unwrap(), 10);
+    /// ```
+    pub fn get_mut(&mut self) -> LockResult<&mut T> {
+        let is_poisoned = self.is_poisoned();
+        let inner = unsafe { &mut *self.value.get() };
+
+        if is_poisoned {
+            Err(PoisonError::new(inner))
+        } else {
+            Ok(inner)
+        }
+    }
+
+    /// Attempts to acquire this lock with shared read access.
+    ///
+    /// If the access could not be granted at this time, an error is returned. Otherwise, a guard
+    /// is returned which will release the shared access when it is dropped. This method does not
+    /// provide any guarantees with respect to the ordering of whether contentious readers or
+    /// writers will acquire the lock first.
+    ///
+    /// # Errors
+    ///
+    /// This method will return an error if the lock is poisoned. A lock gets poisoned when a write
+    /// operation panics.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    ///
+    /// let lock = ShardedLock::new(1);
+    ///
+    /// match lock.try_read() {
+    ///     Ok(n) => assert_eq!(*n, 1),
+    ///     Err(_) => unreachable!(),
+    /// };
+    /// ```
+    pub fn try_read(&self) -> TryLockResult<ShardedLockReadGuard<'_, T>> {
+        // Take the current thread index and map it to a shard index. Thread indices will tend to
+        // distribute shards among threads equally, thus reducing contention due to read-locking.
+        let current_index = current_index().unwrap_or(0);
+        let shard_index = current_index & (self.shards.len() - 1);
+
+        match self.shards[shard_index].lock.try_read() {
+            Ok(guard) => Ok(ShardedLockReadGuard {
+                lock: self,
+                _guard: guard,
+                _marker: PhantomData,
+            }),
+            Err(TryLockError::Poisoned(err)) => {
+                let guard = ShardedLockReadGuard {
+                    lock: self,
+                    _guard: err.into_inner(),
+                    _marker: PhantomData,
+                };
+                Err(TryLockError::Poisoned(PoisonError::new(guard)))
+            }
+            Err(TryLockError::WouldBlock) => Err(TryLockError::WouldBlock),
+        }
+    }
+
+    /// Locks with shared read access, blocking the current thread until it can be acquired.
+    ///
+    /// The calling thread will be blocked until there are no more writers which hold the lock.
+    /// There may be other readers currently inside the lock when this method returns. This method
+    /// does not provide any guarantees with respect to the ordering of whether contentious readers
+    /// or writers will acquire the lock first.
+    ///
+    /// Returns a guard which will release the shared access when dropped.
+    ///
+    /// # Errors
+    ///
+    /// This method will return an error if the lock is poisoned. A lock gets poisoned when a write
+    /// operation panics.
+    ///
+    /// # Panics
+    ///
+    /// This method might panic when called if the lock is already held by the current thread.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    /// use std::sync::Arc;
+    /// use std::thread;
+    ///
+    /// let lock = Arc::new(ShardedLock::new(1));
+    /// let c_lock = lock.clone();
+    ///
+    /// let n = lock.read().unwrap();
+    /// assert_eq!(*n, 1);
+    ///
+    /// thread::spawn(move || {
+    ///     let r = c_lock.read();
+    ///     assert!(r.is_ok());
+    /// }).join().unwrap();
+    /// ```
+    pub fn read(&self) -> LockResult<ShardedLockReadGuard<'_, T>> {
+        // Take the current thread index and map it to a shard index. Thread indices will tend to
+        // distribute shards among threads equally, thus reducing contention due to read-locking.
+        let current_index = current_index().unwrap_or(0);
+        let shard_index = current_index & (self.shards.len() - 1);
+
+        match self.shards[shard_index].lock.read() {
+            Ok(guard) => Ok(ShardedLockReadGuard {
+                lock: self,
+                _guard: guard,
+                _marker: PhantomData,
+            }),
+            Err(err) => Err(PoisonError::new(ShardedLockReadGuard {
+                lock: self,
+                _guard: err.into_inner(),
+                _marker: PhantomData,
+            })),
+        }
+    }
+
+    /// Attempts to acquire this lock with exclusive write access.
+    ///
+    /// If the access could not be granted at this time, an error is returned. Otherwise, a guard
+    /// is returned which will release the exclusive access when it is dropped. This method does
+    /// not provide any guarantees with respect to the ordering of whether contentious readers or
+    /// writers will acquire the lock first.
+    ///
+    /// # Errors
+    ///
+    /// This method will return an error if the lock is poisoned. A lock gets poisoned when a write
+    /// operation panics.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    ///
+    /// let lock = ShardedLock::new(1);
+    ///
+    /// let n = lock.read().unwrap();
+    /// assert_eq!(*n, 1);
+    ///
+    /// assert!(lock.try_write().is_err());
+    /// ```
+    pub fn try_write(&self) -> TryLockResult<ShardedLockWriteGuard<'_, T>> {
+        let mut poisoned = false;
+        let mut blocked = None;
+
+        // Write-lock each shard in succession.
+        for (i, shard) in self.shards.iter().enumerate() {
+            let guard = match shard.lock.try_write() {
+                Ok(guard) => guard,
+                Err(TryLockError::Poisoned(err)) => {
+                    poisoned = true;
+                    err.into_inner()
+                }
+                Err(TryLockError::WouldBlock) => {
+                    blocked = Some(i);
+                    break;
+                }
+            };
+
+            // Store the guard into the shard.
+            unsafe {
+                let guard: RwLockWriteGuard<'static, ()> = mem::transmute(guard);
+                let dest: *mut _ = shard.write_guard.get();
+                *dest = Some(guard);
+            }
+        }
+
+        if let Some(i) = blocked {
+            // Unlock the shards in reverse order of locking.
+            for shard in self.shards[0..i].iter().rev() {
+                unsafe {
+                    let dest: *mut _ = shard.write_guard.get();
+                    let guard = (*dest).take();
+                    drop(guard);
+                }
+            }
+            Err(TryLockError::WouldBlock)
+        } else if poisoned {
+            let guard = ShardedLockWriteGuard {
+                lock: self,
+                _marker: PhantomData,
+            };
+            Err(TryLockError::Poisoned(PoisonError::new(guard)))
+        } else {
+            Ok(ShardedLockWriteGuard {
+                lock: self,
+                _marker: PhantomData,
+            })
+        }
+    }
+
+    /// Locks with exclusive write access, blocking the current thread until it can be acquired.
+    ///
+    /// The calling thread will be blocked until there are no more writers which hold the lock.
+    /// There may be other readers currently inside the lock when this method returns. This method
+    /// does not provide any guarantees with respect to the ordering of whether contentious readers
+    /// or writers will acquire the lock first.
+    ///
+    /// Returns a guard which will release the exclusive access when dropped.
+    ///
+    /// # Errors
+    ///
+    /// This method will return an error if the lock is poisoned. A lock gets poisoned when a write
+    /// operation panics.
+    ///
+    /// # Panics
+    ///
+    /// This method might panic when called if the lock is already held by the current thread.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::ShardedLock;
+    ///
+    /// let lock = ShardedLock::new(1);
+    ///
+    /// let mut n = lock.write().unwrap();
+    /// *n = 2;
+    ///
+    /// assert!(lock.try_read().is_err());
+    /// ```
+    pub fn write(&self) -> LockResult<ShardedLockWriteGuard<'_, T>> {
+        let mut poisoned = false;
+
+        // Write-lock each shard in succession.
+        for shard in self.shards.iter() {
+            let guard = match shard.lock.write() {
+                Ok(guard) => guard,
+                Err(err) => {
+                    poisoned = true;
+                    err.into_inner()
+                }
+            };
+
+            // Store the guard into the shard.
+            unsafe {
+                let guard: RwLockWriteGuard<'_, ()> = guard;
+                let guard: RwLockWriteGuard<'static, ()> = mem::transmute(guard);
+                let dest: *mut _ = shard.write_guard.get();
+                *dest = Some(guard);
+            }
+        }
+
+        if poisoned {
+            Err(PoisonError::new(ShardedLockWriteGuard {
+                lock: self,
+                _marker: PhantomData,
+            }))
+        } else {
+            Ok(ShardedLockWriteGuard {
+                lock: self,
+                _marker: PhantomData,
+            })
+        }
+    }
+}
+
+impl<T: ?Sized + fmt::Debug> fmt::Debug for ShardedLock<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self.try_read() {
+            Ok(guard) => f
+                .debug_struct("ShardedLock")
+                .field("data", &&*guard)
+                .finish(),
+            Err(TryLockError::Poisoned(err)) => f
+                .debug_struct("ShardedLock")
+                .field("data", &&**err.get_ref())
+                .finish(),
+            Err(TryLockError::WouldBlock) => {
+                struct LockedPlaceholder;
+                impl fmt::Debug for LockedPlaceholder {
+                    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+                        f.write_str("<locked>")
+                    }
+                }
+                f.debug_struct("ShardedLock")
+                    .field("data", &LockedPlaceholder)
+                    .finish()
+            }
+        }
+    }
+}
+
+impl<T: Default> Default for ShardedLock<T> {
+    fn default() -> ShardedLock<T> {
+        ShardedLock::new(Default::default())
+    }
+}
+
+impl<T> From<T> for ShardedLock<T> {
+    fn from(t: T) -> Self {
+        ShardedLock::new(t)
+    }
+}
+
+/// A guard used to release the shared read access of a [`ShardedLock`] when dropped.
+#[clippy::has_significant_drop]
+pub struct ShardedLockReadGuard<'a, T: ?Sized> {
+    lock: &'a ShardedLock<T>,
+    _guard: RwLockReadGuard<'a, ()>,
+    _marker: PhantomData<RwLockReadGuard<'a, T>>,
+}
+
+unsafe impl<T: ?Sized + Sync> Sync for ShardedLockReadGuard<'_, T> {}
+
+impl<T: ?Sized> Deref for ShardedLockReadGuard<'_, T> {
+    type Target = T;
+
+    fn deref(&self) -> &T {
+        unsafe { &*self.lock.value.get() }
+    }
+}
+
+impl<T: fmt::Debug> fmt::Debug for ShardedLockReadGuard<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("ShardedLockReadGuard")
+            .field("lock", &self.lock)
+            .finish()
+    }
+}
+
+impl<T: ?Sized + fmt::Display> fmt::Display for ShardedLockReadGuard<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        (**self).fmt(f)
+    }
+}
+
+/// A guard used to release the exclusive write access of a [`ShardedLock`] when dropped.
+#[clippy::has_significant_drop]
+pub struct ShardedLockWriteGuard<'a, T: ?Sized> {
+    lock: &'a ShardedLock<T>,
+    _marker: PhantomData<RwLockWriteGuard<'a, T>>,
+}
+
+unsafe impl<T: ?Sized + Sync> Sync for ShardedLockWriteGuard<'_, T> {}
+
+impl<T: ?Sized> Drop for ShardedLockWriteGuard<'_, T> {
+    fn drop(&mut self) {
+        // Unlock the shards in reverse order of locking.
+        for shard in self.lock.shards.iter().rev() {
+            unsafe {
+                let dest: *mut _ = shard.write_guard.get();
+                let guard = (*dest).take();
+                drop(guard);
+            }
+        }
+    }
+}
+
+impl<T: fmt::Debug> fmt::Debug for ShardedLockWriteGuard<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("ShardedLockWriteGuard")
+            .field("lock", &self.lock)
+            .finish()
+    }
+}
+
+impl<T: ?Sized + fmt::Display> fmt::Display for ShardedLockWriteGuard<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        (**self).fmt(f)
+    }
+}
+
+impl<T: ?Sized> Deref for ShardedLockWriteGuard<'_, T> {
+    type Target = T;
+
+    fn deref(&self) -> &T {
+        unsafe { &*self.lock.value.get() }
+    }
+}
+
+impl<T: ?Sized> DerefMut for ShardedLockWriteGuard<'_, T> {
+    fn deref_mut(&mut self) -> &mut T {
+        unsafe { &mut *self.lock.value.get() }
+    }
+}
+
+/// Returns a `usize` that identifies the current thread.
+///
+/// Each thread is associated with an 'index'. While there are no particular guarantees, indices
+/// usually tend to be consecutive numbers between 0 and the number of running threads.
+///
+/// Since this function accesses TLS, `None` might be returned if the current thread's TLS is
+/// tearing down.
+#[inline]
+fn current_index() -> Option<usize> {
+    REGISTRATION.try_with(|reg| reg.index).ok()
+}
+
+/// The global registry keeping track of registered threads and indices.
+struct ThreadIndices {
+    /// Mapping from `ThreadId` to thread index.
+    mapping: HashMap<ThreadId, usize>,
+
+    /// A list of free indices.
+    free_list: Vec<usize>,
+
+    /// The next index to allocate if the free list is empty.
+    next_index: usize,
+}
+
+fn thread_indices() -> &'static Mutex<ThreadIndices> {
+    static THREAD_INDICES: OnceLock<Mutex<ThreadIndices>> = OnceLock::new();
+    fn init() -> Mutex<ThreadIndices> {
+        Mutex::new(ThreadIndices {
+            mapping: HashMap::new(),
+            free_list: Vec::new(),
+            next_index: 0,
+        })
+    }
+    THREAD_INDICES.get_or_init(init)
+}
+
+/// A registration of a thread with an index.
+///
+/// When dropped, unregisters the thread and frees the reserved index.
+struct Registration {
+    index: usize,
+    thread_id: ThreadId,
+}
+
+impl Drop for Registration {
+    fn drop(&mut self) {
+        let mut indices = thread_indices().lock().unwrap();
+        indices.mapping.remove(&self.thread_id);
+        indices.free_list.push(self.index);
+    }
+}
+
+std::thread_local! {
+    static REGISTRATION: Registration = {
+        let thread_id = thread::current().id();
+        let mut indices = thread_indices().lock().unwrap();
+
+        let index = match indices.free_list.pop() {
+            Some(i) => i,
+            None => {
+                let i = indices.next_index;
+                indices.next_index += 1;
+                i
+            }
+        };
+        indices.mapping.insert(thread_id, index);
+
+        Registration {
+            index,
+            thread_id,
+        }
+    };
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/sync/wait_group.rs.html b/src/crossbeam_utils/sync/wait_group.rs.html new file mode 100644 index 0000000000..161cd06dea --- /dev/null +++ b/src/crossbeam_utils/sync/wait_group.rs.html @@ -0,0 +1,293 @@ +wait_group.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+
use crate::primitive::sync::{Arc, Condvar, Mutex};
+use std::fmt;
+
+/// Enables threads to synchronize the beginning or end of some computation.
+///
+/// # Wait groups vs barriers
+///
+/// `WaitGroup` is very similar to [`Barrier`], but there are a few differences:
+///
+/// * [`Barrier`] needs to know the number of threads at construction, while `WaitGroup` is cloned to
+///   register more threads.
+///
+/// * A [`Barrier`] can be reused even after all threads have synchronized, while a `WaitGroup`
+///   synchronizes threads only once.
+///
+/// * All threads wait for others to reach the [`Barrier`]. With `WaitGroup`, each thread can choose
+///   to either wait for other threads or to continue without blocking.
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_utils::sync::WaitGroup;
+/// use std::thread;
+///
+/// // Create a new wait group.
+/// let wg = WaitGroup::new();
+///
+/// for _ in 0..4 {
+///     // Create another reference to the wait group.
+///     let wg = wg.clone();
+///
+///     thread::spawn(move || {
+///         // Do some work.
+///
+///         // Drop the reference to the wait group.
+///         drop(wg);
+///     });
+/// }
+///
+/// // Block until all threads have finished their work.
+/// wg.wait();
+/// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
+/// ```
+///
+/// [`Barrier`]: std::sync::Barrier
+pub struct WaitGroup {
+    inner: Arc<Inner>,
+}
+
+/// Inner state of a `WaitGroup`.
+struct Inner {
+    cvar: Condvar,
+    count: Mutex<usize>,
+}
+
+impl Default for WaitGroup {
+    fn default() -> Self {
+        Self {
+            inner: Arc::new(Inner {
+                cvar: Condvar::new(),
+                count: Mutex::new(1),
+            }),
+        }
+    }
+}
+
+impl WaitGroup {
+    /// Creates a new wait group and returns the single reference to it.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::WaitGroup;
+    ///
+    /// let wg = WaitGroup::new();
+    /// ```
+    pub fn new() -> Self {
+        Self::default()
+    }
+
+    /// Drops this reference and waits until all other references are dropped.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::sync::WaitGroup;
+    /// use std::thread;
+    ///
+    /// let wg = WaitGroup::new();
+    ///
+    /// thread::spawn({
+    ///     let wg = wg.clone();
+    ///     move || {
+    ///         // Block until both threads have reached `wait()`.
+    ///         wg.wait();
+    ///     }
+    /// });
+    ///
+    /// // Block until both threads have reached `wait()`.
+    /// wg.wait();
+    /// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
+    /// ```
+    pub fn wait(self) {
+        if *self.inner.count.lock().unwrap() == 1 {
+            return;
+        }
+
+        let inner = self.inner.clone();
+        drop(self);
+
+        let mut count = inner.count.lock().unwrap();
+        while *count > 0 {
+            count = inner.cvar.wait(count).unwrap();
+        }
+    }
+}
+
+impl Drop for WaitGroup {
+    fn drop(&mut self) {
+        let mut count = self.inner.count.lock().unwrap();
+        *count -= 1;
+
+        if *count == 0 {
+            self.inner.cvar.notify_all();
+        }
+    }
+}
+
+impl Clone for WaitGroup {
+    fn clone(&self) -> WaitGroup {
+        let mut count = self.inner.count.lock().unwrap();
+        *count += 1;
+
+        WaitGroup {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+impl fmt::Debug for WaitGroup {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let count: &usize = &*self.inner.count.lock().unwrap();
+        f.debug_struct("WaitGroup").field("count", count).finish()
+    }
+}
+
\ No newline at end of file diff --git a/src/crossbeam_utils/thread.rs.html b/src/crossbeam_utils/thread.rs.html new file mode 100644 index 0000000000..3cb90ee69d --- /dev/null +++ b/src/crossbeam_utils/thread.rs.html @@ -0,0 +1,1225 @@ +thread.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+
//! Threads that can borrow variables from the stack.
+//!
+//! Create a scope when spawned threads need to access variables on the stack:
+//!
+//! ```
+//! use crossbeam_utils::thread;
+//!
+//! let people = vec![
+//!     "Alice".to_string(),
+//!     "Bob".to_string(),
+//!     "Carol".to_string(),
+//! ];
+//!
+//! thread::scope(|s| {
+//!     for person in &people {
+//!         s.spawn(move |_| {
+//!             println!("Hello, {}!", person);
+//!         });
+//!     }
+//! }).unwrap();
+//! ```
+//!
+//! # Why scoped threads?
+//!
+//! Suppose we wanted to re-write the previous example using plain threads:
+//!
+//! ```compile_fail,E0597
+//! use std::thread;
+//!
+//! let people = vec![
+//!     "Alice".to_string(),
+//!     "Bob".to_string(),
+//!     "Carol".to_string(),
+//! ];
+//!
+//! let mut threads = Vec::new();
+//!
+//! for person in &people {
+//!     threads.push(thread::spawn(move || {
+//!         println!("Hello, {}!", person);
+//!     }));
+//! }
+//!
+//! for thread in threads {
+//!     thread.join().unwrap();
+//! }
+//! ```
+//!
+//! This doesn't work because the borrow checker complains about `people` not living long enough:
+//!
+//! ```text
+//! error[E0597]: `people` does not live long enough
+//!   --> src/main.rs:12:20
+//!    |
+//! 12 |     for person in &people {
+//!    |                    ^^^^^^ borrowed value does not live long enough
+//! ...
+//! 21 | }
+//!    | - borrowed value only lives until here
+//!    |
+//!    = note: borrowed value must be valid for the static lifetime...
+//! ```
+//!
+//! The problem here is that spawned threads are not allowed to borrow variables on stack because
+//! the compiler cannot prove they will be joined before `people` is destroyed.
+//!
+//! Scoped threads are a mechanism to guarantee to the compiler that spawned threads will be joined
+//! before the scope ends.
+//!
+//! # How scoped threads work
+//!
+//! If a variable is borrowed by a thread, the thread must complete before the variable is
+//! destroyed. Threads spawned using [`std::thread::spawn`] can only borrow variables with the
+//! `'static` lifetime because the borrow checker cannot be sure when the thread will complete.
+//!
+//! A scope creates a clear boundary between variables outside the scope and threads inside the
+//! scope. Whenever a scope spawns a thread, it promises to join the thread before the scope ends.
+//! This way we guarantee to the borrow checker that scoped threads only live within the scope and
+//! can safely access variables outside it.
+//!
+//! # Nesting scoped threads
+//!
+//! Sometimes scoped threads need to spawn more threads within the same scope. This is a little
+//! tricky because argument `s` lives *inside* the invocation of `thread::scope()` and as such
+//! cannot be borrowed by scoped threads:
+//!
+//! ```compile_fail,E0521
+//! use crossbeam_utils::thread;
+//!
+//! thread::scope(|s| {
+//!     s.spawn(|_| {
+//!         // Not going to compile because we're trying to borrow `s`,
+//!         // which lives *inside* the scope! :(
+//!         s.spawn(|_| println!("nested thread"));
+//!     });
+//! });
+//! ```
+//!
+//! Fortunately, there is a solution. Every scoped thread is passed a reference to its scope as an
+//! argument, which can be used for spawning nested threads:
+//!
+//! ```
+//! use crossbeam_utils::thread;
+//!
+//! thread::scope(|s| {
+//!     // Note the `|s|` here.
+//!     s.spawn(|s| {
+//!         // Yay, this works because we're using a fresh argument `s`! :)
+//!         s.spawn(|_| println!("nested thread"));
+//!     });
+//! }).unwrap();
+//! ```
+
+use std::boxed::Box;
+use std::fmt;
+use std::io;
+use std::marker::PhantomData;
+use std::mem;
+use std::panic;
+use std::string::String;
+use std::sync::{Arc, Mutex};
+use std::thread;
+use std::vec::Vec;
+
+use crate::sync::WaitGroup;
+
+type SharedVec<T> = Arc<Mutex<Vec<T>>>;
+type SharedOption<T> = Arc<Mutex<Option<T>>>;
+
+/// Creates a new scope for spawning threads.
+///
+/// All child threads that haven't been manually joined will be automatically joined just before
+/// this function invocation ends. If all joined threads have successfully completed, `Ok` is
+/// returned with the return value of `f`. If any of the joined threads has panicked, an `Err` is
+/// returned containing errors from panicked threads. Note that if panics are implemented by
+/// aborting the process, no error is returned; see the notes of [std::panic::catch_unwind].
+///
+/// **Note:** Since Rust 1.63, this function is soft-deprecated in favor of the more efficient [`std::thread::scope`].
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_utils::thread;
+///
+/// let var = vec![1, 2, 3];
+///
+/// thread::scope(|s| {
+///     s.spawn(|_| {
+///         println!("A child thread borrowing `var`: {:?}", var);
+///     });
+/// }).unwrap();
+/// ```
+pub fn scope<'env, F, R>(f: F) -> thread::Result<R>
+where
+    F: FnOnce(&Scope<'env>) -> R,
+{
+    struct AbortOnPanic;
+    impl Drop for AbortOnPanic {
+        fn drop(&mut self) {
+            if thread::panicking() {
+                std::process::abort();
+            }
+        }
+    }
+
+    let wg = WaitGroup::new();
+    let scope = Scope::<'env> {
+        handles: SharedVec::default(),
+        wait_group: wg.clone(),
+        _marker: PhantomData,
+    };
+
+    // Execute the scoped function, but catch any panics.
+    let result = panic::catch_unwind(panic::AssertUnwindSafe(|| f(&scope)));
+
+    // If an unwinding panic occurs before all threads are joined
+    // promote it to an aborting panic to prevent any threads from escaping the scope.
+    let guard = AbortOnPanic;
+
+    // Wait until all nested scopes are dropped.
+    drop(scope.wait_group);
+    wg.wait();
+
+    // Join all remaining spawned threads.
+    let panics: Vec<_> = scope
+        .handles
+        .lock()
+        .unwrap()
+        // Filter handles that haven't been joined, join them, and collect errors.
+        .drain(..)
+        .filter_map(|handle| handle.lock().unwrap().take())
+        .filter_map(|handle| handle.join().err())
+        .collect();
+
+    mem::forget(guard);
+
+    // If `f` has panicked, resume unwinding.
+    // If any of the child threads have panicked, return the panic errors.
+    // Otherwise, everything is OK and return the result of `f`.
+    match result {
+        Err(err) => panic::resume_unwind(err),
+        Ok(res) => {
+            if panics.is_empty() {
+                Ok(res)
+            } else {
+                Err(Box::new(panics))
+            }
+        }
+    }
+}
+
+/// A scope for spawning threads.
+pub struct Scope<'env> {
+    /// The list of the thread join handles.
+    handles: SharedVec<SharedOption<thread::JoinHandle<()>>>,
+
+    /// Used to wait until all subscopes all dropped.
+    wait_group: WaitGroup,
+
+    /// Borrows data with invariant lifetime `'env`.
+    _marker: PhantomData<&'env mut &'env ()>,
+}
+
+unsafe impl Sync for Scope<'_> {}
+
+impl<'env> Scope<'env> {
+    /// Spawns a scoped thread.
+    ///
+    /// This method is similar to the [`spawn`] function in Rust's standard library. The difference
+    /// is that this thread is scoped, meaning it's guaranteed to terminate before the scope exits,
+    /// allowing it to reference variables outside the scope.
+    ///
+    /// The scoped thread is passed a reference to this scope as an argument, which can be used for
+    /// spawning nested threads.
+    ///
+    /// The returned [handle](ScopedJoinHandle) can be used to manually
+    /// [join](ScopedJoinHandle::join) the thread before the scope exits.
+    ///
+    /// This will create a thread using default parameters of [`ScopedThreadBuilder`], if you want to specify the
+    /// stack size or the name of the thread, use this API instead.
+    ///
+    /// [`spawn`]: std::thread::spawn
+    ///
+    /// # Panics
+    ///
+    /// Panics if the OS fails to create a thread; use [`ScopedThreadBuilder::spawn`]
+    /// to recover from such errors.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::thread;
+    ///
+    /// thread::scope(|s| {
+    ///     let handle = s.spawn(|_| {
+    ///         println!("A child thread is running");
+    ///         42
+    ///     });
+    ///
+    ///     // Join the thread and retrieve its result.
+    ///     let res = handle.join().unwrap();
+    ///     assert_eq!(res, 42);
+    /// }).unwrap();
+    /// ```
+    pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
+    where
+        F: FnOnce(&Scope<'env>) -> T,
+        F: Send + 'env,
+        T: Send + 'env,
+    {
+        self.builder()
+            .spawn(f)
+            .expect("failed to spawn scoped thread")
+    }
+
+    /// Creates a builder that can configure a thread before spawning.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::thread;
+    ///
+    /// thread::scope(|s| {
+    ///     s.builder()
+    ///         .spawn(|_| println!("A child thread is running"))
+    ///         .unwrap();
+    /// }).unwrap();
+    /// ```
+    pub fn builder<'scope>(&'scope self) -> ScopedThreadBuilder<'scope, 'env> {
+        ScopedThreadBuilder {
+            scope: self,
+            builder: thread::Builder::new(),
+        }
+    }
+}
+
+impl fmt::Debug for Scope<'_> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Scope { .. }")
+    }
+}
+
+/// Configures the properties of a new thread.
+///
+/// The two configurable properties are:
+///
+/// - [`name`]: Specifies an [associated name for the thread][naming-threads].
+/// - [`stack_size`]: Specifies the [desired stack size for the thread][stack-size].
+///
+/// The [`spawn`] method will take ownership of the builder and return an [`io::Result`] of the
+/// thread handle with the given configuration.
+///
+/// The [`Scope::spawn`] method uses a builder with default configuration and unwraps its return
+/// value. You may want to use this builder when you want to recover from a failure to launch a
+/// thread.
+///
+/// # Examples
+///
+/// ```
+/// use crossbeam_utils::thread;
+///
+/// thread::scope(|s| {
+///     s.builder()
+///         .spawn(|_| println!("Running a child thread"))
+///         .unwrap();
+/// }).unwrap();
+/// ```
+///
+/// [`name`]: ScopedThreadBuilder::name
+/// [`stack_size`]: ScopedThreadBuilder::stack_size
+/// [`spawn`]: ScopedThreadBuilder::spawn
+/// [`io::Result`]: std::io::Result
+/// [naming-threads]: std::thread#naming-threads
+/// [stack-size]: std::thread#stack-size
+#[derive(Debug)]
+pub struct ScopedThreadBuilder<'scope, 'env> {
+    scope: &'scope Scope<'env>,
+    builder: thread::Builder,
+}
+
+impl<'scope, 'env> ScopedThreadBuilder<'scope, 'env> {
+    /// Sets the name for the new thread.
+    ///
+    /// The name must not contain null bytes (`\0`).
+    ///
+    /// For more information about named threads, see [here][naming-threads].
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::thread;
+    /// use std::thread::current;
+    ///
+    /// thread::scope(|s| {
+    ///     s.builder()
+    ///         .name("my thread".to_string())
+    ///         .spawn(|_| assert_eq!(current().name(), Some("my thread")))
+    ///         .unwrap();
+    /// }).unwrap();
+    /// ```
+    ///
+    /// [naming-threads]: std::thread#naming-threads
+    pub fn name(mut self, name: String) -> ScopedThreadBuilder<'scope, 'env> {
+        self.builder = self.builder.name(name);
+        self
+    }
+
+    /// Sets the size of the stack for the new thread.
+    ///
+    /// The stack size is measured in bytes.
+    ///
+    /// For more information about the stack size for threads, see [here][stack-size].
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::thread;
+    ///
+    /// thread::scope(|s| {
+    ///     s.builder()
+    ///         .stack_size(32 * 1024)
+    ///         .spawn(|_| println!("Running a child thread"))
+    ///         .unwrap();
+    /// }).unwrap();
+    /// ```
+    ///
+    /// [stack-size]: std::thread#stack-size
+    pub fn stack_size(mut self, size: usize) -> ScopedThreadBuilder<'scope, 'env> {
+        self.builder = self.builder.stack_size(size);
+        self
+    }
+
+    /// Spawns a scoped thread with this configuration.
+    ///
+    /// The scoped thread is passed a reference to this scope as an argument, which can be used for
+    /// spawning nested threads.
+    ///
+    /// The returned handle can be used to manually join the thread before the scope exits.
+    ///
+    /// # Errors
+    ///
+    /// Unlike the [`Scope::spawn`] method, this method yields an
+    /// [`io::Result`] to capture any failure to create the thread at
+    /// the OS level.
+    ///
+    /// [`io::Result`]: std::io::Result
+    ///
+    /// # Panics
+    ///
+    /// Panics if a thread name was set and it contained null bytes.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::thread;
+    ///
+    /// thread::scope(|s| {
+    ///     let handle = s.builder()
+    ///         .spawn(|_| {
+    ///             println!("A child thread is running");
+    ///             42
+    ///         })
+    ///         .unwrap();
+    ///
+    ///     // Join the thread and retrieve its result.
+    ///     let res = handle.join().unwrap();
+    ///     assert_eq!(res, 42);
+    /// }).unwrap();
+    /// ```
+    pub fn spawn<F, T>(self, f: F) -> io::Result<ScopedJoinHandle<'scope, T>>
+    where
+        F: FnOnce(&Scope<'env>) -> T,
+        F: Send + 'env,
+        T: Send + 'env,
+    {
+        // The result of `f` will be stored here.
+        let result = SharedOption::default();
+
+        // Spawn the thread and grab its join handle and thread handle.
+        let (handle, thread) = {
+            let result = Arc::clone(&result);
+
+            // A clone of the scope that will be moved into the new thread.
+            let scope = Scope::<'env> {
+                handles: Arc::clone(&self.scope.handles),
+                wait_group: self.scope.wait_group.clone(),
+                _marker: PhantomData,
+            };
+
+            // Spawn the thread.
+            let handle = {
+                let closure = move || {
+                    // Make sure the scope is inside the closure with the proper `'env` lifetime.
+                    let scope: Scope<'env> = scope;
+
+                    // Run the closure.
+                    let res = f(&scope);
+
+                    // Store the result if the closure didn't panic.
+                    *result.lock().unwrap() = Some(res);
+                };
+
+                // Allocate `closure` on the heap and erase the `'env` bound.
+                let closure: Box<dyn FnOnce() + Send + 'env> = Box::new(closure);
+                let closure: Box<dyn FnOnce() + Send + 'static> =
+                    unsafe { mem::transmute(closure) };
+
+                // Finally, spawn the closure.
+                self.builder.spawn(closure)?
+            };
+
+            let thread = handle.thread().clone();
+            let handle = Arc::new(Mutex::new(Some(handle)));
+            (handle, thread)
+        };
+
+        // Add the handle to the shared list of join handles.
+        self.scope.handles.lock().unwrap().push(Arc::clone(&handle));
+
+        Ok(ScopedJoinHandle {
+            handle,
+            result,
+            thread,
+            _marker: PhantomData,
+        })
+    }
+}
+
+unsafe impl<T> Send for ScopedJoinHandle<'_, T> {}
+unsafe impl<T> Sync for ScopedJoinHandle<'_, T> {}
+
+/// A handle that can be used to join its scoped thread.
+///
+/// This struct is created by the [`Scope::spawn`] method and the
+/// [`ScopedThreadBuilder::spawn`] method.
+pub struct ScopedJoinHandle<'scope, T> {
+    /// A join handle to the spawned thread.
+    handle: SharedOption<thread::JoinHandle<()>>,
+
+    /// Holds the result of the inner closure.
+    result: SharedOption<T>,
+
+    /// A handle to the spawned thread.
+    thread: thread::Thread,
+
+    /// Borrows the parent scope with lifetime `'scope`.
+    _marker: PhantomData<&'scope ()>,
+}
+
+impl<T> ScopedJoinHandle<'_, T> {
+    /// Waits for the thread to finish and returns its result.
+    ///
+    /// If the child thread panics, an error is returned. Note that if panics are implemented by
+    /// aborting the process, no error is returned; see the notes of [std::panic::catch_unwind].
+    ///
+    /// # Panics
+    ///
+    /// This function may panic on some platforms if a thread attempts to join itself or otherwise
+    /// may create a deadlock with joining threads.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::thread;
+    ///
+    /// thread::scope(|s| {
+    ///     let handle1 = s.spawn(|_| println!("I'm a happy thread :)"));
+    ///     let handle2 = s.spawn(|_| panic!("I'm a sad thread :("));
+    ///
+    ///     // Join the first thread and verify that it succeeded.
+    ///     let res = handle1.join();
+    ///     assert!(res.is_ok());
+    ///
+    ///     // Join the second thread and verify that it panicked.
+    ///     let res = handle2.join();
+    ///     assert!(res.is_err());
+    /// }).unwrap();
+    /// ```
+    pub fn join(self) -> thread::Result<T> {
+        // Take out the handle. The handle will surely be available because the root scope waits
+        // for nested scopes before joining remaining threads.
+        let handle = self.handle.lock().unwrap().take().unwrap();
+
+        // Join the thread and then take the result out of its inner closure.
+        handle
+            .join()
+            .map(|()| self.result.lock().unwrap().take().unwrap())
+    }
+
+    /// Returns a handle to the underlying thread.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use crossbeam_utils::thread;
+    ///
+    /// thread::scope(|s| {
+    ///     let handle = s.spawn(|_| println!("A child thread is running"));
+    ///     println!("The child thread ID: {:?}", handle.thread().id());
+    /// }).unwrap();
+    /// ```
+    pub fn thread(&self) -> &thread::Thread {
+        &self.thread
+    }
+}
+
+/// Unix-specific extensions.
+#[cfg(unix)]
+mod unix {
+    use super::ScopedJoinHandle;
+    use std::os::unix::thread::{JoinHandleExt, RawPthread};
+
+    impl<T> JoinHandleExt for ScopedJoinHandle<'_, T> {
+        fn as_pthread_t(&self) -> RawPthread {
+            // Borrow the handle. The handle will surely be available because the root scope waits
+            // for nested scopes before joining remaining threads.
+            let handle = self.handle.lock().unwrap();
+            handle.as_ref().unwrap().as_pthread_t()
+        }
+        fn into_pthread_t(self) -> RawPthread {
+            self.as_pthread_t()
+        }
+    }
+}
+/// Windows-specific extensions.
+#[cfg(windows)]
+mod windows {
+    use super::ScopedJoinHandle;
+    use std::os::windows::io::{AsRawHandle, IntoRawHandle, RawHandle};
+
+    impl<T> AsRawHandle for ScopedJoinHandle<'_, T> {
+        fn as_raw_handle(&self) -> RawHandle {
+            // Borrow the handle. The handle will surely be available because the root scope waits
+            // for nested scopes before joining remaining threads.
+            let handle = self.handle.lock().unwrap();
+            handle.as_ref().unwrap().as_raw_handle()
+        }
+    }
+
+    impl<T> IntoRawHandle for ScopedJoinHandle<'_, T> {
+        fn into_raw_handle(self) -> RawHandle {
+            self.as_raw_handle()
+        }
+    }
+}
+
+impl<T> fmt::Debug for ScopedJoinHandle<'_, T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("ScopedJoinHandle { .. }")
+    }
+}
+
\ No newline at end of file diff --git a/src/either/into_either.rs.html b/src/either/into_either.rs.html new file mode 100644 index 0000000000..b2a3b5188b --- /dev/null +++ b/src/either/into_either.rs.html @@ -0,0 +1,131 @@ +into_either.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+
//! The trait [`IntoEither`] provides methods for converting a type `Self`, whose
+//! size is constant and known at compile-time, into an [`Either`] variant.
+
+use super::{Either, Left, Right};
+
+/// Provides methods for converting a type `Self` into either a [`Left`] or [`Right`]
+/// variant of [`Either<Self, Self>`](Either).
+///
+/// The [`into_either`](IntoEither::into_either) method takes a [`bool`] to determine
+/// whether to convert to [`Left`] or [`Right`].
+///
+/// The [`into_either_with`](IntoEither::into_either_with) method takes a
+/// [predicate function](FnOnce) to determine whether to convert to [`Left`] or [`Right`].
+pub trait IntoEither: Sized {
+    /// Converts `self` into a [`Left`] variant of [`Either<Self, Self>`](Either)
+    /// if `into_left` is `true`.
+    /// Converts `self` into a [`Right`] variant of [`Either<Self, Self>`](Either)
+    /// otherwise.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use either::{IntoEither, Left, Right};
+    ///
+    /// let x = 0;
+    /// assert_eq!(x.into_either(true), Left(x));
+    /// assert_eq!(x.into_either(false), Right(x));
+    /// ```
+    fn into_either(self, into_left: bool) -> Either<Self, Self> {
+        if into_left {
+            Left(self)
+        } else {
+            Right(self)
+        }
+    }
+
+    /// Converts `self` into a [`Left`] variant of [`Either<Self, Self>`](Either)
+    /// if `into_left(&self)` returns `true`.
+    /// Converts `self` into a [`Right`] variant of [`Either<Self, Self>`](Either)
+    /// otherwise.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use either::{IntoEither, Left, Right};
+    ///
+    /// fn is_even(x: &u8) -> bool {
+    ///     x % 2 == 0
+    /// }
+    ///
+    /// let x = 0;
+    /// assert_eq!(x.into_either_with(is_even), Left(x));
+    /// assert_eq!(x.into_either_with(|x| !is_even(x)), Right(x));
+    /// ```
+    fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
+    where
+        F: FnOnce(&Self) -> bool,
+    {
+        let into_left = into_left(&self);
+        self.into_either(into_left)
+    }
+}
+
+impl<T> IntoEither for T {}
+
\ No newline at end of file diff --git a/src/either/iterator.rs.html b/src/either/iterator.rs.html new file mode 100644 index 0000000000..1e1fee4642 --- /dev/null +++ b/src/either/iterator.rs.html @@ -0,0 +1,633 @@ +iterator.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+
use super::{for_both, Either, Left, Right};
+use core::iter;
+
+macro_rules! wrap_either {
+    ($value:expr => $( $tail:tt )*) => {
+        match $value {
+            Left(inner) => inner.map(Left) $($tail)*,
+            Right(inner) => inner.map(Right) $($tail)*,
+        }
+    };
+}
+
+/// Iterator that maps left or right iterators to corresponding `Either`-wrapped items.
+///
+/// This struct is created by the [`Either::factor_into_iter`],
+/// [`factor_iter`][Either::factor_iter],
+/// and [`factor_iter_mut`][Either::factor_iter_mut] methods.
+#[derive(Clone, Debug)]
+pub struct IterEither<L, R> {
+    inner: Either<L, R>,
+}
+
+impl<L, R> IterEither<L, R> {
+    pub(crate) fn new(inner: Either<L, R>) -> Self {
+        IterEither { inner }
+    }
+}
+
+impl<L, R, A> Extend<A> for Either<L, R>
+where
+    L: Extend<A>,
+    R: Extend<A>,
+{
+    fn extend<T>(&mut self, iter: T)
+    where
+        T: IntoIterator<Item = A>,
+    {
+        for_both!(*self, ref mut inner => inner.extend(iter))
+    }
+}
+
+/// `Either<L, R>` is an iterator if both `L` and `R` are iterators.
+impl<L, R> Iterator for Either<L, R>
+where
+    L: Iterator,
+    R: Iterator<Item = L::Item>,
+{
+    type Item = L::Item;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        for_both!(*self, ref mut inner => inner.next())
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        for_both!(*self, ref inner => inner.size_hint())
+    }
+
+    fn fold<Acc, G>(self, init: Acc, f: G) -> Acc
+    where
+        G: FnMut(Acc, Self::Item) -> Acc,
+    {
+        for_both!(self, inner => inner.fold(init, f))
+    }
+
+    fn for_each<F>(self, f: F)
+    where
+        F: FnMut(Self::Item),
+    {
+        for_both!(self, inner => inner.for_each(f))
+    }
+
+    fn count(self) -> usize {
+        for_both!(self, inner => inner.count())
+    }
+
+    fn last(self) -> Option<Self::Item> {
+        for_both!(self, inner => inner.last())
+    }
+
+    fn nth(&mut self, n: usize) -> Option<Self::Item> {
+        for_both!(*self, ref mut inner => inner.nth(n))
+    }
+
+    fn collect<B>(self) -> B
+    where
+        B: iter::FromIterator<Self::Item>,
+    {
+        for_both!(self, inner => inner.collect())
+    }
+
+    fn partition<B, F>(self, f: F) -> (B, B)
+    where
+        B: Default + Extend<Self::Item>,
+        F: FnMut(&Self::Item) -> bool,
+    {
+        for_both!(self, inner => inner.partition(f))
+    }
+
+    fn all<F>(&mut self, f: F) -> bool
+    where
+        F: FnMut(Self::Item) -> bool,
+    {
+        for_both!(*self, ref mut inner => inner.all(f))
+    }
+
+    fn any<F>(&mut self, f: F) -> bool
+    where
+        F: FnMut(Self::Item) -> bool,
+    {
+        for_both!(*self, ref mut inner => inner.any(f))
+    }
+
+    fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
+    where
+        P: FnMut(&Self::Item) -> bool,
+    {
+        for_both!(*self, ref mut inner => inner.find(predicate))
+    }
+
+    fn find_map<B, F>(&mut self, f: F) -> Option<B>
+    where
+        F: FnMut(Self::Item) -> Option<B>,
+    {
+        for_both!(*self, ref mut inner => inner.find_map(f))
+    }
+
+    fn position<P>(&mut self, predicate: P) -> Option<usize>
+    where
+        P: FnMut(Self::Item) -> bool,
+    {
+        for_both!(*self, ref mut inner => inner.position(predicate))
+    }
+}
+
+impl<L, R> DoubleEndedIterator for Either<L, R>
+where
+    L: DoubleEndedIterator,
+    R: DoubleEndedIterator<Item = L::Item>,
+{
+    fn next_back(&mut self) -> Option<Self::Item> {
+        for_both!(*self, ref mut inner => inner.next_back())
+    }
+
+    fn nth_back(&mut self, n: usize) -> Option<Self::Item> {
+        for_both!(*self, ref mut inner => inner.nth_back(n))
+    }
+
+    fn rfold<Acc, G>(self, init: Acc, f: G) -> Acc
+    where
+        G: FnMut(Acc, Self::Item) -> Acc,
+    {
+        for_both!(self, inner => inner.rfold(init, f))
+    }
+
+    fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
+    where
+        P: FnMut(&Self::Item) -> bool,
+    {
+        for_both!(*self, ref mut inner => inner.rfind(predicate))
+    }
+}
+
+impl<L, R> ExactSizeIterator for Either<L, R>
+where
+    L: ExactSizeIterator,
+    R: ExactSizeIterator<Item = L::Item>,
+{
+    fn len(&self) -> usize {
+        for_both!(*self, ref inner => inner.len())
+    }
+}
+
+impl<L, R> iter::FusedIterator for Either<L, R>
+where
+    L: iter::FusedIterator,
+    R: iter::FusedIterator<Item = L::Item>,
+{
+}
+
+impl<L, R> Iterator for IterEither<L, R>
+where
+    L: Iterator,
+    R: Iterator,
+{
+    type Item = Either<L::Item, R::Item>;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        Some(map_either!(self.inner, ref mut inner => inner.next()?))
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        for_both!(self.inner, ref inner => inner.size_hint())
+    }
+
+    fn fold<Acc, G>(self, init: Acc, f: G) -> Acc
+    where
+        G: FnMut(Acc, Self::Item) -> Acc,
+    {
+        wrap_either!(self.inner => .fold(init, f))
+    }
+
+    fn for_each<F>(self, f: F)
+    where
+        F: FnMut(Self::Item),
+    {
+        wrap_either!(self.inner => .for_each(f))
+    }
+
+    fn count(self) -> usize {
+        for_both!(self.inner, inner => inner.count())
+    }
+
+    fn last(self) -> Option<Self::Item> {
+        Some(map_either!(self.inner, inner => inner.last()?))
+    }
+
+    fn nth(&mut self, n: usize) -> Option<Self::Item> {
+        Some(map_either!(self.inner, ref mut inner => inner.nth(n)?))
+    }
+
+    fn collect<B>(self) -> B
+    where
+        B: iter::FromIterator<Self::Item>,
+    {
+        wrap_either!(self.inner => .collect())
+    }
+
+    fn partition<B, F>(self, f: F) -> (B, B)
+    where
+        B: Default + Extend<Self::Item>,
+        F: FnMut(&Self::Item) -> bool,
+    {
+        wrap_either!(self.inner => .partition(f))
+    }
+
+    fn all<F>(&mut self, f: F) -> bool
+    where
+        F: FnMut(Self::Item) -> bool,
+    {
+        wrap_either!(&mut self.inner => .all(f))
+    }
+
+    fn any<F>(&mut self, f: F) -> bool
+    where
+        F: FnMut(Self::Item) -> bool,
+    {
+        wrap_either!(&mut self.inner => .any(f))
+    }
+
+    fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
+    where
+        P: FnMut(&Self::Item) -> bool,
+    {
+        wrap_either!(&mut self.inner => .find(predicate))
+    }
+
+    fn find_map<B, F>(&mut self, f: F) -> Option<B>
+    where
+        F: FnMut(Self::Item) -> Option<B>,
+    {
+        wrap_either!(&mut self.inner => .find_map(f))
+    }
+
+    fn position<P>(&mut self, predicate: P) -> Option<usize>
+    where
+        P: FnMut(Self::Item) -> bool,
+    {
+        wrap_either!(&mut self.inner => .position(predicate))
+    }
+}
+
+impl<L, R> DoubleEndedIterator for IterEither<L, R>
+where
+    L: DoubleEndedIterator,
+    R: DoubleEndedIterator,
+{
+    fn next_back(&mut self) -> Option<Self::Item> {
+        Some(map_either!(self.inner, ref mut inner => inner.next_back()?))
+    }
+
+    fn nth_back(&mut self, n: usize) -> Option<Self::Item> {
+        Some(map_either!(self.inner, ref mut inner => inner.nth_back(n)?))
+    }
+
+    fn rfold<Acc, G>(self, init: Acc, f: G) -> Acc
+    where
+        G: FnMut(Acc, Self::Item) -> Acc,
+    {
+        wrap_either!(self.inner => .rfold(init, f))
+    }
+
+    fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
+    where
+        P: FnMut(&Self::Item) -> bool,
+    {
+        wrap_either!(&mut self.inner => .rfind(predicate))
+    }
+}
+
+impl<L, R> ExactSizeIterator for IterEither<L, R>
+where
+    L: ExactSizeIterator,
+    R: ExactSizeIterator,
+{
+    fn len(&self) -> usize {
+        for_both!(self.inner, ref inner => inner.len())
+    }
+}
+
+impl<L, R> iter::FusedIterator for IterEither<L, R>
+where
+    L: iter::FusedIterator,
+    R: iter::FusedIterator,
+{
+}
+
\ No newline at end of file diff --git a/src/either/lib.rs.html b/src/either/lib.rs.html new file mode 100644 index 0000000000..c62827b973 --- /dev/null +++ b/src/either/lib.rs.html @@ -0,0 +1,3041 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+
//! The enum [`Either`] with variants `Left` and `Right` is a general purpose
+//! sum type with two cases.
+//!
+//! [`Either`]: enum.Either.html
+//!
+//! **Crate features:**
+//!
+//! * `"use_std"`
+//! Enabled by default. Disable to make the library `#![no_std]`.
+//!
+//! * `"serde"`
+//! Disabled by default. Enable to `#[derive(Serialize, Deserialize)]` for `Either`
+//!
+
+#![doc(html_root_url = "https://docs.rs/either/1/")]
+#![no_std]
+
+#[cfg(any(test, feature = "use_std"))]
+extern crate std;
+
+#[cfg(feature = "serde")]
+pub mod serde_untagged;
+
+#[cfg(feature = "serde")]
+pub mod serde_untagged_optional;
+
+use core::convert::{AsMut, AsRef};
+use core::fmt;
+use core::future::Future;
+use core::ops::Deref;
+use core::ops::DerefMut;
+use core::pin::Pin;
+
+#[cfg(any(test, feature = "use_std"))]
+use std::error::Error;
+#[cfg(any(test, feature = "use_std"))]
+use std::io::{self, BufRead, Read, Seek, SeekFrom, Write};
+
+pub use crate::Either::{Left, Right};
+
+/// The enum `Either` with variants `Left` and `Right` is a general purpose
+/// sum type with two cases.
+///
+/// The `Either` type is symmetric and treats its variants the same way, without
+/// preference.
+/// (For representing success or error, use the regular `Result` enum instead.)
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
+#[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
+pub enum Either<L, R> {
+    /// A value of type `L`.
+    Left(L),
+    /// A value of type `R`.
+    Right(R),
+}
+
+/// Evaluate the provided expression for both [`Either::Left`] and [`Either::Right`].
+///
+/// This macro is useful in cases where both sides of [`Either`] can be interacted with
+/// in the same way even though the don't share the same type.
+///
+/// Syntax: `either::for_both!(` *expression* `,` *pattern* `=>` *expression* `)`
+///
+/// # Example
+///
+/// ```
+/// use either::Either;
+///
+/// fn length(owned_or_borrowed: Either<String, &'static str>) -> usize {
+///     either::for_both!(owned_or_borrowed, s => s.len())
+/// }
+///
+/// fn main() {
+///     let borrowed = Either::Right("Hello world!");
+///     let owned = Either::Left("Hello world!".to_owned());
+///
+///     assert_eq!(length(borrowed), 12);
+///     assert_eq!(length(owned), 12);
+/// }
+/// ```
+#[macro_export]
+macro_rules! for_both {
+    ($value:expr, $pattern:pat => $result:expr) => {
+        match $value {
+            $crate::Either::Left($pattern) => $result,
+            $crate::Either::Right($pattern) => $result,
+        }
+    };
+}
+
+/// Macro for unwrapping the left side of an [`Either`], which fails early
+/// with the opposite side. Can only be used in functions that return
+/// `Either` because of the early return of `Right` that it provides.
+///
+/// See also [`try_right!`] for its dual, which applies the same just to the
+/// right side.
+///
+/// # Example
+///
+/// ```
+/// use either::{Either, Left, Right};
+///
+/// fn twice(wrapper: Either<u32, &str>) -> Either<u32, &str> {
+///     let value = either::try_left!(wrapper);
+///     Left(value * 2)
+/// }
+///
+/// fn main() {
+///     assert_eq!(twice(Left(2)), Left(4));
+///     assert_eq!(twice(Right("ups")), Right("ups"));
+/// }
+/// ```
+#[macro_export]
+macro_rules! try_left {
+    ($expr:expr) => {
+        match $expr {
+            $crate::Left(val) => val,
+            $crate::Right(err) => return $crate::Right(::core::convert::From::from(err)),
+        }
+    };
+}
+
+/// Dual to [`try_left!`], see its documentation for more information.
+#[macro_export]
+macro_rules! try_right {
+    ($expr:expr) => {
+        match $expr {
+            $crate::Left(err) => return $crate::Left(::core::convert::From::from(err)),
+            $crate::Right(val) => val,
+        }
+    };
+}
+
+macro_rules! map_either {
+    ($value:expr, $pattern:pat => $result:expr) => {
+        match $value {
+            Left($pattern) => Left($result),
+            Right($pattern) => Right($result),
+        }
+    };
+}
+
+mod iterator;
+pub use self::iterator::IterEither;
+
+mod into_either;
+pub use self::into_either::IntoEither;
+
+impl<L: Clone, R: Clone> Clone for Either<L, R> {
+    fn clone(&self) -> Self {
+        match self {
+            Left(inner) => Left(inner.clone()),
+            Right(inner) => Right(inner.clone()),
+        }
+    }
+
+    fn clone_from(&mut self, source: &Self) {
+        match (self, source) {
+            (Left(dest), Left(source)) => dest.clone_from(source),
+            (Right(dest), Right(source)) => dest.clone_from(source),
+            (dest, source) => *dest = source.clone(),
+        }
+    }
+}
+
+impl<L, R> Either<L, R> {
+    /// Return true if the value is the `Left` variant.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let values = [Left(1), Right("the right value")];
+    /// assert_eq!(values[0].is_left(), true);
+    /// assert_eq!(values[1].is_left(), false);
+    /// ```
+    pub fn is_left(&self) -> bool {
+        match *self {
+            Left(_) => true,
+            Right(_) => false,
+        }
+    }
+
+    /// Return true if the value is the `Right` variant.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let values = [Left(1), Right("the right value")];
+    /// assert_eq!(values[0].is_right(), false);
+    /// assert_eq!(values[1].is_right(), true);
+    /// ```
+    pub fn is_right(&self) -> bool {
+        !self.is_left()
+    }
+
+    /// Convert the left side of `Either<L, R>` to an `Option<L>`.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, ()> = Left("some value");
+    /// assert_eq!(left.left(),  Some("some value"));
+    ///
+    /// let right: Either<(), _> = Right(321);
+    /// assert_eq!(right.left(), None);
+    /// ```
+    pub fn left(self) -> Option<L> {
+        match self {
+            Left(l) => Some(l),
+            Right(_) => None,
+        }
+    }
+
+    /// Convert the right side of `Either<L, R>` to an `Option<R>`.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, ()> = Left("some value");
+    /// assert_eq!(left.right(),  None);
+    ///
+    /// let right: Either<(), _> = Right(321);
+    /// assert_eq!(right.right(), Some(321));
+    /// ```
+    pub fn right(self) -> Option<R> {
+        match self {
+            Left(_) => None,
+            Right(r) => Some(r),
+        }
+    }
+
+    /// Convert `&Either<L, R>` to `Either<&L, &R>`.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, ()> = Left("some value");
+    /// assert_eq!(left.as_ref(), Left(&"some value"));
+    ///
+    /// let right: Either<(), _> = Right("some value");
+    /// assert_eq!(right.as_ref(), Right(&"some value"));
+    /// ```
+    pub fn as_ref(&self) -> Either<&L, &R> {
+        match *self {
+            Left(ref inner) => Left(inner),
+            Right(ref inner) => Right(inner),
+        }
+    }
+
+    /// Convert `&mut Either<L, R>` to `Either<&mut L, &mut R>`.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// fn mutate_left(value: &mut Either<u32, u32>) {
+    ///     if let Some(l) = value.as_mut().left() {
+    ///         *l = 999;
+    ///     }
+    /// }
+    ///
+    /// let mut left = Left(123);
+    /// let mut right = Right(123);
+    /// mutate_left(&mut left);
+    /// mutate_left(&mut right);
+    /// assert_eq!(left, Left(999));
+    /// assert_eq!(right, Right(123));
+    /// ```
+    pub fn as_mut(&mut self) -> Either<&mut L, &mut R> {
+        match *self {
+            Left(ref mut inner) => Left(inner),
+            Right(ref mut inner) => Right(inner),
+        }
+    }
+
+    /// Convert `Pin<&Either<L, R>>` to `Either<Pin<&L>, Pin<&R>>`,
+    /// pinned projections of the inner variants.
+    pub fn as_pin_ref(self: Pin<&Self>) -> Either<Pin<&L>, Pin<&R>> {
+        // SAFETY: We can use `new_unchecked` because the `inner` parts are
+        // guaranteed to be pinned, as they come from `self` which is pinned.
+        unsafe {
+            match *Pin::get_ref(self) {
+                Left(ref inner) => Left(Pin::new_unchecked(inner)),
+                Right(ref inner) => Right(Pin::new_unchecked(inner)),
+            }
+        }
+    }
+
+    /// Convert `Pin<&mut Either<L, R>>` to `Either<Pin<&mut L>, Pin<&mut R>>`,
+    /// pinned projections of the inner variants.
+    pub fn as_pin_mut(self: Pin<&mut Self>) -> Either<Pin<&mut L>, Pin<&mut R>> {
+        // SAFETY: `get_unchecked_mut` is fine because we don't move anything.
+        // We can use `new_unchecked` because the `inner` parts are guaranteed
+        // to be pinned, as they come from `self` which is pinned, and we never
+        // offer an unpinned `&mut L` or `&mut R` through `Pin<&mut Self>`. We
+        // also don't have an implementation of `Drop`, nor manual `Unpin`.
+        unsafe {
+            match *Pin::get_unchecked_mut(self) {
+                Left(ref mut inner) => Left(Pin::new_unchecked(inner)),
+                Right(ref mut inner) => Right(Pin::new_unchecked(inner)),
+            }
+        }
+    }
+
+    /// Convert `Either<L, R>` to `Either<R, L>`.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, ()> = Left(123);
+    /// assert_eq!(left.flip(), Right(123));
+    ///
+    /// let right: Either<(), _> = Right("some value");
+    /// assert_eq!(right.flip(), Left("some value"));
+    /// ```
+    pub fn flip(self) -> Either<R, L> {
+        match self {
+            Left(l) => Right(l),
+            Right(r) => Left(r),
+        }
+    }
+
+    /// Apply the function `f` on the value in the `Left` variant if it is present rewrapping the
+    /// result in `Left`.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, u32> = Left(123);
+    /// assert_eq!(left.map_left(|x| x * 2), Left(246));
+    ///
+    /// let right: Either<u32, _> = Right(123);
+    /// assert_eq!(right.map_left(|x| x * 2), Right(123));
+    /// ```
+    pub fn map_left<F, M>(self, f: F) -> Either<M, R>
+    where
+        F: FnOnce(L) -> M,
+    {
+        match self {
+            Left(l) => Left(f(l)),
+            Right(r) => Right(r),
+        }
+    }
+
+    /// Apply the function `f` on the value in the `Right` variant if it is present rewrapping the
+    /// result in `Right`.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, u32> = Left(123);
+    /// assert_eq!(left.map_right(|x| x * 2), Left(123));
+    ///
+    /// let right: Either<u32, _> = Right(123);
+    /// assert_eq!(right.map_right(|x| x * 2), Right(246));
+    /// ```
+    pub fn map_right<F, S>(self, f: F) -> Either<L, S>
+    where
+        F: FnOnce(R) -> S,
+    {
+        match self {
+            Left(l) => Left(l),
+            Right(r) => Right(f(r)),
+        }
+    }
+
+    /// Apply the functions `f` and `g` to the `Left` and `Right` variants
+    /// respectively. This is equivalent to
+    /// [bimap](https://hackage.haskell.org/package/bifunctors-5/docs/Data-Bifunctor.html)
+    /// in functional programming.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let f = |s: String| s.len();
+    /// let g = |u: u8| u.to_string();
+    ///
+    /// let left: Either<String, u8> = Left("loopy".into());
+    /// assert_eq!(left.map_either(f, g), Left(5));
+    ///
+    /// let right: Either<String, u8> = Right(42);
+    /// assert_eq!(right.map_either(f, g), Right("42".into()));
+    /// ```
+    pub fn map_either<F, G, M, S>(self, f: F, g: G) -> Either<M, S>
+    where
+        F: FnOnce(L) -> M,
+        G: FnOnce(R) -> S,
+    {
+        match self {
+            Left(l) => Left(f(l)),
+            Right(r) => Right(g(r)),
+        }
+    }
+
+    /// Similar to [`map_either`][Self::map_either], with an added context `ctx` accessible to
+    /// both functions.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let mut sum = 0;
+    ///
+    /// // Both closures want to update the same value, so pass it as context.
+    /// let mut f = |sum: &mut usize, s: String| { *sum += s.len(); s.to_uppercase() };
+    /// let mut g = |sum: &mut usize, u: usize| { *sum += u; u.to_string() };
+    ///
+    /// let left: Either<String, usize> = Left("loopy".into());
+    /// assert_eq!(left.map_either_with(&mut sum, &mut f, &mut g), Left("LOOPY".into()));
+    ///
+    /// let right: Either<String, usize> = Right(42);
+    /// assert_eq!(right.map_either_with(&mut sum, &mut f, &mut g), Right("42".into()));
+    ///
+    /// assert_eq!(sum, 47);
+    /// ```
+    pub fn map_either_with<Ctx, F, G, M, S>(self, ctx: Ctx, f: F, g: G) -> Either<M, S>
+    where
+        F: FnOnce(Ctx, L) -> M,
+        G: FnOnce(Ctx, R) -> S,
+    {
+        match self {
+            Left(l) => Left(f(ctx, l)),
+            Right(r) => Right(g(ctx, r)),
+        }
+    }
+
+    /// Apply one of two functions depending on contents, unifying their result. If the value is
+    /// `Left(L)` then the first function `f` is applied; if it is `Right(R)` then the second
+    /// function `g` is applied.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// fn square(n: u32) -> i32 { (n * n) as i32 }
+    /// fn negate(n: i32) -> i32 { -n }
+    ///
+    /// let left: Either<u32, i32> = Left(4);
+    /// assert_eq!(left.either(square, negate), 16);
+    ///
+    /// let right: Either<u32, i32> = Right(-4);
+    /// assert_eq!(right.either(square, negate), 4);
+    /// ```
+    pub fn either<F, G, T>(self, f: F, g: G) -> T
+    where
+        F: FnOnce(L) -> T,
+        G: FnOnce(R) -> T,
+    {
+        match self {
+            Left(l) => f(l),
+            Right(r) => g(r),
+        }
+    }
+
+    /// Like [`either`][Self::either], but provide some context to whichever of the
+    /// functions ends up being called.
+    ///
+    /// ```
+    /// // In this example, the context is a mutable reference
+    /// use either::*;
+    ///
+    /// let mut result = Vec::new();
+    ///
+    /// let values = vec![Left(2), Right(2.7)];
+    ///
+    /// for value in values {
+    ///     value.either_with(&mut result,
+    ///                       |ctx, integer| ctx.push(integer),
+    ///                       |ctx, real| ctx.push(f64::round(real) as i32));
+    /// }
+    ///
+    /// assert_eq!(result, vec![2, 3]);
+    /// ```
+    pub fn either_with<Ctx, F, G, T>(self, ctx: Ctx, f: F, g: G) -> T
+    where
+        F: FnOnce(Ctx, L) -> T,
+        G: FnOnce(Ctx, R) -> T,
+    {
+        match self {
+            Left(l) => f(ctx, l),
+            Right(r) => g(ctx, r),
+        }
+    }
+
+    /// Apply the function `f` on the value in the `Left` variant if it is present.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, u32> = Left(123);
+    /// assert_eq!(left.left_and_then::<_,()>(|x| Right(x * 2)), Right(246));
+    ///
+    /// let right: Either<u32, _> = Right(123);
+    /// assert_eq!(right.left_and_then(|x| Right::<(), _>(x * 2)), Right(123));
+    /// ```
+    pub fn left_and_then<F, S>(self, f: F) -> Either<S, R>
+    where
+        F: FnOnce(L) -> Either<S, R>,
+    {
+        match self {
+            Left(l) => f(l),
+            Right(r) => Right(r),
+        }
+    }
+
+    /// Apply the function `f` on the value in the `Right` variant if it is present.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, u32> = Left(123);
+    /// assert_eq!(left.right_and_then(|x| Right(x * 2)), Left(123));
+    ///
+    /// let right: Either<u32, _> = Right(123);
+    /// assert_eq!(right.right_and_then(|x| Right(x * 2)), Right(246));
+    /// ```
+    pub fn right_and_then<F, S>(self, f: F) -> Either<L, S>
+    where
+        F: FnOnce(R) -> Either<L, S>,
+    {
+        match self {
+            Left(l) => Left(l),
+            Right(r) => f(r),
+        }
+    }
+
+    /// Convert the inner value to an iterator.
+    ///
+    /// This requires the `Left` and `Right` iterators to have the same item type.
+    /// See [`factor_into_iter`][Either::factor_into_iter] to iterate different types.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, Vec<u32>> = Left(vec![1, 2, 3, 4, 5]);
+    /// let mut right: Either<Vec<u32>, _> = Right(vec![]);
+    /// right.extend(left.into_iter());
+    /// assert_eq!(right, Right(vec![1, 2, 3, 4, 5]));
+    /// ```
+    #[allow(clippy::should_implement_trait)]
+    pub fn into_iter(self) -> Either<L::IntoIter, R::IntoIter>
+    where
+        L: IntoIterator,
+        R: IntoIterator<Item = L::Item>,
+    {
+        map_either!(self, inner => inner.into_iter())
+    }
+
+    /// Borrow the inner value as an iterator.
+    ///
+    /// This requires the `Left` and `Right` iterators to have the same item type.
+    /// See [`factor_iter`][Either::factor_iter] to iterate different types.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, &[u32]> = Left(vec![2, 3]);
+    /// let mut right: Either<Vec<u32>, _> = Right(&[4, 5][..]);
+    /// let mut all = vec![1];
+    /// all.extend(left.iter());
+    /// all.extend(right.iter());
+    /// assert_eq!(all, vec![1, 2, 3, 4, 5]);
+    /// ```
+    pub fn iter(&self) -> Either<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter>
+    where
+        for<'a> &'a L: IntoIterator,
+        for<'a> &'a R: IntoIterator<Item = <&'a L as IntoIterator>::Item>,
+    {
+        map_either!(self, inner => inner.into_iter())
+    }
+
+    /// Mutably borrow the inner value as an iterator.
+    ///
+    /// This requires the `Left` and `Right` iterators to have the same item type.
+    /// See [`factor_iter_mut`][Either::factor_iter_mut] to iterate different types.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let mut left: Either<_, &mut [u32]> = Left(vec![2, 3]);
+    /// for l in left.iter_mut() {
+    ///     *l *= *l
+    /// }
+    /// assert_eq!(left, Left(vec![4, 9]));
+    ///
+    /// let mut inner = [4, 5];
+    /// let mut right: Either<Vec<u32>, _> = Right(&mut inner[..]);
+    /// for r in right.iter_mut() {
+    ///     *r *= *r
+    /// }
+    /// assert_eq!(inner, [16, 25]);
+    /// ```
+    pub fn iter_mut(
+        &mut self,
+    ) -> Either<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter>
+    where
+        for<'a> &'a mut L: IntoIterator,
+        for<'a> &'a mut R: IntoIterator<Item = <&'a mut L as IntoIterator>::Item>,
+    {
+        map_either!(self, inner => inner.into_iter())
+    }
+
+    /// Converts an `Either` of `Iterator`s to be an `Iterator` of `Either`s
+    ///
+    /// Unlike [`into_iter`][Either::into_iter], this does not require the
+    /// `Left` and `Right` iterators to have the same item type.
+    ///
+    /// ```
+    /// use either::*;
+    /// let left: Either<_, Vec<u8>> = Left(&["hello"]);
+    /// assert_eq!(left.factor_into_iter().next(), Some(Left(&"hello")));
+
+    /// let right: Either<&[&str], _> = Right(vec![0, 1]);
+    /// assert_eq!(right.factor_into_iter().collect::<Vec<_>>(), vec![Right(0), Right(1)]);
+    ///
+    /// ```
+    // TODO(MSRV): doc(alias) was stabilized in Rust 1.48
+    // #[doc(alias = "transpose")]
+    pub fn factor_into_iter(self) -> IterEither<L::IntoIter, R::IntoIter>
+    where
+        L: IntoIterator,
+        R: IntoIterator,
+    {
+        IterEither::new(map_either!(self, inner => inner.into_iter()))
+    }
+
+    /// Borrows an `Either` of `Iterator`s to be an `Iterator` of `Either`s
+    ///
+    /// Unlike [`iter`][Either::iter], this does not require the
+    /// `Left` and `Right` iterators to have the same item type.
+    ///
+    /// ```
+    /// use either::*;
+    /// let left: Either<_, Vec<u8>> = Left(["hello"]);
+    /// assert_eq!(left.factor_iter().next(), Some(Left(&"hello")));
+
+    /// let right: Either<[&str; 2], _> = Right(vec![0, 1]);
+    /// assert_eq!(right.factor_iter().collect::<Vec<_>>(), vec![Right(&0), Right(&1)]);
+    ///
+    /// ```
+    pub fn factor_iter(
+        &self,
+    ) -> IterEither<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter>
+    where
+        for<'a> &'a L: IntoIterator,
+        for<'a> &'a R: IntoIterator,
+    {
+        IterEither::new(map_either!(self, inner => inner.into_iter()))
+    }
+
+    /// Mutably borrows an `Either` of `Iterator`s to be an `Iterator` of `Either`s
+    ///
+    /// Unlike [`iter_mut`][Either::iter_mut], this does not require the
+    /// `Left` and `Right` iterators to have the same item type.
+    ///
+    /// ```
+    /// use either::*;
+    /// let mut left: Either<_, Vec<u8>> = Left(["hello"]);
+    /// left.factor_iter_mut().for_each(|x| *x.unwrap_left() = "goodbye");
+    /// assert_eq!(left, Left(["goodbye"]));
+
+    /// let mut right: Either<[&str; 2], _> = Right(vec![0, 1, 2]);
+    /// right.factor_iter_mut().for_each(|x| if let Right(r) = x { *r = -*r; });
+    /// assert_eq!(right, Right(vec![0, -1, -2]));
+    ///
+    /// ```
+    pub fn factor_iter_mut(
+        &mut self,
+    ) -> IterEither<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter>
+    where
+        for<'a> &'a mut L: IntoIterator,
+        for<'a> &'a mut R: IntoIterator,
+    {
+        IterEither::new(map_either!(self, inner => inner.into_iter()))
+    }
+
+    /// Return left value or given value
+    ///
+    /// Arguments passed to `left_or` are eagerly evaluated; if you are passing
+    /// the result of a function call, it is recommended to use
+    /// [`left_or_else`][Self::left_or_else], which is lazily evaluated.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let left: Either<&str, &str> = Left("left");
+    /// assert_eq!(left.left_or("foo"), "left");
+    ///
+    /// let right: Either<&str, &str> = Right("right");
+    /// assert_eq!(right.left_or("left"), "left");
+    /// ```
+    pub fn left_or(self, other: L) -> L {
+        match self {
+            Either::Left(l) => l,
+            Either::Right(_) => other,
+        }
+    }
+
+    /// Return left or a default
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let left: Either<String, u32> = Left("left".to_string());
+    /// assert_eq!(left.left_or_default(), "left");
+    ///
+    /// let right: Either<String, u32> = Right(42);
+    /// assert_eq!(right.left_or_default(), String::default());
+    /// ```
+    pub fn left_or_default(self) -> L
+    where
+        L: Default,
+    {
+        match self {
+            Either::Left(l) => l,
+            Either::Right(_) => L::default(),
+        }
+    }
+
+    /// Returns left value or computes it from a closure
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let left: Either<String, u32> = Left("3".to_string());
+    /// assert_eq!(left.left_or_else(|_| unreachable!()), "3");
+    ///
+    /// let right: Either<String, u32> = Right(3);
+    /// assert_eq!(right.left_or_else(|x| x.to_string()), "3");
+    /// ```
+    pub fn left_or_else<F>(self, f: F) -> L
+    where
+        F: FnOnce(R) -> L,
+    {
+        match self {
+            Either::Left(l) => l,
+            Either::Right(r) => f(r),
+        }
+    }
+
+    /// Return right value or given value
+    ///
+    /// Arguments passed to `right_or` are eagerly evaluated; if you are passing
+    /// the result of a function call, it is recommended to use
+    /// [`right_or_else`][Self::right_or_else], which is lazily evaluated.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let right: Either<&str, &str> = Right("right");
+    /// assert_eq!(right.right_or("foo"), "right");
+    ///
+    /// let left: Either<&str, &str> = Left("left");
+    /// assert_eq!(left.right_or("right"), "right");
+    /// ```
+    pub fn right_or(self, other: R) -> R {
+        match self {
+            Either::Left(_) => other,
+            Either::Right(r) => r,
+        }
+    }
+
+    /// Return right or a default
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let left: Either<String, u32> = Left("left".to_string());
+    /// assert_eq!(left.right_or_default(), u32::default());
+    ///
+    /// let right: Either<String, u32> = Right(42);
+    /// assert_eq!(right.right_or_default(), 42);
+    /// ```
+    pub fn right_or_default(self) -> R
+    where
+        R: Default,
+    {
+        match self {
+            Either::Left(_) => R::default(),
+            Either::Right(r) => r,
+        }
+    }
+
+    /// Returns right value or computes it from a closure
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let left: Either<String, u32> = Left("3".to_string());
+    /// assert_eq!(left.right_or_else(|x| x.parse().unwrap()), 3);
+    ///
+    /// let right: Either<String, u32> = Right(3);
+    /// assert_eq!(right.right_or_else(|_| unreachable!()), 3);
+    /// ```
+    pub fn right_or_else<F>(self, f: F) -> R
+    where
+        F: FnOnce(L) -> R,
+    {
+        match self {
+            Either::Left(l) => f(l),
+            Either::Right(r) => r,
+        }
+    }
+
+    /// Returns the left value
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let left: Either<_, ()> = Left(3);
+    /// assert_eq!(left.unwrap_left(), 3);
+    /// ```
+    ///
+    /// # Panics
+    ///
+    /// When `Either` is a `Right` value
+    ///
+    /// ```should_panic
+    /// # use either::*;
+    /// let right: Either<(), _> = Right(3);
+    /// right.unwrap_left();
+    /// ```
+    pub fn unwrap_left(self) -> L
+    where
+        R: core::fmt::Debug,
+    {
+        match self {
+            Either::Left(l) => l,
+            Either::Right(r) => {
+                panic!("called `Either::unwrap_left()` on a `Right` value: {:?}", r)
+            }
+        }
+    }
+
+    /// Returns the right value
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let right: Either<(), _> = Right(3);
+    /// assert_eq!(right.unwrap_right(), 3);
+    /// ```
+    ///
+    /// # Panics
+    ///
+    /// When `Either` is a `Left` value
+    ///
+    /// ```should_panic
+    /// # use either::*;
+    /// let left: Either<_, ()> = Left(3);
+    /// left.unwrap_right();
+    /// ```
+    pub fn unwrap_right(self) -> R
+    where
+        L: core::fmt::Debug,
+    {
+        match self {
+            Either::Right(r) => r,
+            Either::Left(l) => panic!("called `Either::unwrap_right()` on a `Left` value: {:?}", l),
+        }
+    }
+
+    /// Returns the left value
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let left: Either<_, ()> = Left(3);
+    /// assert_eq!(left.expect_left("value was Right"), 3);
+    /// ```
+    ///
+    /// # Panics
+    ///
+    /// When `Either` is a `Right` value
+    ///
+    /// ```should_panic
+    /// # use either::*;
+    /// let right: Either<(), _> = Right(3);
+    /// right.expect_left("value was Right");
+    /// ```
+    pub fn expect_left(self, msg: &str) -> L
+    where
+        R: core::fmt::Debug,
+    {
+        match self {
+            Either::Left(l) => l,
+            Either::Right(r) => panic!("{}: {:?}", msg, r),
+        }
+    }
+
+    /// Returns the right value
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// let right: Either<(), _> = Right(3);
+    /// assert_eq!(right.expect_right("value was Left"), 3);
+    /// ```
+    ///
+    /// # Panics
+    ///
+    /// When `Either` is a `Left` value
+    ///
+    /// ```should_panic
+    /// # use either::*;
+    /// let left: Either<_, ()> = Left(3);
+    /// left.expect_right("value was Right");
+    /// ```
+    pub fn expect_right(self, msg: &str) -> R
+    where
+        L: core::fmt::Debug,
+    {
+        match self {
+            Either::Right(r) => r,
+            Either::Left(l) => panic!("{}: {:?}", msg, l),
+        }
+    }
+
+    /// Convert the contained value into `T`
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use either::*;
+    /// // Both u16 and u32 can be converted to u64.
+    /// let left: Either<u16, u32> = Left(3u16);
+    /// assert_eq!(left.either_into::<u64>(), 3u64);
+    /// let right: Either<u16, u32> = Right(7u32);
+    /// assert_eq!(right.either_into::<u64>(), 7u64);
+    /// ```
+    pub fn either_into<T>(self) -> T
+    where
+        L: Into<T>,
+        R: Into<T>,
+    {
+        match self {
+            Either::Left(l) => l.into(),
+            Either::Right(r) => r.into(),
+        }
+    }
+}
+
+impl<L, R> Either<Option<L>, Option<R>> {
+    /// Factors out `None` from an `Either` of [`Option`].
+    ///
+    /// ```
+    /// use either::*;
+    /// let left: Either<_, Option<String>> = Left(Some(vec![0]));
+    /// assert_eq!(left.factor_none(), Some(Left(vec![0])));
+    ///
+    /// let right: Either<Option<Vec<u8>>, _> = Right(Some(String::new()));
+    /// assert_eq!(right.factor_none(), Some(Right(String::new())));
+    /// ```
+    // TODO(MSRV): doc(alias) was stabilized in Rust 1.48
+    // #[doc(alias = "transpose")]
+    pub fn factor_none(self) -> Option<Either<L, R>> {
+        match self {
+            Left(l) => l.map(Either::Left),
+            Right(r) => r.map(Either::Right),
+        }
+    }
+}
+
+impl<L, R, E> Either<Result<L, E>, Result<R, E>> {
+    /// Factors out a homogenous type from an `Either` of [`Result`].
+    ///
+    /// Here, the homogeneous type is the `Err` type of the [`Result`].
+    ///
+    /// ```
+    /// use either::*;
+    /// let left: Either<_, Result<String, u32>> = Left(Ok(vec![0]));
+    /// assert_eq!(left.factor_err(), Ok(Left(vec![0])));
+    ///
+    /// let right: Either<Result<Vec<u8>, u32>, _> = Right(Ok(String::new()));
+    /// assert_eq!(right.factor_err(), Ok(Right(String::new())));
+    /// ```
+    // TODO(MSRV): doc(alias) was stabilized in Rust 1.48
+    // #[doc(alias = "transpose")]
+    pub fn factor_err(self) -> Result<Either<L, R>, E> {
+        match self {
+            Left(l) => l.map(Either::Left),
+            Right(r) => r.map(Either::Right),
+        }
+    }
+}
+
+impl<T, L, R> Either<Result<T, L>, Result<T, R>> {
+    /// Factors out a homogenous type from an `Either` of [`Result`].
+    ///
+    /// Here, the homogeneous type is the `Ok` type of the [`Result`].
+    ///
+    /// ```
+    /// use either::*;
+    /// let left: Either<_, Result<u32, String>> = Left(Err(vec![0]));
+    /// assert_eq!(left.factor_ok(), Err(Left(vec![0])));
+    ///
+    /// let right: Either<Result<u32, Vec<u8>>, _> = Right(Err(String::new()));
+    /// assert_eq!(right.factor_ok(), Err(Right(String::new())));
+    /// ```
+    // TODO(MSRV): doc(alias) was stabilized in Rust 1.48
+    // #[doc(alias = "transpose")]
+    pub fn factor_ok(self) -> Result<T, Either<L, R>> {
+        match self {
+            Left(l) => l.map_err(Either::Left),
+            Right(r) => r.map_err(Either::Right),
+        }
+    }
+}
+
+impl<T, L, R> Either<(T, L), (T, R)> {
+    /// Factor out a homogeneous type from an either of pairs.
+    ///
+    /// Here, the homogeneous type is the first element of the pairs.
+    ///
+    /// ```
+    /// use either::*;
+    /// let left: Either<_, (u32, String)> = Left((123, vec![0]));
+    /// assert_eq!(left.factor_first().0, 123);
+    ///
+    /// let right: Either<(u32, Vec<u8>), _> = Right((123, String::new()));
+    /// assert_eq!(right.factor_first().0, 123);
+    /// ```
+    pub fn factor_first(self) -> (T, Either<L, R>) {
+        match self {
+            Left((t, l)) => (t, Left(l)),
+            Right((t, r)) => (t, Right(r)),
+        }
+    }
+}
+
+impl<T, L, R> Either<(L, T), (R, T)> {
+    /// Factor out a homogeneous type from an either of pairs.
+    ///
+    /// Here, the homogeneous type is the second element of the pairs.
+    ///
+    /// ```
+    /// use either::*;
+    /// let left: Either<_, (String, u32)> = Left((vec![0], 123));
+    /// assert_eq!(left.factor_second().1, 123);
+    ///
+    /// let right: Either<(Vec<u8>, u32), _> = Right((String::new(), 123));
+    /// assert_eq!(right.factor_second().1, 123);
+    /// ```
+    pub fn factor_second(self) -> (Either<L, R>, T) {
+        match self {
+            Left((l, t)) => (Left(l), t),
+            Right((r, t)) => (Right(r), t),
+        }
+    }
+}
+
+impl<T> Either<T, T> {
+    /// Extract the value of an either over two equivalent types.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let left: Either<_, u32> = Left(123);
+    /// assert_eq!(left.into_inner(), 123);
+    ///
+    /// let right: Either<u32, _> = Right(123);
+    /// assert_eq!(right.into_inner(), 123);
+    /// ```
+    pub fn into_inner(self) -> T {
+        for_both!(self, inner => inner)
+    }
+
+    /// Map `f` over the contained value and return the result in the
+    /// corresponding variant.
+    ///
+    /// ```
+    /// use either::*;
+    ///
+    /// let value: Either<_, i32> = Right(42);
+    ///
+    /// let other = value.map(|x| x * 2);
+    /// assert_eq!(other, Right(84));
+    /// ```
+    pub fn map<F, M>(self, f: F) -> Either<M, M>
+    where
+        F: FnOnce(T) -> M,
+    {
+        match self {
+            Left(l) => Left(f(l)),
+            Right(r) => Right(f(r)),
+        }
+    }
+}
+
+/// Convert from `Result` to `Either` with `Ok => Right` and `Err => Left`.
+impl<L, R> From<Result<R, L>> for Either<L, R> {
+    fn from(r: Result<R, L>) -> Self {
+        match r {
+            Err(e) => Left(e),
+            Ok(o) => Right(o),
+        }
+    }
+}
+
+/// Convert from `Either` to `Result` with `Right => Ok` and `Left => Err`.
+#[allow(clippy::from_over_into)] // From requires RFC 2451, Rust 1.41
+impl<L, R> Into<Result<R, L>> for Either<L, R> {
+    fn into(self) -> Result<R, L> {
+        match self {
+            Left(l) => Err(l),
+            Right(r) => Ok(r),
+        }
+    }
+}
+
+/// `Either<L, R>` is a future if both `L` and `R` are futures.
+impl<L, R> Future for Either<L, R>
+where
+    L: Future,
+    R: Future<Output = L::Output>,
+{
+    type Output = L::Output;
+
+    fn poll(
+        self: Pin<&mut Self>,
+        cx: &mut core::task::Context<'_>,
+    ) -> core::task::Poll<Self::Output> {
+        for_both!(self.as_pin_mut(), inner => inner.poll(cx))
+    }
+}
+
+#[cfg(any(test, feature = "use_std"))]
+/// `Either<L, R>` implements `Read` if both `L` and `R` do.
+///
+/// Requires crate feature `"use_std"`
+impl<L, R> Read for Either<L, R>
+where
+    L: Read,
+    R: Read,
+{
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        for_both!(*self, ref mut inner => inner.read(buf))
+    }
+
+    fn read_exact(&mut self, buf: &mut [u8]) -> io::Result<()> {
+        for_both!(*self, ref mut inner => inner.read_exact(buf))
+    }
+
+    fn read_to_end(&mut self, buf: &mut std::vec::Vec<u8>) -> io::Result<usize> {
+        for_both!(*self, ref mut inner => inner.read_to_end(buf))
+    }
+
+    fn read_to_string(&mut self, buf: &mut std::string::String) -> io::Result<usize> {
+        for_both!(*self, ref mut inner => inner.read_to_string(buf))
+    }
+}
+
+#[cfg(any(test, feature = "use_std"))]
+/// `Either<L, R>` implements `Seek` if both `L` and `R` do.
+///
+/// Requires crate feature `"use_std"`
+impl<L, R> Seek for Either<L, R>
+where
+    L: Seek,
+    R: Seek,
+{
+    fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
+        for_both!(*self, ref mut inner => inner.seek(pos))
+    }
+}
+
+#[cfg(any(test, feature = "use_std"))]
+/// Requires crate feature `"use_std"`
+impl<L, R> BufRead for Either<L, R>
+where
+    L: BufRead,
+    R: BufRead,
+{
+    fn fill_buf(&mut self) -> io::Result<&[u8]> {
+        for_both!(*self, ref mut inner => inner.fill_buf())
+    }
+
+    fn consume(&mut self, amt: usize) {
+        for_both!(*self, ref mut inner => inner.consume(amt))
+    }
+
+    fn read_until(&mut self, byte: u8, buf: &mut std::vec::Vec<u8>) -> io::Result<usize> {
+        for_both!(*self, ref mut inner => inner.read_until(byte, buf))
+    }
+
+    fn read_line(&mut self, buf: &mut std::string::String) -> io::Result<usize> {
+        for_both!(*self, ref mut inner => inner.read_line(buf))
+    }
+}
+
+#[cfg(any(test, feature = "use_std"))]
+/// `Either<L, R>` implements `Write` if both `L` and `R` do.
+///
+/// Requires crate feature `"use_std"`
+impl<L, R> Write for Either<L, R>
+where
+    L: Write,
+    R: Write,
+{
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        for_both!(*self, ref mut inner => inner.write(buf))
+    }
+
+    fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
+        for_both!(*self, ref mut inner => inner.write_all(buf))
+    }
+
+    fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
+        for_both!(*self, ref mut inner => inner.write_fmt(fmt))
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        for_both!(*self, ref mut inner => inner.flush())
+    }
+}
+
+impl<L, R, Target> AsRef<Target> for Either<L, R>
+where
+    L: AsRef<Target>,
+    R: AsRef<Target>,
+{
+    fn as_ref(&self) -> &Target {
+        for_both!(*self, ref inner => inner.as_ref())
+    }
+}
+
+macro_rules! impl_specific_ref_and_mut {
+    ($t:ty, $($attr:meta),* ) => {
+        $(#[$attr])*
+        impl<L, R> AsRef<$t> for Either<L, R>
+            where L: AsRef<$t>, R: AsRef<$t>
+        {
+            fn as_ref(&self) -> &$t {
+                for_both!(*self, ref inner => inner.as_ref())
+            }
+        }
+
+        $(#[$attr])*
+        impl<L, R> AsMut<$t> for Either<L, R>
+            where L: AsMut<$t>, R: AsMut<$t>
+        {
+            fn as_mut(&mut self) -> &mut $t {
+                for_both!(*self, ref mut inner => inner.as_mut())
+            }
+        }
+    };
+}
+
+impl_specific_ref_and_mut!(str,);
+impl_specific_ref_and_mut!(
+    ::std::path::Path,
+    cfg(feature = "use_std"),
+    doc = "Requires crate feature `use_std`."
+);
+impl_specific_ref_and_mut!(
+    ::std::ffi::OsStr,
+    cfg(feature = "use_std"),
+    doc = "Requires crate feature `use_std`."
+);
+impl_specific_ref_and_mut!(
+    ::std::ffi::CStr,
+    cfg(feature = "use_std"),
+    doc = "Requires crate feature `use_std`."
+);
+
+impl<L, R, Target> AsRef<[Target]> for Either<L, R>
+where
+    L: AsRef<[Target]>,
+    R: AsRef<[Target]>,
+{
+    fn as_ref(&self) -> &[Target] {
+        for_both!(*self, ref inner => inner.as_ref())
+    }
+}
+
+impl<L, R, Target> AsMut<Target> for Either<L, R>
+where
+    L: AsMut<Target>,
+    R: AsMut<Target>,
+{
+    fn as_mut(&mut self) -> &mut Target {
+        for_both!(*self, ref mut inner => inner.as_mut())
+    }
+}
+
+impl<L, R, Target> AsMut<[Target]> for Either<L, R>
+where
+    L: AsMut<[Target]>,
+    R: AsMut<[Target]>,
+{
+    fn as_mut(&mut self) -> &mut [Target] {
+        for_both!(*self, ref mut inner => inner.as_mut())
+    }
+}
+
+impl<L, R> Deref for Either<L, R>
+where
+    L: Deref,
+    R: Deref<Target = L::Target>,
+{
+    type Target = L::Target;
+
+    fn deref(&self) -> &Self::Target {
+        for_both!(*self, ref inner => &**inner)
+    }
+}
+
+impl<L, R> DerefMut for Either<L, R>
+where
+    L: DerefMut,
+    R: DerefMut<Target = L::Target>,
+{
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        for_both!(*self, ref mut inner => &mut *inner)
+    }
+}
+
+#[cfg(any(test, feature = "use_std"))]
+/// `Either` implements `Error` if *both* `L` and `R` implement it.
+///
+/// Requires crate feature `"use_std"`
+impl<L, R> Error for Either<L, R>
+where
+    L: Error,
+    R: Error,
+{
+    fn source(&self) -> Option<&(dyn Error + 'static)> {
+        for_both!(*self, ref inner => inner.source())
+    }
+
+    #[allow(deprecated)]
+    fn description(&self) -> &str {
+        for_both!(*self, ref inner => inner.description())
+    }
+
+    #[allow(deprecated)]
+    fn cause(&self) -> Option<&dyn Error> {
+        for_both!(*self, ref inner => inner.cause())
+    }
+}
+
+impl<L, R> fmt::Display for Either<L, R>
+where
+    L: fmt::Display,
+    R: fmt::Display,
+{
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        for_both!(*self, ref inner => inner.fmt(f))
+    }
+}
+
+#[test]
+fn basic() {
+    let mut e = Left(2);
+    let r = Right(2);
+    assert_eq!(e, Left(2));
+    e = r;
+    assert_eq!(e, Right(2));
+    assert_eq!(e.left(), None);
+    assert_eq!(e.right(), Some(2));
+    assert_eq!(e.as_ref().right(), Some(&2));
+    assert_eq!(e.as_mut().right(), Some(&mut 2));
+}
+
+#[test]
+fn macros() {
+    use std::string::String;
+
+    fn a() -> Either<u32, u32> {
+        let x: u32 = try_left!(Right(1337u32));
+        Left(x * 2)
+    }
+    assert_eq!(a(), Right(1337));
+
+    fn b() -> Either<String, &'static str> {
+        Right(try_right!(Left("foo bar")))
+    }
+    assert_eq!(b(), Left(String::from("foo bar")));
+}
+
+#[test]
+fn deref() {
+    use std::string::String;
+
+    fn is_str(_: &str) {}
+    let value: Either<String, &str> = Left(String::from("test"));
+    is_str(&*value);
+}
+
+#[test]
+fn iter() {
+    let x = 3;
+    let mut iter = match x {
+        3 => Left(0..10),
+        _ => Right(17..),
+    };
+
+    assert_eq!(iter.next(), Some(0));
+    assert_eq!(iter.count(), 9);
+}
+
+#[test]
+fn seek() {
+    use std::io;
+
+    let use_empty = false;
+    let mut mockdata = [0x00; 256];
+    for i in 0..256 {
+        mockdata[i] = i as u8;
+    }
+
+    let mut reader = if use_empty {
+        // Empty didn't impl Seek until Rust 1.51
+        Left(io::Cursor::new([]))
+    } else {
+        Right(io::Cursor::new(&mockdata[..]))
+    };
+
+    let mut buf = [0u8; 16];
+    assert_eq!(reader.read(&mut buf).unwrap(), buf.len());
+    assert_eq!(buf, mockdata[..buf.len()]);
+
+    // the first read should advance the cursor and return the next 16 bytes thus the `ne`
+    assert_eq!(reader.read(&mut buf).unwrap(), buf.len());
+    assert_ne!(buf, mockdata[..buf.len()]);
+
+    // if the seek operation fails it should read 16..31 instead of 0..15
+    reader.seek(io::SeekFrom::Start(0)).unwrap();
+    assert_eq!(reader.read(&mut buf).unwrap(), buf.len());
+    assert_eq!(buf, mockdata[..buf.len()]);
+}
+
+#[test]
+fn read_write() {
+    use std::io;
+
+    let use_stdio = false;
+    let mockdata = [0xff; 256];
+
+    let mut reader = if use_stdio {
+        Left(io::stdin())
+    } else {
+        Right(&mockdata[..])
+    };
+
+    let mut buf = [0u8; 16];
+    assert_eq!(reader.read(&mut buf).unwrap(), buf.len());
+    assert_eq!(&buf, &mockdata[..buf.len()]);
+
+    let mut mockbuf = [0u8; 256];
+    let mut writer = if use_stdio {
+        Left(io::stdout())
+    } else {
+        Right(&mut mockbuf[..])
+    };
+
+    let buf = [1u8; 16];
+    assert_eq!(writer.write(&buf).unwrap(), buf.len());
+}
+
+#[test]
+fn error() {
+    let invalid_utf8 = b"\xff";
+    #[allow(invalid_from_utf8)]
+    let res = if let Err(error) = ::std::str::from_utf8(invalid_utf8) {
+        Err(Left(error))
+    } else if let Err(error) = "x".parse::<i32>() {
+        Err(Right(error))
+    } else {
+        Ok(())
+    };
+    assert!(res.is_err());
+    #[allow(deprecated)]
+    res.unwrap_err().description(); // make sure this can be called
+}
+
+/// A helper macro to check if AsRef and AsMut are implemented for a given type.
+macro_rules! check_t {
+    ($t:ty) => {{
+        fn check_ref<T: AsRef<$t>>() {}
+        fn propagate_ref<T1: AsRef<$t>, T2: AsRef<$t>>() {
+            check_ref::<Either<T1, T2>>()
+        }
+        fn check_mut<T: AsMut<$t>>() {}
+        fn propagate_mut<T1: AsMut<$t>, T2: AsMut<$t>>() {
+            check_mut::<Either<T1, T2>>()
+        }
+    }};
+}
+
+// This "unused" method is here to ensure that compilation doesn't fail on given types.
+fn _unsized_ref_propagation() {
+    check_t!(str);
+
+    fn check_array_ref<T: AsRef<[Item]>, Item>() {}
+    fn check_array_mut<T: AsMut<[Item]>, Item>() {}
+
+    fn propagate_array_ref<T1: AsRef<[Item]>, T2: AsRef<[Item]>, Item>() {
+        check_array_ref::<Either<T1, T2>, _>()
+    }
+
+    fn propagate_array_mut<T1: AsMut<[Item]>, T2: AsMut<[Item]>, Item>() {
+        check_array_mut::<Either<T1, T2>, _>()
+    }
+}
+
+// This "unused" method is here to ensure that compilation doesn't fail on given types.
+#[cfg(feature = "use_std")]
+fn _unsized_std_propagation() {
+    check_t!(::std::path::Path);
+    check_t!(::std::ffi::OsStr);
+    check_t!(::std::ffi::CStr);
+}
+
\ No newline at end of file diff --git a/src/rayon/array.rs.html b/src/rayon/array.rs.html new file mode 100644 index 0000000000..b13e2f991f --- /dev/null +++ b/src/rayon/array.rs.html @@ -0,0 +1,173 @@ +array.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+
//! Parallel iterator types for [arrays] (`[T; N]`)
+//!
+//! You will rarely need to interact with this module directly unless you need
+//! to name one of the iterator types.
+//!
+//! [arrays]: https://doc.rust-lang.org/std/primitive.array.html
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use crate::slice::{Iter, IterMut};
+use crate::vec::DrainProducer;
+use std::mem::ManuallyDrop;
+
+impl<'data, T: Sync + 'data, const N: usize> IntoParallelIterator for &'data [T; N] {
+    type Item = &'data T;
+    type Iter = Iter<'data, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        <&[T]>::into_par_iter(self)
+    }
+}
+
+impl<'data, T: Send + 'data, const N: usize> IntoParallelIterator for &'data mut [T; N] {
+    type Item = &'data mut T;
+    type Iter = IterMut<'data, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        <&mut [T]>::into_par_iter(self)
+    }
+}
+
+impl<T: Send, const N: usize> IntoParallelIterator for [T; N] {
+    type Item = T;
+    type Iter = IntoIter<T, N>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IntoIter { array: self }
+    }
+}
+
+/// Parallel iterator that moves out of an array.
+#[derive(Debug, Clone)]
+pub struct IntoIter<T: Send, const N: usize> {
+    array: [T; N],
+}
+
+impl<T: Send, const N: usize> ParallelIterator for IntoIter<T, N> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(N)
+    }
+}
+
+impl<T: Send, const N: usize> IndexedParallelIterator for IntoIter<T, N> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        N
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        unsafe {
+            // Drain every item, and then the local array can just fall out of scope.
+            let mut array = ManuallyDrop::new(self.array);
+            let producer = DrainProducer::new(array.as_mut_slice());
+            callback.callback(producer)
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/collections/binary_heap.rs.html b/src/rayon/collections/binary_heap.rs.html new file mode 100644 index 0000000000..ea0049a572 --- /dev/null +++ b/src/rayon/collections/binary_heap.rs.html @@ -0,0 +1,243 @@ +binary_heap.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+
//! This module contains the parallel iterator types for heaps
+//! (`BinaryHeap<T>`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use std::collections::BinaryHeap;
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+
+use crate::vec;
+
+/// Parallel iterator over a binary heap
+#[derive(Debug, Clone)]
+pub struct IntoIter<T: Ord + Send> {
+    inner: vec::IntoIter<T>,
+}
+
+impl<T: Ord + Send> IntoParallelIterator for BinaryHeap<T> {
+    type Item = T;
+    type Iter = IntoIter<T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IntoIter {
+            inner: Vec::from(self).into_par_iter(),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    IntoIter<T> => T,
+    impl<T: Ord + Send>
+}
+
+/// Parallel iterator over an immutable reference to a binary heap
+#[derive(Debug)]
+pub struct Iter<'a, T: Ord + Sync> {
+    inner: vec::IntoIter<&'a T>,
+}
+
+impl<'a, T: Ord + Sync> Clone for Iter<'a, T> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+into_par_vec! {
+    &'a BinaryHeap<T> => Iter<'a, T>,
+    impl<'a, T: Ord + Sync>
+}
+
+delegate_indexed_iterator! {
+    Iter<'a, T> => &'a T,
+    impl<'a, T: Ord + Sync + 'a>
+}
+
+// `BinaryHeap` doesn't have a mutable `Iterator`
+
+/// Draining parallel iterator that moves out of a binary heap,
+/// but keeps the total capacity.
+#[derive(Debug)]
+pub struct Drain<'a, T: Ord + Send> {
+    heap: &'a mut BinaryHeap<T>,
+}
+
+impl<'a, T: Ord + Send> ParallelDrainFull for &'a mut BinaryHeap<T> {
+    type Iter = Drain<'a, T>;
+    type Item = T;
+
+    fn par_drain(self) -> Self::Iter {
+        Drain { heap: self }
+    }
+}
+
+impl<'a, T: Ord + Send> ParallelIterator for Drain<'a, T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'a, T: Ord + Send> IndexedParallelIterator for Drain<'a, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.heap.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        super::DrainGuard::new(self.heap)
+            .par_drain(..)
+            .with_producer(callback)
+    }
+}
+
+impl<'a, T: Ord + Send> Drop for Drain<'a, T> {
+    fn drop(&mut self) {
+        if !self.heap.is_empty() {
+            // We must not have produced, so just call a normal drain to remove the items.
+            self.heap.drain();
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/collections/btree_map.rs.html b/src/rayon/collections/btree_map.rs.html new file mode 100644 index 0000000000..d0dc46da8c --- /dev/null +++ b/src/rayon/collections/btree_map.rs.html @@ -0,0 +1,135 @@ +btree_map.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
//! This module contains the parallel iterator types for B-Tree maps
+//! (`BTreeMap<K, V>`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use std::collections::BTreeMap;
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+
+use crate::vec;
+
+/// Parallel iterator over a B-Tree map
+#[derive(Debug)] // std doesn't Clone
+pub struct IntoIter<K: Ord + Send, V: Send> {
+    inner: vec::IntoIter<(K, V)>,
+}
+
+into_par_vec! {
+    BTreeMap<K, V> => IntoIter<K, V>,
+    impl<K: Ord + Send, V: Send>
+}
+
+delegate_iterator! {
+    IntoIter<K, V> => (K, V),
+    impl<K: Ord + Send, V: Send>
+}
+
+/// Parallel iterator over an immutable reference to a B-Tree map
+#[derive(Debug)]
+pub struct Iter<'a, K: Ord + Sync, V: Sync> {
+    inner: vec::IntoIter<(&'a K, &'a V)>,
+}
+
+impl<'a, K: Ord + Sync, V: Sync> Clone for Iter<'a, K, V> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+into_par_vec! {
+    &'a BTreeMap<K, V> => Iter<'a, K, V>,
+    impl<'a, K: Ord + Sync, V: Sync>
+}
+
+delegate_iterator! {
+    Iter<'a, K, V> => (&'a K, &'a V),
+    impl<'a, K: Ord + Sync + 'a, V: Sync + 'a>
+}
+
+/// Parallel iterator over a mutable reference to a B-Tree map
+#[derive(Debug)]
+pub struct IterMut<'a, K: Ord + Sync, V: Send> {
+    inner: vec::IntoIter<(&'a K, &'a mut V)>,
+}
+
+into_par_vec! {
+    &'a mut BTreeMap<K, V> => IterMut<'a, K, V>,
+    impl<'a, K: Ord + Sync, V: Send>
+}
+
+delegate_iterator! {
+    IterMut<'a, K, V> => (&'a K, &'a mut V),
+    impl<'a, K: Ord + Sync + 'a, V: Send + 'a>
+}
+
\ No newline at end of file diff --git a/src/rayon/collections/btree_set.rs.html b/src/rayon/collections/btree_set.rs.html new file mode 100644 index 0000000000..47696d9863 --- /dev/null +++ b/src/rayon/collections/btree_set.rs.html @@ -0,0 +1,107 @@ +btree_set.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+
//! This module contains the parallel iterator types for B-Tree sets
+//! (`BTreeSet<T>`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use std::collections::BTreeSet;
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+
+use crate::vec;
+
+/// Parallel iterator over a B-Tree set
+#[derive(Debug)] // std doesn't Clone
+pub struct IntoIter<T: Ord + Send> {
+    inner: vec::IntoIter<T>,
+}
+
+into_par_vec! {
+    BTreeSet<T> => IntoIter<T>,
+    impl<T: Ord + Send>
+}
+
+delegate_iterator! {
+    IntoIter<T> => T,
+    impl<T: Ord + Send>
+}
+
+/// Parallel iterator over an immutable reference to a B-Tree set
+#[derive(Debug)]
+pub struct Iter<'a, T: Ord + Sync> {
+    inner: vec::IntoIter<&'a T>,
+}
+
+impl<'a, T: Ord + Sync + 'a> Clone for Iter<'a, T> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+into_par_vec! {
+    &'a BTreeSet<T> => Iter<'a, T>,
+    impl<'a, T: Ord + Sync>
+}
+
+delegate_iterator! {
+    Iter<'a, T> => &'a T,
+    impl<'a, T: Ord + Sync + 'a>
+}
+
+// `BTreeSet` doesn't have a mutable `Iterator`
+
\ No newline at end of file diff --git a/src/rayon/collections/hash_map.rs.html b/src/rayon/collections/hash_map.rs.html new file mode 100644 index 0000000000..5ad47c4864 --- /dev/null +++ b/src/rayon/collections/hash_map.rs.html @@ -0,0 +1,195 @@ +hash_map.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+
//! This module contains the parallel iterator types for hash maps
+//! (`HashMap<K, V>`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use std::collections::HashMap;
+use std::hash::{BuildHasher, Hash};
+use std::marker::PhantomData;
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+
+use crate::vec;
+
+/// Parallel iterator over a hash map
+#[derive(Debug)] // std doesn't Clone
+pub struct IntoIter<K: Hash + Eq + Send, V: Send> {
+    inner: vec::IntoIter<(K, V)>,
+}
+
+into_par_vec! {
+    HashMap<K, V, S> => IntoIter<K, V>,
+    impl<K: Hash + Eq + Send, V: Send, S: BuildHasher>
+}
+
+delegate_iterator! {
+    IntoIter<K, V> => (K, V),
+    impl<K: Hash + Eq + Send, V: Send>
+}
+
+/// Parallel iterator over an immutable reference to a hash map
+#[derive(Debug)]
+pub struct Iter<'a, K: Hash + Eq + Sync, V: Sync> {
+    inner: vec::IntoIter<(&'a K, &'a V)>,
+}
+
+impl<'a, K: Hash + Eq + Sync, V: Sync> Clone for Iter<'a, K, V> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+into_par_vec! {
+    &'a HashMap<K, V, S> => Iter<'a, K, V>,
+    impl<'a, K: Hash + Eq + Sync, V: Sync, S: BuildHasher>
+}
+
+delegate_iterator! {
+    Iter<'a, K, V> => (&'a K, &'a V),
+    impl<'a, K: Hash + Eq + Sync + 'a, V: Sync + 'a>
+}
+
+/// Parallel iterator over a mutable reference to a hash map
+#[derive(Debug)]
+pub struct IterMut<'a, K: Hash + Eq + Sync, V: Send> {
+    inner: vec::IntoIter<(&'a K, &'a mut V)>,
+}
+
+into_par_vec! {
+    &'a mut HashMap<K, V, S> => IterMut<'a, K, V>,
+    impl<'a, K: Hash + Eq + Sync, V: Send, S: BuildHasher>
+}
+
+delegate_iterator! {
+    IterMut<'a, K, V> => (&'a K, &'a mut V),
+    impl<'a, K: Hash + Eq + Sync + 'a, V: Send + 'a>
+}
+
+/// Draining parallel iterator that moves out of a hash map,
+/// but keeps the total capacity.
+#[derive(Debug)]
+pub struct Drain<'a, K: Hash + Eq + Send, V: Send> {
+    inner: vec::IntoIter<(K, V)>,
+    marker: PhantomData<&'a mut HashMap<K, V>>,
+}
+
+impl<'a, K: Hash + Eq + Send, V: Send, S: BuildHasher> ParallelDrainFull
+    for &'a mut HashMap<K, V, S>
+{
+    type Iter = Drain<'a, K, V>;
+    type Item = (K, V);
+
+    fn par_drain(self) -> Self::Iter {
+        let vec: Vec<_> = self.drain().collect();
+        Drain {
+            inner: vec.into_par_iter(),
+            marker: PhantomData,
+        }
+    }
+}
+
+delegate_iterator! {
+    Drain<'_, K, V> => (K, V),
+    impl<K: Hash + Eq + Send, V: Send>
+}
+
\ No newline at end of file diff --git a/src/rayon/collections/hash_set.rs.html b/src/rayon/collections/hash_set.rs.html new file mode 100644 index 0000000000..1b143873f9 --- /dev/null +++ b/src/rayon/collections/hash_set.rs.html @@ -0,0 +1,163 @@ +hash_set.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+
//! This module contains the parallel iterator types for hash sets
+//! (`HashSet<T>`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use std::collections::HashSet;
+use std::hash::{BuildHasher, Hash};
+use std::marker::PhantomData;
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+
+use crate::vec;
+
+/// Parallel iterator over a hash set
+#[derive(Debug)] // std doesn't Clone
+pub struct IntoIter<T: Hash + Eq + Send> {
+    inner: vec::IntoIter<T>,
+}
+
+into_par_vec! {
+    HashSet<T, S> => IntoIter<T>,
+    impl<T: Hash + Eq + Send, S: BuildHasher>
+}
+
+delegate_iterator! {
+    IntoIter<T> => T,
+    impl<T: Hash + Eq + Send>
+}
+
+/// Parallel iterator over an immutable reference to a hash set
+#[derive(Debug)]
+pub struct Iter<'a, T: Hash + Eq + Sync> {
+    inner: vec::IntoIter<&'a T>,
+}
+
+impl<'a, T: Hash + Eq + Sync> Clone for Iter<'a, T> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+into_par_vec! {
+    &'a HashSet<T, S> => Iter<'a, T>,
+    impl<'a, T: Hash + Eq + Sync, S: BuildHasher>
+}
+
+delegate_iterator! {
+    Iter<'a, T> => &'a T,
+    impl<'a, T: Hash + Eq + Sync + 'a>
+}
+
+// `HashSet` doesn't have a mutable `Iterator`
+
+/// Draining parallel iterator that moves out of a hash set,
+/// but keeps the total capacity.
+#[derive(Debug)]
+pub struct Drain<'a, T: Hash + Eq + Send> {
+    inner: vec::IntoIter<T>,
+    marker: PhantomData<&'a mut HashSet<T>>,
+}
+
+impl<'a, T: Hash + Eq + Send, S: BuildHasher> ParallelDrainFull for &'a mut HashSet<T, S> {
+    type Iter = Drain<'a, T>;
+    type Item = T;
+
+    fn par_drain(self) -> Self::Iter {
+        let vec: Vec<_> = self.drain().collect();
+        Drain {
+            inner: vec.into_par_iter(),
+            marker: PhantomData,
+        }
+    }
+}
+
+delegate_iterator! {
+    Drain<'_, T> => T,
+    impl<T: Hash + Eq + Send>
+}
+
\ No newline at end of file diff --git a/src/rayon/collections/linked_list.rs.html b/src/rayon/collections/linked_list.rs.html new file mode 100644 index 0000000000..e89f6827be --- /dev/null +++ b/src/rayon/collections/linked_list.rs.html @@ -0,0 +1,135 @@ +linked_list.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
//! This module contains the parallel iterator types for linked lists
+//! (`LinkedList<T>`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use std::collections::LinkedList;
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+
+use crate::vec;
+
+/// Parallel iterator over a linked list
+#[derive(Debug, Clone)]
+pub struct IntoIter<T: Send> {
+    inner: vec::IntoIter<T>,
+}
+
+into_par_vec! {
+    LinkedList<T> => IntoIter<T>,
+    impl<T: Send>
+}
+
+delegate_iterator! {
+    IntoIter<T> => T,
+    impl<T: Send>
+}
+
+/// Parallel iterator over an immutable reference to a linked list
+#[derive(Debug)]
+pub struct Iter<'a, T: Sync> {
+    inner: vec::IntoIter<&'a T>,
+}
+
+impl<'a, T: Sync> Clone for Iter<'a, T> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+into_par_vec! {
+    &'a LinkedList<T> => Iter<'a, T>,
+    impl<'a, T: Sync>
+}
+
+delegate_iterator! {
+    Iter<'a, T> => &'a T,
+    impl<'a, T: Sync + 'a>
+}
+
+/// Parallel iterator over a mutable reference to a linked list
+#[derive(Debug)]
+pub struct IterMut<'a, T: Send> {
+    inner: vec::IntoIter<&'a mut T>,
+}
+
+into_par_vec! {
+    &'a mut LinkedList<T> => IterMut<'a, T>,
+    impl<'a, T: Send>
+}
+
+delegate_iterator! {
+    IterMut<'a, T> => &'a mut T,
+    impl<'a, T: Send + 'a>
+}
+
\ No newline at end of file diff --git a/src/rayon/collections/mod.rs.html b/src/rayon/collections/mod.rs.html new file mode 100644 index 0000000000..d4654235f5 --- /dev/null +++ b/src/rayon/collections/mod.rs.html @@ -0,0 +1,171 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
//! Parallel iterator types for [standard collections][std::collections]
+//!
+//! You will rarely need to interact with this module directly unless you need
+//! to name one of the iterator types.
+//!
+//! [std::collections]: https://doc.rust-lang.org/stable/std/collections/
+
+/// Convert an iterable collection into a parallel iterator by first
+/// collecting into a temporary `Vec`, then iterating that.
+macro_rules! into_par_vec {
+    ($t:ty => $iter:ident<$($i:tt),*>, impl $($args:tt)*) => {
+        impl $($args)* IntoParallelIterator for $t {
+            type Item = <$t as IntoIterator>::Item;
+            type Iter = $iter<$($i),*>;
+
+            fn into_par_iter(self) -> Self::Iter {
+                use std::iter::FromIterator;
+                $iter { inner: Vec::from_iter(self).into_par_iter() }
+            }
+        }
+    };
+}
+
+pub mod binary_heap;
+pub mod btree_map;
+pub mod btree_set;
+pub mod hash_map;
+pub mod hash_set;
+pub mod linked_list;
+pub mod vec_deque;
+
+use self::drain_guard::DrainGuard;
+
+mod drain_guard {
+    use crate::iter::ParallelDrainRange;
+    use std::mem;
+    use std::ops::RangeBounds;
+
+    /// A proxy for draining a collection by converting to a `Vec` and back.
+    ///
+    /// This is used for draining `BinaryHeap` and `VecDeque`, which both have
+    /// zero-allocation conversions to/from `Vec`, though not zero-cost:
+    /// - `BinaryHeap` will heapify from `Vec`, but at least that will be empty.
+    /// - `VecDeque` has to shift items to offset 0 when converting to `Vec`.
+    #[allow(missing_debug_implementations)]
+    pub(super) struct DrainGuard<'a, T, C: From<Vec<T>>> {
+        collection: &'a mut C,
+        vec: Vec<T>,
+    }
+
+    impl<'a, T, C> DrainGuard<'a, T, C>
+    where
+        C: Default + From<Vec<T>>,
+        Vec<T>: From<C>,
+    {
+        pub(super) fn new(collection: &'a mut C) -> Self {
+            Self {
+                // Temporarily steal the inner `Vec` so we can drain in place.
+                vec: Vec::from(mem::take(collection)),
+                collection,
+            }
+        }
+    }
+
+    impl<'a, T, C: From<Vec<T>>> Drop for DrainGuard<'a, T, C> {
+        fn drop(&mut self) {
+            // Restore the collection from the `Vec` with its original capacity.
+            *self.collection = C::from(mem::take(&mut self.vec));
+        }
+    }
+
+    impl<'a, T, C> ParallelDrainRange<usize> for &'a mut DrainGuard<'_, T, C>
+    where
+        T: Send,
+        C: From<Vec<T>>,
+    {
+        type Iter = crate::vec::Drain<'a, T>;
+        type Item = T;
+
+        fn par_drain<R: RangeBounds<usize>>(self, range: R) -> Self::Iter {
+            self.vec.par_drain(range)
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/collections/vec_deque.rs.html b/src/rayon/collections/vec_deque.rs.html new file mode 100644 index 0000000000..3ea8ddb16b --- /dev/null +++ b/src/rayon/collections/vec_deque.rs.html @@ -0,0 +1,321 @@ +vec_deque.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+
//! This module contains the parallel iterator types for double-ended queues
+//! (`VecDeque<T>`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use std::collections::VecDeque;
+use std::ops::{Range, RangeBounds};
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use crate::math::simplify_range;
+
+use crate::slice;
+use crate::vec;
+
+/// Parallel iterator over a double-ended queue
+#[derive(Debug, Clone)]
+pub struct IntoIter<T: Send> {
+    inner: vec::IntoIter<T>,
+}
+
+impl<T: Send> IntoParallelIterator for VecDeque<T> {
+    type Item = T;
+    type Iter = IntoIter<T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        // NOTE: requires data movement if the deque doesn't start at offset 0.
+        let inner = Vec::from(self).into_par_iter();
+        IntoIter { inner }
+    }
+}
+
+delegate_indexed_iterator! {
+    IntoIter<T> => T,
+    impl<T: Send>
+}
+
+/// Parallel iterator over an immutable reference to a double-ended queue
+#[derive(Debug)]
+pub struct Iter<'a, T: Sync> {
+    inner: Chain<slice::Iter<'a, T>, slice::Iter<'a, T>>,
+}
+
+impl<'a, T: Sync> Clone for Iter<'a, T> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+impl<'a, T: Sync> IntoParallelIterator for &'a VecDeque<T> {
+    type Item = &'a T;
+    type Iter = Iter<'a, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        let (a, b) = self.as_slices();
+        Iter {
+            inner: a.into_par_iter().chain(b),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    Iter<'a, T> => &'a T,
+    impl<'a, T: Sync + 'a>
+}
+
+/// Parallel iterator over a mutable reference to a double-ended queue
+#[derive(Debug)]
+pub struct IterMut<'a, T: Send> {
+    inner: Chain<slice::IterMut<'a, T>, slice::IterMut<'a, T>>,
+}
+
+impl<'a, T: Send> IntoParallelIterator for &'a mut VecDeque<T> {
+    type Item = &'a mut T;
+    type Iter = IterMut<'a, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        let (a, b) = self.as_mut_slices();
+        IterMut {
+            inner: a.into_par_iter().chain(b),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    IterMut<'a, T> => &'a mut T,
+    impl<'a, T: Send + 'a>
+}
+
+/// Draining parallel iterator that moves a range out of a double-ended queue,
+/// but keeps the total capacity.
+#[derive(Debug)]
+pub struct Drain<'a, T: Send> {
+    deque: &'a mut VecDeque<T>,
+    range: Range<usize>,
+    orig_len: usize,
+}
+
+impl<'a, T: Send> ParallelDrainRange<usize> for &'a mut VecDeque<T> {
+    type Iter = Drain<'a, T>;
+    type Item = T;
+
+    fn par_drain<R: RangeBounds<usize>>(self, range: R) -> Self::Iter {
+        Drain {
+            orig_len: self.len(),
+            range: simplify_range(range, self.len()),
+            deque: self,
+        }
+    }
+}
+
+impl<'a, T: Send> ParallelIterator for Drain<'a, T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'a, T: Send> IndexedParallelIterator for Drain<'a, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.range.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        // NOTE: requires data movement if the deque doesn't start at offset 0.
+        super::DrainGuard::new(self.deque)
+            .par_drain(self.range.clone())
+            .with_producer(callback)
+    }
+}
+
+impl<'a, T: Send> Drop for Drain<'a, T> {
+    fn drop(&mut self) {
+        if self.deque.len() != self.orig_len - self.range.len() {
+            // We must not have produced, so just call a normal drain to remove the items.
+            assert_eq!(self.deque.len(), self.orig_len);
+            self.deque.drain(self.range.clone());
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/compile_fail/cannot_collect_filtermap_data.rs.html b/src/rayon/compile_fail/cannot_collect_filtermap_data.rs.html new file mode 100644 index 0000000000..b572ef5481 --- /dev/null +++ b/src/rayon/compile_fail/cannot_collect_filtermap_data.rs.html @@ -0,0 +1,31 @@ +cannot_collect_filtermap_data.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+
/*! ```compile_fail,E0599
+
+use rayon::prelude::*;
+
+// zip requires data of exact size, but filter yields only bounded
+// size, so check that we cannot apply it.
+
+let a: Vec<usize> = (0..1024).collect();
+let mut v = vec![];
+a.par_iter()
+    .filter_map(|&x| Some(x as f32))
+    .collect_into_vec(&mut v); //~ ERROR no method
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon/compile_fail/cannot_zip_filtered_data.rs.html b/src/rayon/compile_fail/cannot_zip_filtered_data.rs.html new file mode 100644 index 0000000000..845d3cf697 --- /dev/null +++ b/src/rayon/compile_fail/cannot_zip_filtered_data.rs.html @@ -0,0 +1,31 @@ +cannot_zip_filtered_data.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+
/*! ```compile_fail,E0277
+
+use rayon::prelude::*;
+
+// zip requires data of exact size, but filter yields only bounded
+// size, so check that we cannot apply it.
+
+let mut a: Vec<usize> = (0..1024).rev().collect();
+let b: Vec<usize> = (0..1024).collect();
+
+a.par_iter()
+    .zip(b.par_iter().filter(|&&x| x > 3)); //~ ERROR
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon/compile_fail/cell_par_iter.rs.html b/src/rayon/compile_fail/cell_par_iter.rs.html new file mode 100644 index 0000000000..39fdabdcad --- /dev/null +++ b/src/rayon/compile_fail/cell_par_iter.rs.html @@ -0,0 +1,29 @@ +cell_par_iter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+
/*! ```compile_fail,E0277
+
+// Check that we can't use the par-iter API to access contents of a `Cell`.
+
+use rayon::prelude::*;
+use std::cell::Cell;
+
+let c = Cell::new(42_i32);
+(0_i32..1024).into_par_iter()
+    .map(|_| c.get()) //~ ERROR E0277
+    .min();
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon/compile_fail/mod.rs.html b/src/rayon/compile_fail/mod.rs.html new file mode 100644 index 0000000000..2ef15de624 --- /dev/null +++ b/src/rayon/compile_fail/mod.rs.html @@ -0,0 +1,17 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+
// These modules contain `compile_fail` doc tests.
+mod cannot_collect_filtermap_data;
+mod cannot_zip_filtered_data;
+mod cell_par_iter;
+mod must_use;
+mod no_send_par_iter;
+mod rc_par_iter;
+
\ No newline at end of file diff --git a/src/rayon/compile_fail/must_use.rs.html b/src/rayon/compile_fail/must_use.rs.html new file mode 100644 index 0000000000..bae2be57b3 --- /dev/null +++ b/src/rayon/compile_fail/must_use.rs.html @@ -0,0 +1,145 @@ +must_use.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+
// Check that we are flagged for ignoring `must_use` parallel adaptors.
+// (unfortunately there's no error code for `unused_must_use`)
+
+macro_rules! must_use {
+    ($( $name:ident #[$expr:meta] )*) => {$(
+        /// First sanity check that the expression is OK.
+        ///
+        /// ```
+        /// #![deny(unused_must_use)]
+        ///
+        /// use rayon::prelude::*;
+        ///
+        /// let v: Vec<_> = (0..100).map(Some).collect();
+        /// let _ =
+        #[$expr]
+        /// ```
+        ///
+        /// Now trigger the `must_use`.
+        ///
+        /// ```compile_fail
+        /// #![deny(unused_must_use)]
+        ///
+        /// use rayon::prelude::*;
+        ///
+        /// let v: Vec<_> = (0..100).map(Some).collect();
+        #[$expr]
+        /// ```
+        mod $name {}
+    )*}
+}
+
+must_use! {
+    by_exponential_blocks  /** v.par_iter().by_exponential_blocks(); */
+    by_uniform_blocks   /** v.par_iter().by_uniform_blocks(2); */
+    step_by             /** v.par_iter().step_by(2); */
+    chain               /** v.par_iter().chain(&v); */
+    chunks              /** v.par_iter().chunks(2); */
+    fold_chunks         /** v.par_iter().fold_chunks(2, || 0, |x, _| x); */
+    fold_chunks_with    /** v.par_iter().fold_chunks_with(2, 0, |x, _| x); */
+    cloned              /** v.par_iter().cloned(); */
+    copied              /** v.par_iter().copied(); */
+    enumerate           /** v.par_iter().enumerate(); */
+    filter              /** v.par_iter().filter(|_| true); */
+    filter_map          /** v.par_iter().filter_map(|x| *x); */
+    flat_map            /** v.par_iter().flat_map(|x| *x); */
+    flat_map_iter       /** v.par_iter().flat_map_iter(|x| *x); */
+    flatten             /** v.par_iter().flatten(); */
+    flatten_iter        /** v.par_iter().flatten_iter(); */
+    fold                /** v.par_iter().fold(|| 0, |x, _| x); */
+    fold_with           /** v.par_iter().fold_with(0, |x, _| x); */
+    try_fold            /** v.par_iter().try_fold(|| 0, |x, _| Some(x)); */
+    try_fold_with       /** v.par_iter().try_fold_with(0, |x, _| Some(x)); */
+    inspect             /** v.par_iter().inspect(|_| {}); */
+    interleave          /** v.par_iter().interleave(&v); */
+    interleave_shortest /** v.par_iter().interleave_shortest(&v); */
+    intersperse         /** v.par_iter().intersperse(&None); */
+    map                 /** v.par_iter().map(|x| x); */
+    map_with            /** v.par_iter().map_with(0, |_, x| x); */
+    map_init            /** v.par_iter().map_init(|| 0, |_, x| x); */
+    panic_fuse          /** v.par_iter().panic_fuse(); */
+    positions           /** v.par_iter().positions(|_| true); */
+    rev                 /** v.par_iter().rev(); */
+    skip                /** v.par_iter().skip(1); */
+    take                /** v.par_iter().take(1); */
+    update              /** v.par_iter().update(|_| {}); */
+    while_some          /** v.par_iter().cloned().while_some(); */
+    with_max_len        /** v.par_iter().with_max_len(1); */
+    with_min_len        /** v.par_iter().with_min_len(1); */
+    zip                 /** v.par_iter().zip(&v); */
+    zip_eq              /** v.par_iter().zip_eq(&v); */
+}
+
\ No newline at end of file diff --git a/src/rayon/compile_fail/no_send_par_iter.rs.html b/src/rayon/compile_fail/no_send_par_iter.rs.html new file mode 100644 index 0000000000..a35580d508 --- /dev/null +++ b/src/rayon/compile_fail/no_send_par_iter.rs.html @@ -0,0 +1,119 @@ +no_send_par_iter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+
// Check that `!Send` types fail early.
+
+/** ```compile_fail,E0277
+
+use rayon::prelude::*;
+use std::ptr::null;
+
+#[derive(Copy, Clone)]
+struct NoSend(*const ());
+
+unsafe impl Sync for NoSend {}
+
+let x = Some(NoSend(null()));
+
+x.par_iter()
+    .map(|&x| x) //~ ERROR
+    .count(); //~ ERROR
+
+``` */
+mod map {}
+
+/** ```compile_fail,E0277
+
+use rayon::prelude::*;
+use std::ptr::null;
+
+#[derive(Copy, Clone)]
+struct NoSend(*const ());
+
+unsafe impl Sync for NoSend {}
+
+let x = Some(NoSend(null()));
+
+x.par_iter()
+    .filter_map(|&x| Some(x)) //~ ERROR
+    .count(); //~ ERROR
+
+``` */
+mod filter_map {}
+
+/** ```compile_fail,E0277
+
+use rayon::prelude::*;
+use std::ptr::null;
+
+#[derive(Copy, Clone)]
+struct NoSend(*const ());
+
+unsafe impl Sync for NoSend {}
+
+let x = Some(NoSend(null()));
+
+x.par_iter()
+    .cloned() //~ ERROR
+    .count(); //~ ERROR
+
+``` */
+mod cloned {}
+
\ No newline at end of file diff --git a/src/rayon/compile_fail/rc_par_iter.rs.html b/src/rayon/compile_fail/rc_par_iter.rs.html new file mode 100644 index 0000000000..2a2e8f7c13 --- /dev/null +++ b/src/rayon/compile_fail/rc_par_iter.rs.html @@ -0,0 +1,33 @@ +rc_par_iter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+
/*! ```compile_fail,E0599
+
+// Check that we can't use the par-iter API to access contents of an
+// `Rc`.
+
+use rayon::prelude::*;
+use std::rc::Rc;
+
+let x = vec![Rc::new(22), Rc::new(23)];
+let mut y = vec![];
+x.into_par_iter() //~ ERROR no method named `into_par_iter`
+    .map(|rc| *rc)
+    .collect_into_vec(&mut y);
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon/delegate.rs.html b/src/rayon/delegate.rs.html new file mode 100644 index 0000000000..f681c2de59 --- /dev/null +++ b/src/rayon/delegate.rs.html @@ -0,0 +1,221 @@ +delegate.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+
//! Macros for delegating newtype iterators to inner types.
+
+// Note: these place `impl` bounds at the end, as token gobbling is the only way
+// I know how to consume an arbitrary list of constraints, with `$($args:tt)*`.
+
+/// Creates a parallel iterator implementation which simply wraps an inner type
+/// and delegates all methods inward.  The actual struct must already be
+/// declared with an `inner` field.
+///
+/// The implementation of `IntoParallelIterator` should be added separately.
+macro_rules! delegate_iterator {
+    ($iter:ty => $item:ty ,
+     impl $( $args:tt )*
+     ) => {
+        impl $( $args )* ParallelIterator for $iter {
+            type Item = $item;
+
+            fn drive_unindexed<C>(self, consumer: C) -> C::Result
+                where C: UnindexedConsumer<Self::Item>
+            {
+                self.inner.drive_unindexed(consumer)
+            }
+
+            fn opt_len(&self) -> Option<usize> {
+                self.inner.opt_len()
+            }
+        }
+    }
+}
+
+/// Creates an indexed parallel iterator implementation which simply wraps an
+/// inner type and delegates all methods inward.  The actual struct must already
+/// be declared with an `inner` field.
+macro_rules! delegate_indexed_iterator {
+    ($iter:ty => $item:ty ,
+     impl $( $args:tt )*
+     ) => {
+        delegate_iterator!{
+            $iter => $item ,
+            impl $( $args )*
+        }
+
+        impl $( $args )* IndexedParallelIterator for $iter {
+            fn drive<C>(self, consumer: C) -> C::Result
+                where C: Consumer<Self::Item>
+            {
+                self.inner.drive(consumer)
+            }
+
+            fn len(&self) -> usize {
+                self.inner.len()
+            }
+
+            fn with_producer<CB>(self, callback: CB) -> CB::Output
+                where CB: ProducerCallback<Self::Item>
+            {
+                self.inner.with_producer(callback)
+            }
+        }
+    }
+}
+
+#[test]
+fn unindexed_example() {
+    use crate::collections::btree_map::IntoIter;
+    use crate::iter::plumbing::*;
+    use crate::prelude::*;
+
+    use std::collections::BTreeMap;
+
+    struct MyIntoIter<T: Ord + Send, U: Send> {
+        inner: IntoIter<T, U>,
+    }
+
+    delegate_iterator! {
+        MyIntoIter<T, U> => (T, U),
+        impl<T: Ord + Send, U: Send>
+    }
+
+    let map = BTreeMap::from([(1, 'a'), (2, 'b'), (3, 'c')]);
+    let iter = MyIntoIter {
+        inner: map.into_par_iter(),
+    };
+    let vec: Vec<_> = iter.map(|(k, _)| k).collect();
+    assert_eq!(vec, &[1, 2, 3]);
+}
+
+#[test]
+fn indexed_example() {
+    use crate::iter::plumbing::*;
+    use crate::prelude::*;
+    use crate::vec::IntoIter;
+
+    struct MyIntoIter<T: Send> {
+        inner: IntoIter<T>,
+    }
+
+    delegate_indexed_iterator! {
+        MyIntoIter<T> => T,
+        impl<T: Send>
+    }
+
+    let iter = MyIntoIter {
+        inner: vec![1, 2, 3].into_par_iter(),
+    };
+    let mut vec = vec![];
+    iter.collect_into_vec(&mut vec);
+    assert_eq!(vec, &[1, 2, 3]);
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/blocks.rs.html b/src/rayon/iter/blocks.rs.html new file mode 100644 index 0000000000..8663137b41 --- /dev/null +++ b/src/rayon/iter/blocks.rs.html @@ -0,0 +1,265 @@ +blocks.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+
use super::plumbing::*;
+use super::*;
+
+struct BlocksCallback<S, C> {
+    sizes: S,
+    consumer: C,
+    len: usize,
+}
+
+impl<T, S, C> ProducerCallback<T> for BlocksCallback<S, C>
+where
+    C: UnindexedConsumer<T>,
+    S: Iterator<Item = usize>,
+{
+    type Output = C::Result;
+
+    fn callback<P: Producer<Item = T>>(mut self, mut producer: P) -> Self::Output {
+        let mut remaining_len = self.len;
+        let mut consumer = self.consumer;
+
+        // we need a local variable for the accumulated results
+        // we call the reducer's identity by splitting at 0
+        let (left_consumer, right_consumer, _) = consumer.split_at(0);
+        let mut leftmost_res = left_consumer.into_folder().complete();
+        consumer = right_consumer;
+
+        // now we loop on each block size
+        while remaining_len > 0 && !consumer.full() {
+            // we compute the next block's size
+            let size = self.sizes.next().unwrap_or(std::usize::MAX);
+            let capped_size = remaining_len.min(size);
+            remaining_len -= capped_size;
+
+            // split the producer
+            let (left_producer, right_producer) = producer.split_at(capped_size);
+            producer = right_producer;
+
+            // split the consumer
+            let (left_consumer, right_consumer, _) = consumer.split_at(capped_size);
+            consumer = right_consumer;
+
+            leftmost_res = consumer.to_reducer().reduce(
+                leftmost_res,
+                bridge_producer_consumer(capped_size, left_producer, left_consumer),
+            );
+        }
+        leftmost_res
+    }
+}
+
+/// `ExponentialBlocks` is a parallel iterator that consumes itself as a sequence
+/// of parallel blocks of increasing sizes (exponentially).
+///
+/// This struct is created by the [`by_exponential_blocks()`] method on [`IndexedParallelIterator`]
+///
+/// [`by_exponential_blocks()`]: trait.IndexedParallelIterator.html#method.by_exponential_blocks
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct ExponentialBlocks<I> {
+    base: I,
+}
+
+impl<I> ExponentialBlocks<I> {
+    pub(super) fn new(base: I) -> Self {
+        Self { base }
+    }
+}
+
+impl<I> ParallelIterator for ExponentialBlocks<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let first = crate::current_num_threads();
+        let callback = BlocksCallback {
+            consumer,
+            sizes: std::iter::successors(Some(first), exponential_size),
+            len: self.base.len(),
+        };
+        self.base.with_producer(callback)
+    }
+}
+
+fn exponential_size(size: &usize) -> Option<usize> {
+    Some(size.saturating_mul(2))
+}
+
+/// `UniformBlocks` is a parallel iterator that consumes itself as a sequence
+/// of parallel blocks of constant sizes.
+///
+/// This struct is created by the [`by_uniform_blocks()`] method on [`IndexedParallelIterator`]
+///
+/// [`by_uniform_blocks()`]: trait.IndexedParallelIterator.html#method.by_uniform_blocks
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct UniformBlocks<I> {
+    base: I,
+    block_size: usize,
+}
+
+impl<I> UniformBlocks<I> {
+    pub(super) fn new(base: I, block_size: usize) -> Self {
+        Self { base, block_size }
+    }
+}
+
+impl<I> ParallelIterator for UniformBlocks<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let callback = BlocksCallback {
+            consumer,
+            sizes: std::iter::repeat(self.block_size),
+            len: self.base.len(),
+        };
+        self.base.with_producer(callback)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/chain.rs.html b/src/rayon/iter/chain.rs.html new file mode 100644 index 0000000000..15a5f27e37 --- /dev/null +++ b/src/rayon/iter/chain.rs.html @@ -0,0 +1,537 @@ +chain.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+
use super::plumbing::*;
+use super::*;
+use rayon_core::join;
+use std::iter;
+
+/// `Chain` is an iterator that joins `b` after `a` in one continuous iterator.
+/// This struct is created by the [`chain()`] method on [`ParallelIterator`]
+///
+/// [`chain()`]: trait.ParallelIterator.html#method.chain
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Chain<A, B>
+where
+    A: ParallelIterator,
+    B: ParallelIterator<Item = A::Item>,
+{
+    a: A,
+    b: B,
+}
+
+impl<A, B> Chain<A, B>
+where
+    A: ParallelIterator,
+    B: ParallelIterator<Item = A::Item>,
+{
+    /// Creates a new `Chain` iterator.
+    pub(super) fn new(a: A, b: B) -> Self {
+        Chain { a, b }
+    }
+}
+
+impl<A, B> ParallelIterator for Chain<A, B>
+where
+    A: ParallelIterator,
+    B: ParallelIterator<Item = A::Item>,
+{
+    type Item = A::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let Chain { a, b } = self;
+
+        // If we returned a value from our own `opt_len`, then the collect consumer in particular
+        // will balk at being treated like an actual `UnindexedConsumer`.  But when we do know the
+        // length, we can use `Consumer::split_at` instead, and this is still harmless for other
+        // truly-unindexed consumers too.
+        let (left, right, reducer) = if let Some(len) = a.opt_len() {
+            consumer.split_at(len)
+        } else {
+            let reducer = consumer.to_reducer();
+            (consumer.split_off_left(), consumer, reducer)
+        };
+
+        let (a, b) = join(|| a.drive_unindexed(left), || b.drive_unindexed(right));
+        reducer.reduce(a, b)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.a.opt_len()?.checked_add(self.b.opt_len()?)
+    }
+}
+
+impl<A, B> IndexedParallelIterator for Chain<A, B>
+where
+    A: IndexedParallelIterator,
+    B: IndexedParallelIterator<Item = A::Item>,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let Chain { a, b } = self;
+        let (left, right, reducer) = consumer.split_at(a.len());
+        let (a, b) = join(|| a.drive(left), || b.drive(right));
+        reducer.reduce(a, b)
+    }
+
+    fn len(&self) -> usize {
+        self.a.len().checked_add(self.b.len()).expect("overflow")
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let a_len = self.a.len();
+        return self.a.with_producer(CallbackA {
+            callback,
+            a_len,
+            b: self.b,
+        });
+
+        struct CallbackA<CB, B> {
+            callback: CB,
+            a_len: usize,
+            b: B,
+        }
+
+        impl<CB, B> ProducerCallback<B::Item> for CallbackA<CB, B>
+        where
+            B: IndexedParallelIterator,
+            CB: ProducerCallback<B::Item>,
+        {
+            type Output = CB::Output;
+
+            fn callback<A>(self, a_producer: A) -> Self::Output
+            where
+                A: Producer<Item = B::Item>,
+            {
+                self.b.with_producer(CallbackB {
+                    callback: self.callback,
+                    a_len: self.a_len,
+                    a_producer,
+                })
+            }
+        }
+
+        struct CallbackB<CB, A> {
+            callback: CB,
+            a_len: usize,
+            a_producer: A,
+        }
+
+        impl<CB, A> ProducerCallback<A::Item> for CallbackB<CB, A>
+        where
+            A: Producer,
+            CB: ProducerCallback<A::Item>,
+        {
+            type Output = CB::Output;
+
+            fn callback<B>(self, b_producer: B) -> Self::Output
+            where
+                B: Producer<Item = A::Item>,
+            {
+                let producer = ChainProducer::new(self.a_len, self.a_producer, b_producer);
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct ChainProducer<A, B>
+where
+    A: Producer,
+    B: Producer<Item = A::Item>,
+{
+    a_len: usize,
+    a: A,
+    b: B,
+}
+
+impl<A, B> ChainProducer<A, B>
+where
+    A: Producer,
+    B: Producer<Item = A::Item>,
+{
+    fn new(a_len: usize, a: A, b: B) -> Self {
+        ChainProducer { a_len, a, b }
+    }
+}
+
+impl<A, B> Producer for ChainProducer<A, B>
+where
+    A: Producer,
+    B: Producer<Item = A::Item>,
+{
+    type Item = A::Item;
+    type IntoIter = ChainSeq<A::IntoIter, B::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        ChainSeq::new(self.a.into_iter(), self.b.into_iter())
+    }
+
+    fn min_len(&self) -> usize {
+        Ord::max(self.a.min_len(), self.b.min_len())
+    }
+
+    fn max_len(&self) -> usize {
+        Ord::min(self.a.max_len(), self.b.max_len())
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        if index <= self.a_len {
+            let a_rem = self.a_len - index;
+            let (a_left, a_right) = self.a.split_at(index);
+            let (b_left, b_right) = self.b.split_at(0);
+            (
+                ChainProducer::new(index, a_left, b_left),
+                ChainProducer::new(a_rem, a_right, b_right),
+            )
+        } else {
+            let (a_left, a_right) = self.a.split_at(self.a_len);
+            let (b_left, b_right) = self.b.split_at(index - self.a_len);
+            (
+                ChainProducer::new(self.a_len, a_left, b_left),
+                ChainProducer::new(0, a_right, b_right),
+            )
+        }
+    }
+
+    fn fold_with<F>(self, mut folder: F) -> F
+    where
+        F: Folder<A::Item>,
+    {
+        folder = self.a.fold_with(folder);
+        if folder.full() {
+            folder
+        } else {
+            self.b.fold_with(folder)
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Wrapper for Chain to implement ExactSizeIterator
+
+struct ChainSeq<A, B> {
+    chain: iter::Chain<A, B>,
+}
+
+impl<A, B> ChainSeq<A, B> {
+    fn new(a: A, b: B) -> ChainSeq<A, B>
+    where
+        A: ExactSizeIterator,
+        B: ExactSizeIterator<Item = A::Item>,
+    {
+        ChainSeq { chain: a.chain(b) }
+    }
+}
+
+impl<A, B> Iterator for ChainSeq<A, B>
+where
+    A: Iterator,
+    B: Iterator<Item = A::Item>,
+{
+    type Item = A::Item;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        self.chain.next()
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.chain.size_hint()
+    }
+}
+
+impl<A, B> ExactSizeIterator for ChainSeq<A, B>
+where
+    A: ExactSizeIterator,
+    B: ExactSizeIterator<Item = A::Item>,
+{
+}
+
+impl<A, B> DoubleEndedIterator for ChainSeq<A, B>
+where
+    A: DoubleEndedIterator,
+    B: DoubleEndedIterator<Item = A::Item>,
+{
+    fn next_back(&mut self) -> Option<Self::Item> {
+        self.chain.next_back()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/chunks.rs.html b/src/rayon/iter/chunks.rs.html new file mode 100644 index 0000000000..e93233a34d --- /dev/null +++ b/src/rayon/iter/chunks.rs.html @@ -0,0 +1,451 @@ +chunks.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+
use super::plumbing::*;
+use super::*;
+use crate::math::div_round_up;
+
+/// `Chunks` is an iterator that groups elements of an underlying iterator.
+///
+/// This struct is created by the [`chunks()`] method on [`IndexedParallelIterator`]
+///
+/// [`chunks()`]: trait.IndexedParallelIterator.html#method.chunks
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Chunks<I>
+where
+    I: IndexedParallelIterator,
+{
+    size: usize,
+    i: I,
+}
+
+impl<I> Chunks<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `Chunks` iterator
+    pub(super) fn new(i: I, size: usize) -> Self {
+        Chunks { i, size }
+    }
+}
+
+impl<I> ParallelIterator for Chunks<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = Vec<I::Item>;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Vec<I::Item>>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for Chunks<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        div_round_up(self.i.len(), self.size)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let len = self.i.len();
+        return self.i.with_producer(Callback {
+            size: self.size,
+            len,
+            callback,
+        });
+
+        struct Callback<CB> {
+            size: usize,
+            len: usize,
+            callback: CB,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<Vec<T>>,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = ChunkProducer::new(self.size, self.len, base, Vec::from_iter);
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+pub(super) struct ChunkProducer<P, F> {
+    chunk_size: usize,
+    len: usize,
+    base: P,
+    map: F,
+}
+
+impl<P, F> ChunkProducer<P, F> {
+    pub(super) fn new(chunk_size: usize, len: usize, base: P, map: F) -> Self {
+        Self {
+            chunk_size,
+            len,
+            base,
+            map,
+        }
+    }
+}
+
+impl<P, F, T> Producer for ChunkProducer<P, F>
+where
+    P: Producer,
+    F: Fn(P::IntoIter) -> T + Send + Clone,
+{
+    type Item = T;
+    type IntoIter = std::iter::Map<ChunkSeq<P>, F>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        let chunks = ChunkSeq {
+            chunk_size: self.chunk_size,
+            len: self.len,
+            inner: if self.len > 0 { Some(self.base) } else { None },
+        };
+        chunks.map(self.map)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = Ord::min(index * self.chunk_size, self.len);
+        let (left, right) = self.base.split_at(elem_index);
+        (
+            ChunkProducer {
+                chunk_size: self.chunk_size,
+                len: elem_index,
+                base: left,
+                map: self.map.clone(),
+            },
+            ChunkProducer {
+                chunk_size: self.chunk_size,
+                len: self.len - elem_index,
+                base: right,
+                map: self.map,
+            },
+        )
+    }
+
+    fn min_len(&self) -> usize {
+        div_round_up(self.base.min_len(), self.chunk_size)
+    }
+
+    fn max_len(&self) -> usize {
+        self.base.max_len() / self.chunk_size
+    }
+}
+
+pub(super) struct ChunkSeq<P> {
+    chunk_size: usize,
+    len: usize,
+    inner: Option<P>,
+}
+
+impl<P> Iterator for ChunkSeq<P>
+where
+    P: Producer,
+{
+    type Item = P::IntoIter;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        let producer = self.inner.take()?;
+        if self.len > self.chunk_size {
+            let (left, right) = producer.split_at(self.chunk_size);
+            self.inner = Some(right);
+            self.len -= self.chunk_size;
+            Some(left.into_iter())
+        } else {
+            debug_assert!(self.len > 0);
+            self.len = 0;
+            Some(producer.into_iter())
+        }
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        let len = self.len();
+        (len, Some(len))
+    }
+}
+
+impl<P> ExactSizeIterator for ChunkSeq<P>
+where
+    P: Producer,
+{
+    #[inline]
+    fn len(&self) -> usize {
+        div_round_up(self.len, self.chunk_size)
+    }
+}
+
+impl<P> DoubleEndedIterator for ChunkSeq<P>
+where
+    P: Producer,
+{
+    fn next_back(&mut self) -> Option<Self::Item> {
+        let producer = self.inner.take()?;
+        if self.len > self.chunk_size {
+            let mut size = self.len % self.chunk_size;
+            if size == 0 {
+                size = self.chunk_size;
+            }
+            let (left, right) = producer.split_at(self.len - size);
+            self.inner = Some(left);
+            self.len -= size;
+            Some(right.into_iter())
+        } else {
+            debug_assert!(self.len > 0);
+            self.len = 0;
+            Some(producer.into_iter())
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/cloned.rs.html b/src/rayon/iter/cloned.rs.html new file mode 100644 index 0000000000..a949be9ad8 --- /dev/null +++ b/src/rayon/iter/cloned.rs.html @@ -0,0 +1,449 @@ +cloned.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+
use super::plumbing::*;
+use super::*;
+
+use std::iter;
+
+/// `Cloned` is an iterator that clones the elements of an underlying iterator.
+///
+/// This struct is created by the [`cloned()`] method on [`ParallelIterator`]
+///
+/// [`cloned()`]: trait.ParallelIterator.html#method.cloned
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Cloned<I: ParallelIterator> {
+    base: I,
+}
+
+impl<I> Cloned<I>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `Cloned` iterator.
+    pub(super) fn new(base: I) -> Self {
+        Cloned { base }
+    }
+}
+
+impl<'a, T, I> ParallelIterator for Cloned<I>
+where
+    I: ParallelIterator<Item = &'a T>,
+    T: 'a + Clone + Send + Sync,
+{
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = ClonedConsumer::new(consumer);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<'a, T, I> IndexedParallelIterator for Cloned<I>
+where
+    I: IndexedParallelIterator<Item = &'a T>,
+    T: 'a + Clone + Send + Sync,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = ClonedConsumer::new(consumer);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback { callback });
+
+        struct Callback<CB> {
+            callback: CB,
+        }
+
+        impl<'a, T, CB> ProducerCallback<&'a T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+            T: 'a + Clone + Send,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = &'a T>,
+            {
+                let producer = ClonedProducer { base };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct ClonedProducer<P> {
+    base: P,
+}
+
+impl<'a, T, P> Producer for ClonedProducer<P>
+where
+    P: Producer<Item = &'a T>,
+    T: 'a + Clone,
+{
+    type Item = T;
+    type IntoIter = iter::Cloned<P::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter().cloned()
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            ClonedProducer { base: left },
+            ClonedProducer { base: right },
+        )
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.base.fold_with(ClonedFolder { base: folder }).base
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct ClonedConsumer<C> {
+    base: C,
+}
+
+impl<C> ClonedConsumer<C> {
+    fn new(base: C) -> Self {
+        ClonedConsumer { base }
+    }
+}
+
+impl<'a, T, C> Consumer<&'a T> for ClonedConsumer<C>
+where
+    C: Consumer<T>,
+    T: 'a + Clone,
+{
+    type Folder = ClonedFolder<C::Folder>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            ClonedConsumer::new(left),
+            ClonedConsumer::new(right),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        ClonedFolder {
+            base: self.base.into_folder(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'a, T, C> UnindexedConsumer<&'a T> for ClonedConsumer<C>
+where
+    C: UnindexedConsumer<T>,
+    T: 'a + Clone,
+{
+    fn split_off_left(&self) -> Self {
+        ClonedConsumer::new(self.base.split_off_left())
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct ClonedFolder<F> {
+    base: F,
+}
+
+impl<'a, T, F> Folder<&'a T> for ClonedFolder<F>
+where
+    F: Folder<T>,
+    T: 'a + Clone,
+{
+    type Result = F::Result;
+
+    fn consume(self, item: &'a T) -> Self {
+        ClonedFolder {
+            base: self.base.consume(item.clone()),
+        }
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = &'a T>,
+    {
+        self.base = self.base.consume_iter(iter.into_iter().cloned());
+        self
+    }
+
+    fn complete(self) -> F::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/collect/consumer.rs.html b/src/rayon/iter/collect/consumer.rs.html new file mode 100644 index 0000000000..98d9a1119f --- /dev/null +++ b/src/rayon/iter/collect/consumer.rs.html @@ -0,0 +1,375 @@ +consumer.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+
use super::super::plumbing::*;
+use crate::SendPtr;
+use std::marker::PhantomData;
+use std::ptr;
+use std::slice;
+
+pub(super) struct CollectConsumer<'c, T: Send> {
+    /// See `CollectResult` for explanation of why this is not a slice
+    start: SendPtr<T>,
+    len: usize,
+    marker: PhantomData<&'c mut T>,
+}
+
+impl<T: Send> CollectConsumer<'_, T> {
+    /// Create a collector for `len` items in the unused capacity of the vector.
+    pub(super) fn appender(vec: &mut Vec<T>, len: usize) -> CollectConsumer<'_, T> {
+        let start = vec.len();
+        assert!(vec.capacity() - start >= len);
+
+        // SAFETY: We already made sure to have the additional space allocated.
+        // The pointer is derived from `Vec` directly, not through a `Deref`,
+        // so it has provenance over the whole allocation.
+        unsafe { CollectConsumer::new(vec.as_mut_ptr().add(start), len) }
+    }
+}
+
+impl<'c, T: Send + 'c> CollectConsumer<'c, T> {
+    /// The target memory is considered uninitialized, and will be
+    /// overwritten without reading or dropping existing values.
+    unsafe fn new(start: *mut T, len: usize) -> Self {
+        CollectConsumer {
+            start: SendPtr(start),
+            len,
+            marker: PhantomData,
+        }
+    }
+}
+
+/// CollectResult represents an initialized part of the target slice.
+///
+/// This is a proxy owner of the elements in the slice; when it drops,
+/// the elements will be dropped, unless its ownership is released before then.
+#[must_use]
+pub(super) struct CollectResult<'c, T> {
+    /// This pointer and length has the same representation as a slice,
+    /// but retains the provenance of the entire array so that we can merge
+    /// these regions together in `CollectReducer`.
+    start: SendPtr<T>,
+    total_len: usize,
+    /// The current initialized length after `start`
+    initialized_len: usize,
+    /// Lifetime invariance guarantees that the data flows from consumer to result,
+    /// especially for the `scope_fn` callback in `Collect::with_consumer`.
+    invariant_lifetime: PhantomData<&'c mut &'c mut [T]>,
+}
+
+unsafe impl<'c, T> Send for CollectResult<'c, T> where T: Send {}
+
+impl<'c, T> CollectResult<'c, T> {
+    /// The current length of the collect result
+    pub(super) fn len(&self) -> usize {
+        self.initialized_len
+    }
+
+    /// Release ownership of the slice of elements, and return the length
+    pub(super) fn release_ownership(mut self) -> usize {
+        let ret = self.initialized_len;
+        self.initialized_len = 0;
+        ret
+    }
+}
+
+impl<'c, T> Drop for CollectResult<'c, T> {
+    fn drop(&mut self) {
+        // Drop the first `self.initialized_len` elements, which have been recorded
+        // to be initialized by the folder.
+        unsafe {
+            ptr::drop_in_place(slice::from_raw_parts_mut(
+                self.start.0,
+                self.initialized_len,
+            ));
+        }
+    }
+}
+
+impl<'c, T: Send + 'c> Consumer<T> for CollectConsumer<'c, T> {
+    type Folder = CollectResult<'c, T>;
+    type Reducer = CollectReducer;
+    type Result = CollectResult<'c, T>;
+
+    fn split_at(self, index: usize) -> (Self, Self, CollectReducer) {
+        let CollectConsumer { start, len, .. } = self;
+
+        // Produce new consumers.
+        // SAFETY: This assert checks that `index` is a valid offset for `start`
+        unsafe {
+            assert!(index <= len);
+            (
+                CollectConsumer::new(start.0, index),
+                CollectConsumer::new(start.0.add(index), len - index),
+                CollectReducer,
+            )
+        }
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        // Create a result/folder that consumes values and writes them
+        // into the region after start. The initial result has length 0.
+        CollectResult {
+            start: self.start,
+            total_len: self.len,
+            initialized_len: 0,
+            invariant_lifetime: PhantomData,
+        }
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<'c, T: Send + 'c> Folder<T> for CollectResult<'c, T> {
+    type Result = Self;
+
+    fn consume(mut self, item: T) -> Self {
+        assert!(
+            self.initialized_len < self.total_len,
+            "too many values pushed to consumer"
+        );
+
+        // SAFETY: The assert above is a bounds check for this write, and we
+        // avoid assignment here so we do not drop an uninitialized T.
+        unsafe {
+            // Write item and increase the initialized length
+            self.start.0.add(self.initialized_len).write(item);
+            self.initialized_len += 1;
+        }
+
+        self
+    }
+
+    fn complete(self) -> Self::Result {
+        // NB: We don't explicitly check that the local writes were complete,
+        // but Collect will assert the total result length in the end.
+        self
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+/// Pretend to be unindexed for `special_collect_into_vec`,
+/// but we should never actually get used that way...
+impl<'c, T: Send + 'c> UnindexedConsumer<T> for CollectConsumer<'c, T> {
+    fn split_off_left(&self) -> Self {
+        unreachable!("CollectConsumer must be indexed!")
+    }
+    fn to_reducer(&self) -> Self::Reducer {
+        CollectReducer
+    }
+}
+
+/// CollectReducer combines adjacent chunks; the result must always
+/// be contiguous so that it is one combined slice.
+pub(super) struct CollectReducer;
+
+impl<'c, T> Reducer<CollectResult<'c, T>> for CollectReducer {
+    fn reduce(
+        self,
+        mut left: CollectResult<'c, T>,
+        right: CollectResult<'c, T>,
+    ) -> CollectResult<'c, T> {
+        // Merge if the CollectResults are adjacent and in left to right order
+        // else: drop the right piece now and total length will end up short in the end,
+        // when the correctness of the collected result is asserted.
+        unsafe {
+            let left_end = left.start.0.add(left.initialized_len);
+            if left_end == right.start.0 {
+                left.total_len += right.total_len;
+                left.initialized_len += right.release_ownership();
+            }
+            left
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/collect/mod.rs.html b/src/rayon/iter/collect/mod.rs.html new file mode 100644 index 0000000000..c3d2b0046a --- /dev/null +++ b/src/rayon/iter/collect/mod.rs.html @@ -0,0 +1,235 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+
use super::{IndexedParallelIterator, ParallelIterator};
+
+mod consumer;
+use self::consumer::CollectConsumer;
+use self::consumer::CollectResult;
+use super::unzip::unzip_indexed;
+
+mod test;
+
+/// Collects the results of the exact iterator into the specified vector.
+///
+/// This is called by `IndexedParallelIterator::collect_into_vec`.
+pub(super) fn collect_into_vec<I, T>(pi: I, v: &mut Vec<T>)
+where
+    I: IndexedParallelIterator<Item = T>,
+    T: Send,
+{
+    v.truncate(0); // clear any old data
+    let len = pi.len();
+    collect_with_consumer(v, len, |consumer| pi.drive(consumer));
+}
+
+/// Collects the results of the iterator into the specified vector.
+///
+/// Technically, this only works for `IndexedParallelIterator`, but we're faking a
+/// bit of specialization here until Rust can do that natively.  Callers are
+/// using `opt_len` to find the length before calling this, and only exact
+/// iterators will return anything but `None` there.
+///
+/// Since the type system doesn't understand that contract, we have to allow
+/// *any* `ParallelIterator` here, and `CollectConsumer` has to also implement
+/// `UnindexedConsumer`.  That implementation panics `unreachable!` in case
+/// there's a bug where we actually do try to use this unindexed.
+pub(super) fn special_extend<I, T>(pi: I, len: usize, v: &mut Vec<T>)
+where
+    I: ParallelIterator<Item = T>,
+    T: Send,
+{
+    collect_with_consumer(v, len, |consumer| pi.drive_unindexed(consumer));
+}
+
+/// Unzips the results of the exact iterator into the specified vectors.
+///
+/// This is called by `IndexedParallelIterator::unzip_into_vecs`.
+pub(super) fn unzip_into_vecs<I, A, B>(pi: I, left: &mut Vec<A>, right: &mut Vec<B>)
+where
+    I: IndexedParallelIterator<Item = (A, B)>,
+    A: Send,
+    B: Send,
+{
+    // clear any old data
+    left.truncate(0);
+    right.truncate(0);
+
+    let len = pi.len();
+    collect_with_consumer(right, len, |right_consumer| {
+        let mut right_result = None;
+        collect_with_consumer(left, len, |left_consumer| {
+            let (left_r, right_r) = unzip_indexed(pi, left_consumer, right_consumer);
+            right_result = Some(right_r);
+            left_r
+        });
+        right_result.unwrap()
+    });
+}
+
+/// Create a consumer on the slice of memory we are collecting into.
+///
+/// The consumer needs to be used inside the scope function, and the
+/// complete collect result passed back.
+///
+/// This method will verify the collect result, and panic if the slice
+/// was not fully written into. Otherwise, in the successful case,
+/// the vector is complete with the collected result.
+fn collect_with_consumer<T, F>(vec: &mut Vec<T>, len: usize, scope_fn: F)
+where
+    T: Send,
+    F: FnOnce(CollectConsumer<'_, T>) -> CollectResult<'_, T>,
+{
+    // Reserve space for `len` more elements in the vector,
+    vec.reserve(len);
+
+    // Create the consumer and run the callback for collection.
+    let result = scope_fn(CollectConsumer::appender(vec, len));
+
+    // The `CollectResult` represents a contiguous part of the slice, that has
+    // been written to. On unwind here, the `CollectResult` will be dropped. If
+    // some producers on the way did not produce enough elements, partial
+    // `CollectResult`s may have been dropped without being reduced to the final
+    // result, and we will see that as the length coming up short.
+    //
+    // Here, we assert that added length is fully initialized. This is checked
+    // by the following assert, which verifies if a complete `CollectResult`
+    // was produced; if the length is correct, it is necessarily covering the
+    // target slice. Since we know that the consumer cannot have escaped from
+    // `drive` (by parametricity, essentially), we know that any stores that
+    // will happen, have happened. Unless some code is buggy, that means we
+    // should have seen `len` total writes.
+    let actual_writes = result.len();
+    assert!(
+        actual_writes == len,
+        "expected {} total writes, but got {}",
+        len,
+        actual_writes
+    );
+
+    // Release the result's mutable borrow and "proxy ownership"
+    // of the elements, before the vector takes it over.
+    result.release_ownership();
+
+    let new_len = vec.len() + len;
+
+    unsafe {
+        vec.set_len(new_len);
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/copied.rs.html b/src/rayon/iter/copied.rs.html new file mode 100644 index 0000000000..d5859d3d46 --- /dev/null +++ b/src/rayon/iter/copied.rs.html @@ -0,0 +1,449 @@ +copied.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+
use super::plumbing::*;
+use super::*;
+
+use std::iter;
+
+/// `Copied` is an iterator that copies the elements of an underlying iterator.
+///
+/// This struct is created by the [`copied()`] method on [`ParallelIterator`]
+///
+/// [`copied()`]: trait.ParallelIterator.html#method.copied
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Copied<I: ParallelIterator> {
+    base: I,
+}
+
+impl<I> Copied<I>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `Copied` iterator.
+    pub(super) fn new(base: I) -> Self {
+        Copied { base }
+    }
+}
+
+impl<'a, T, I> ParallelIterator for Copied<I>
+where
+    I: ParallelIterator<Item = &'a T>,
+    T: 'a + Copy + Send + Sync,
+{
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = CopiedConsumer::new(consumer);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<'a, T, I> IndexedParallelIterator for Copied<I>
+where
+    I: IndexedParallelIterator<Item = &'a T>,
+    T: 'a + Copy + Send + Sync,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = CopiedConsumer::new(consumer);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback { callback });
+
+        struct Callback<CB> {
+            callback: CB,
+        }
+
+        impl<'a, T, CB> ProducerCallback<&'a T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+            T: 'a + Copy + Send,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = &'a T>,
+            {
+                let producer = CopiedProducer { base };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct CopiedProducer<P> {
+    base: P,
+}
+
+impl<'a, T, P> Producer for CopiedProducer<P>
+where
+    P: Producer<Item = &'a T>,
+    T: 'a + Copy,
+{
+    type Item = T;
+    type IntoIter = iter::Copied<P::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter().copied()
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            CopiedProducer { base: left },
+            CopiedProducer { base: right },
+        )
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.base.fold_with(CopiedFolder { base: folder }).base
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct CopiedConsumer<C> {
+    base: C,
+}
+
+impl<C> CopiedConsumer<C> {
+    fn new(base: C) -> Self {
+        CopiedConsumer { base }
+    }
+}
+
+impl<'a, T, C> Consumer<&'a T> for CopiedConsumer<C>
+where
+    C: Consumer<T>,
+    T: 'a + Copy,
+{
+    type Folder = CopiedFolder<C::Folder>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            CopiedConsumer::new(left),
+            CopiedConsumer::new(right),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        CopiedFolder {
+            base: self.base.into_folder(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'a, T, C> UnindexedConsumer<&'a T> for CopiedConsumer<C>
+where
+    C: UnindexedConsumer<T>,
+    T: 'a + Copy,
+{
+    fn split_off_left(&self) -> Self {
+        CopiedConsumer::new(self.base.split_off_left())
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct CopiedFolder<F> {
+    base: F,
+}
+
+impl<'a, T, F> Folder<&'a T> for CopiedFolder<F>
+where
+    F: Folder<T>,
+    T: 'a + Copy,
+{
+    type Result = F::Result;
+
+    fn consume(self, &item: &'a T) -> Self {
+        CopiedFolder {
+            base: self.base.consume(item),
+        }
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = &'a T>,
+    {
+        self.base = self.base.consume_iter(iter.into_iter().copied());
+        self
+    }
+
+    fn complete(self) -> F::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/empty.rs.html b/src/rayon/iter/empty.rs.html new file mode 100644 index 0000000000..5c7a7b27db --- /dev/null +++ b/src/rayon/iter/empty.rs.html @@ -0,0 +1,211 @@ +empty.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+
use crate::iter::plumbing::*;
+use crate::iter::*;
+
+use std::fmt;
+use std::marker::PhantomData;
+
+/// Creates a parallel iterator that produces nothing.
+///
+/// This admits no parallelism on its own, but it could be used for code that
+/// deals with generic parallel iterators.
+///
+/// # Examples
+///
+/// ```
+/// use rayon::prelude::*;
+/// use rayon::iter::empty;
+///
+/// let pi = (0..1234).into_par_iter()
+///     .chain(empty())
+///     .chain(1234..10_000);
+///
+/// assert_eq!(pi.count(), 10_000);
+/// ```
+pub fn empty<T: Send>() -> Empty<T> {
+    Empty {
+        marker: PhantomData,
+    }
+}
+
+/// Iterator adaptor for [the `empty()` function](fn.empty.html).
+pub struct Empty<T: Send> {
+    marker: PhantomData<T>,
+}
+
+impl<T: Send> Clone for Empty<T> {
+    fn clone(&self) -> Self {
+        empty()
+    }
+}
+
+impl<T: Send> fmt::Debug for Empty<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.pad("Empty")
+    }
+}
+
+impl<T: Send> ParallelIterator for Empty<T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.drive(consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(0)
+    }
+}
+
+impl<T: Send> IndexedParallelIterator for Empty<T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        consumer.into_folder().complete()
+    }
+
+    fn len(&self) -> usize {
+        0
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(EmptyProducer(PhantomData))
+    }
+}
+
+/// Private empty producer
+struct EmptyProducer<T: Send>(PhantomData<T>);
+
+impl<T: Send> Producer for EmptyProducer<T> {
+    type Item = T;
+    type IntoIter = std::iter::Empty<T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        std::iter::empty()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        debug_assert_eq!(index, 0);
+        (self, EmptyProducer(PhantomData))
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        folder
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/enumerate.rs.html b/src/rayon/iter/enumerate.rs.html new file mode 100644 index 0000000000..a0f1728202 --- /dev/null +++ b/src/rayon/iter/enumerate.rs.html @@ -0,0 +1,269 @@ +enumerate.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+
use super::plumbing::*;
+use super::*;
+use std::iter;
+use std::ops::Range;
+use std::usize;
+
+/// `Enumerate` is an iterator that returns the current count along with the element.
+/// This struct is created by the [`enumerate()`] method on [`IndexedParallelIterator`]
+///
+/// [`enumerate()`]: trait.IndexedParallelIterator.html#method.enumerate
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Enumerate<I: IndexedParallelIterator> {
+    base: I,
+}
+
+impl<I> Enumerate<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `Enumerate` iterator.
+    pub(super) fn new(base: I) -> Self {
+        Enumerate { base }
+    }
+}
+
+impl<I> ParallelIterator for Enumerate<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = (usize, I::Item);
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for Enumerate<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback { callback });
+
+        struct Callback<CB> {
+            callback: CB,
+        }
+
+        impl<I, CB> ProducerCallback<I> for Callback<CB>
+        where
+            CB: ProducerCallback<(usize, I)>,
+        {
+            type Output = CB::Output;
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = I>,
+            {
+                let producer = EnumerateProducer { base, offset: 0 };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Producer implementation
+
+struct EnumerateProducer<P> {
+    base: P,
+    offset: usize,
+}
+
+impl<P> Producer for EnumerateProducer<P>
+where
+    P: Producer,
+{
+    type Item = (usize, P::Item);
+    type IntoIter = iter::Zip<Range<usize>, P::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        // Enumerate only works for IndexedParallelIterators. Since those
+        // have a max length of usize::MAX, their max index is
+        // usize::MAX - 1, so the range 0..usize::MAX includes all
+        // possible indices.
+        //
+        // However, we should to use a precise end to the range, otherwise
+        // reversing the iterator may have to walk back a long ways before
+        // `Zip::next_back` can produce anything.
+        let base = self.base.into_iter();
+        let end = self.offset + base.len();
+        (self.offset..end).zip(base)
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            EnumerateProducer {
+                base: left,
+                offset: self.offset,
+            },
+            EnumerateProducer {
+                base: right,
+                offset: self.offset + index,
+            },
+        )
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/extend.rs.html b/src/rayon/iter/extend.rs.html new file mode 100644 index 0000000000..7b617b1d53 --- /dev/null +++ b/src/rayon/iter/extend.rs.html @@ -0,0 +1,1241 @@ +extend.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+
use super::noop::NoopConsumer;
+use super::plumbing::{Consumer, Folder, Reducer, UnindexedConsumer};
+use super::{IntoParallelIterator, ParallelExtend, ParallelIterator};
+
+use either::Either;
+use std::borrow::Cow;
+use std::collections::LinkedList;
+use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
+use std::collections::{BinaryHeap, VecDeque};
+use std::ffi::{OsStr, OsString};
+use std::hash::{BuildHasher, Hash};
+
+/// Performs a generic `par_extend` by collecting to a `LinkedList<Vec<_>>` in
+/// parallel, then extending the collection sequentially.
+macro_rules! extend {
+    ($self:ident, $par_iter:ident) => {
+        extend!($self <- fast_collect($par_iter))
+    };
+    ($self:ident <- $vecs:expr) => {
+        match $vecs {
+            Either::Left(vec) => $self.extend(vec),
+            Either::Right(list) => {
+                for vec in list {
+                    $self.extend(vec);
+                }
+            }
+        }
+    };
+}
+macro_rules! extend_reserved {
+    ($self:ident, $par_iter:ident, $len:ident) => {
+        let vecs = fast_collect($par_iter);
+        $self.reserve($len(&vecs));
+        extend!($self <- vecs)
+    };
+    ($self:ident, $par_iter:ident) => {
+        extend_reserved!($self, $par_iter, len)
+    };
+}
+
+/// Computes the total length of a `fast_collect` result.
+fn len<T>(vecs: &Either<Vec<T>, LinkedList<Vec<T>>>) -> usize {
+    match vecs {
+        Either::Left(vec) => vec.len(),
+        Either::Right(list) => list.iter().map(Vec::len).sum(),
+    }
+}
+
+/// Computes the total string length of a `fast_collect` result.
+fn string_len<T: AsRef<str>>(vecs: &Either<Vec<T>, LinkedList<Vec<T>>>) -> usize {
+    let strs = match vecs {
+        Either::Left(vec) => Either::Left(vec.iter()),
+        Either::Right(list) => Either::Right(list.iter().flatten()),
+    };
+    strs.map(AsRef::as_ref).map(str::len).sum()
+}
+
+/// Computes the total OS-string length of a `fast_collect` result.
+fn osstring_len<T: AsRef<OsStr>>(vecs: &Either<Vec<T>, LinkedList<Vec<T>>>) -> usize {
+    let osstrs = match vecs {
+        Either::Left(vec) => Either::Left(vec.iter()),
+        Either::Right(list) => Either::Right(list.iter().flatten()),
+    };
+    osstrs.map(AsRef::as_ref).map(OsStr::len).sum()
+}
+
+pub(super) fn fast_collect<I, T>(pi: I) -> Either<Vec<T>, LinkedList<Vec<T>>>
+where
+    I: IntoParallelIterator<Item = T>,
+    T: Send,
+{
+    let par_iter = pi.into_par_iter();
+    match par_iter.opt_len() {
+        Some(len) => {
+            // Pseudo-specialization. See impl of ParallelExtend for Vec for more details.
+            let mut vec = Vec::new();
+            super::collect::special_extend(par_iter, len, &mut vec);
+            Either::Left(vec)
+        }
+        None => Either::Right(par_iter.drive_unindexed(ListVecConsumer)),
+    }
+}
+
+struct ListVecConsumer;
+
+struct ListVecFolder<T> {
+    vec: Vec<T>,
+}
+
+impl<T: Send> Consumer<T> for ListVecConsumer {
+    type Folder = ListVecFolder<T>;
+    type Reducer = ListReducer;
+    type Result = LinkedList<Vec<T>>;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) {
+        (Self, Self, ListReducer)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        ListVecFolder { vec: Vec::new() }
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<T: Send> UnindexedConsumer<T> for ListVecConsumer {
+    fn split_off_left(&self) -> Self {
+        Self
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        ListReducer
+    }
+}
+
+impl<T> Folder<T> for ListVecFolder<T> {
+    type Result = LinkedList<Vec<T>>;
+
+    fn consume(mut self, item: T) -> Self {
+        self.vec.push(item);
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.vec.extend(iter);
+        self
+    }
+
+    fn complete(self) -> Self::Result {
+        let mut list = LinkedList::new();
+        if !self.vec.is_empty() {
+            list.push_back(self.vec);
+        }
+        list
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+/// Extends a binary heap with items from a parallel iterator.
+impl<T> ParallelExtend<T> for BinaryHeap<T>
+where
+    T: Ord + Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a binary heap with copied items from a parallel iterator.
+impl<'a, T> ParallelExtend<&'a T> for BinaryHeap<T>
+where
+    T: 'a + Copy + Ord + Send + Sync,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a T>,
+    {
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a B-tree map with items from a parallel iterator.
+impl<K, V> ParallelExtend<(K, V)> for BTreeMap<K, V>
+where
+    K: Ord + Send,
+    V: Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = (K, V)>,
+    {
+        extend!(self, par_iter);
+    }
+}
+
+/// Extends a B-tree map with copied items from a parallel iterator.
+impl<'a, K: 'a, V: 'a> ParallelExtend<(&'a K, &'a V)> for BTreeMap<K, V>
+where
+    K: Copy + Ord + Send + Sync,
+    V: Copy + Send + Sync,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = (&'a K, &'a V)>,
+    {
+        extend!(self, par_iter);
+    }
+}
+
+/// Extends a B-tree set with items from a parallel iterator.
+impl<T> ParallelExtend<T> for BTreeSet<T>
+where
+    T: Ord + Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        extend!(self, par_iter);
+    }
+}
+
+/// Extends a B-tree set with copied items from a parallel iterator.
+impl<'a, T> ParallelExtend<&'a T> for BTreeSet<T>
+where
+    T: 'a + Copy + Ord + Send + Sync,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a T>,
+    {
+        extend!(self, par_iter);
+    }
+}
+
+/// Extends a hash map with items from a parallel iterator.
+impl<K, V, S> ParallelExtend<(K, V)> for HashMap<K, V, S>
+where
+    K: Eq + Hash + Send,
+    V: Send,
+    S: BuildHasher + Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = (K, V)>,
+    {
+        // See the map_collect benchmarks in rayon-demo for different strategies.
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a hash map with copied items from a parallel iterator.
+impl<'a, K: 'a, V: 'a, S> ParallelExtend<(&'a K, &'a V)> for HashMap<K, V, S>
+where
+    K: Copy + Eq + Hash + Send + Sync,
+    V: Copy + Send + Sync,
+    S: BuildHasher + Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = (&'a K, &'a V)>,
+    {
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a hash set with items from a parallel iterator.
+impl<T, S> ParallelExtend<T> for HashSet<T, S>
+where
+    T: Eq + Hash + Send,
+    S: BuildHasher + Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a hash set with copied items from a parallel iterator.
+impl<'a, T, S> ParallelExtend<&'a T> for HashSet<T, S>
+where
+    T: 'a + Copy + Eq + Hash + Send + Sync,
+    S: BuildHasher + Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a T>,
+    {
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a linked list with items from a parallel iterator.
+impl<T> ParallelExtend<T> for LinkedList<T>
+where
+    T: Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        let mut list = par_iter.into_par_iter().drive_unindexed(ListConsumer);
+        self.append(&mut list);
+    }
+}
+
+/// Extends a linked list with copied items from a parallel iterator.
+impl<'a, T> ParallelExtend<&'a T> for LinkedList<T>
+where
+    T: 'a + Copy + Send + Sync,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a T>,
+    {
+        self.par_extend(par_iter.into_par_iter().copied())
+    }
+}
+
+struct ListConsumer;
+
+struct ListFolder<T> {
+    list: LinkedList<T>,
+}
+
+struct ListReducer;
+
+impl<T: Send> Consumer<T> for ListConsumer {
+    type Folder = ListFolder<T>;
+    type Reducer = ListReducer;
+    type Result = LinkedList<T>;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) {
+        (Self, Self, ListReducer)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        ListFolder {
+            list: LinkedList::new(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<T: Send> UnindexedConsumer<T> for ListConsumer {
+    fn split_off_left(&self) -> Self {
+        Self
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        ListReducer
+    }
+}
+
+impl<T> Folder<T> for ListFolder<T> {
+    type Result = LinkedList<T>;
+
+    fn consume(mut self, item: T) -> Self {
+        self.list.push_back(item);
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.list.extend(iter);
+        self
+    }
+
+    fn complete(self) -> Self::Result {
+        self.list
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<T> Reducer<LinkedList<T>> for ListReducer {
+    fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> {
+        left.append(&mut right);
+        left
+    }
+}
+
+/// Extends an OS-string with string slices from a parallel iterator.
+impl<'a> ParallelExtend<&'a OsStr> for OsString {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a OsStr>,
+    {
+        extend_reserved!(self, par_iter, osstring_len);
+    }
+}
+
+/// Extends an OS-string with strings from a parallel iterator.
+impl ParallelExtend<OsString> for OsString {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = OsString>,
+    {
+        extend_reserved!(self, par_iter, osstring_len);
+    }
+}
+
+/// Extends an OS-string with string slices from a parallel iterator.
+impl<'a> ParallelExtend<Cow<'a, OsStr>> for OsString {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = Cow<'a, OsStr>>,
+    {
+        extend_reserved!(self, par_iter, osstring_len);
+    }
+}
+
+/// Extends a string with characters from a parallel iterator.
+impl ParallelExtend<char> for String {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = char>,
+    {
+        // This is like `extend`, but `Vec<char>` is less efficient to deal
+        // with than `String`, so instead collect to `LinkedList<String>`.
+        let list = par_iter.into_par_iter().drive_unindexed(ListStringConsumer);
+        self.reserve(list.iter().map(String::len).sum());
+        self.extend(list);
+    }
+}
+
+/// Extends a string with copied characters from a parallel iterator.
+impl<'a> ParallelExtend<&'a char> for String {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a char>,
+    {
+        self.par_extend(par_iter.into_par_iter().copied())
+    }
+}
+
+struct ListStringConsumer;
+
+struct ListStringFolder {
+    string: String,
+}
+
+impl Consumer<char> for ListStringConsumer {
+    type Folder = ListStringFolder;
+    type Reducer = ListReducer;
+    type Result = LinkedList<String>;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) {
+        (Self, Self, ListReducer)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        ListStringFolder {
+            string: String::new(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl UnindexedConsumer<char> for ListStringConsumer {
+    fn split_off_left(&self) -> Self {
+        Self
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        ListReducer
+    }
+}
+
+impl Folder<char> for ListStringFolder {
+    type Result = LinkedList<String>;
+
+    fn consume(mut self, item: char) -> Self {
+        self.string.push(item);
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = char>,
+    {
+        self.string.extend(iter);
+        self
+    }
+
+    fn complete(self) -> Self::Result {
+        let mut list = LinkedList::new();
+        if !self.string.is_empty() {
+            list.push_back(self.string);
+        }
+        list
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+/// Extends a string with string slices from a parallel iterator.
+impl<'a> ParallelExtend<&'a str> for String {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a str>,
+    {
+        extend_reserved!(self, par_iter, string_len);
+    }
+}
+
+/// Extends a string with strings from a parallel iterator.
+impl ParallelExtend<String> for String {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = String>,
+    {
+        extend_reserved!(self, par_iter, string_len);
+    }
+}
+
+/// Extends a string with boxed strings from a parallel iterator.
+impl ParallelExtend<Box<str>> for String {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = Box<str>>,
+    {
+        extend_reserved!(self, par_iter, string_len);
+    }
+}
+
+/// Extends a string with string slices from a parallel iterator.
+impl<'a> ParallelExtend<Cow<'a, str>> for String {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = Cow<'a, str>>,
+    {
+        extend_reserved!(self, par_iter, string_len);
+    }
+}
+
+/// Extends a deque with items from a parallel iterator.
+impl<T> ParallelExtend<T> for VecDeque<T>
+where
+    T: Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a deque with copied items from a parallel iterator.
+impl<'a, T> ParallelExtend<&'a T> for VecDeque<T>
+where
+    T: 'a + Copy + Send + Sync,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a T>,
+    {
+        extend_reserved!(self, par_iter);
+    }
+}
+
+/// Extends a vector with items from a parallel iterator.
+impl<T> ParallelExtend<T> for Vec<T>
+where
+    T: Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        // See the vec_collect benchmarks in rayon-demo for different strategies.
+        let par_iter = par_iter.into_par_iter();
+        match par_iter.opt_len() {
+            Some(len) => {
+                // When Rust gets specialization, we can get here for indexed iterators
+                // without relying on `opt_len`.  Until then, `special_extend()` fakes
+                // an unindexed mode on the promise that `opt_len()` is accurate.
+                super::collect::special_extend(par_iter, len, self);
+            }
+            None => {
+                // This works like `extend`, but `Vec::append` is more efficient.
+                let list = par_iter.drive_unindexed(ListVecConsumer);
+                self.reserve(list.iter().map(Vec::len).sum());
+                for mut other in list {
+                    self.append(&mut other);
+                }
+            }
+        }
+    }
+}
+
+/// Extends a vector with copied items from a parallel iterator.
+impl<'a, T> ParallelExtend<&'a T> for Vec<T>
+where
+    T: 'a + Copy + Send + Sync,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = &'a T>,
+    {
+        self.par_extend(par_iter.into_par_iter().copied())
+    }
+}
+
+/// Collapses all unit items from a parallel iterator into one.
+impl ParallelExtend<()> for () {
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = ()>,
+    {
+        par_iter.into_par_iter().drive_unindexed(NoopConsumer)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/filter.rs.html b/src/rayon/iter/filter.rs.html new file mode 100644 index 0000000000..91e140a158 --- /dev/null +++ b/src/rayon/iter/filter.rs.html @@ -0,0 +1,285 @@ +filter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// `Filter` takes a predicate `filter_op` and filters out elements that match.
+/// This struct is created by the [`filter()`] method on [`ParallelIterator`]
+///
+/// [`filter()`]: trait.ParallelIterator.html#method.filter
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct Filter<I: ParallelIterator, P> {
+    base: I,
+    filter_op: P,
+}
+
+impl<I: ParallelIterator + Debug, P> Debug for Filter<I, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Filter").field("base", &self.base).finish()
+    }
+}
+
+impl<I, P> Filter<I, P>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `Filter` iterator.
+    pub(super) fn new(base: I, filter_op: P) -> Self {
+        Filter { base, filter_op }
+    }
+}
+
+impl<I, P> ParallelIterator for Filter<I, P>
+where
+    I: ParallelIterator,
+    P: Fn(&I::Item) -> bool + Sync + Send,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = FilterConsumer::new(consumer, &self.filter_op);
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct FilterConsumer<'p, C, P> {
+    base: C,
+    filter_op: &'p P,
+}
+
+impl<'p, C, P> FilterConsumer<'p, C, P> {
+    fn new(base: C, filter_op: &'p P) -> Self {
+        FilterConsumer { base, filter_op }
+    }
+}
+
+impl<'p, T, C, P: 'p> Consumer<T> for FilterConsumer<'p, C, P>
+where
+    C: Consumer<T>,
+    P: Fn(&T) -> bool + Sync,
+{
+    type Folder = FilterFolder<'p, C::Folder, P>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, C::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FilterConsumer::new(left, self.filter_op),
+            FilterConsumer::new(right, self.filter_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FilterFolder {
+            base: self.base.into_folder(),
+            filter_op: self.filter_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'p, T, C, P: 'p> UnindexedConsumer<T> for FilterConsumer<'p, C, P>
+where
+    C: UnindexedConsumer<T>,
+    P: Fn(&T) -> bool + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        FilterConsumer::new(self.base.split_off_left(), self.filter_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct FilterFolder<'p, C, P> {
+    base: C,
+    filter_op: &'p P,
+}
+
+impl<'p, C, P, T> Folder<T> for FilterFolder<'p, C, P>
+where
+    C: Folder<T>,
+    P: Fn(&T) -> bool + 'p,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let filter_op = self.filter_op;
+        if filter_op(&item) {
+            let base = self.base.consume(item);
+            FilterFolder { base, filter_op }
+        } else {
+            self
+        }
+    }
+
+    // This cannot easily specialize `consume_iter` to be better than
+    // the default, because that requires checking `self.base.full()`
+    // during a call to `self.base.consume_iter()`. (#632)
+
+    fn complete(self) -> Self::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/filter_map.rs.html b/src/rayon/iter/filter_map.rs.html new file mode 100644 index 0000000000..f923e36e18 --- /dev/null +++ b/src/rayon/iter/filter_map.rs.html @@ -0,0 +1,287 @@ +filter_map.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// `FilterMap` creates an iterator that uses `filter_op` to both filter and map elements.
+/// This struct is created by the [`filter_map()`] method on [`ParallelIterator`].
+///
+/// [`filter_map()`]: trait.ParallelIterator.html#method.filter_map
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct FilterMap<I: ParallelIterator, P> {
+    base: I,
+    filter_op: P,
+}
+
+impl<I: ParallelIterator + Debug, P> Debug for FilterMap<I, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("FilterMap")
+            .field("base", &self.base)
+            .finish()
+    }
+}
+
+impl<I: ParallelIterator, P> FilterMap<I, P> {
+    /// Creates a new `FilterMap` iterator.
+    pub(super) fn new(base: I, filter_op: P) -> Self {
+        FilterMap { base, filter_op }
+    }
+}
+
+impl<I, P, R> ParallelIterator for FilterMap<I, P>
+where
+    I: ParallelIterator,
+    P: Fn(I::Item) -> Option<R> + Sync + Send,
+    R: Send,
+{
+    type Item = R;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer = FilterMapConsumer::new(consumer, &self.filter_op);
+        self.base.drive_unindexed(consumer)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct FilterMapConsumer<'p, C, P> {
+    base: C,
+    filter_op: &'p P,
+}
+
+impl<'p, C, P: 'p> FilterMapConsumer<'p, C, P> {
+    fn new(base: C, filter_op: &'p P) -> Self {
+        FilterMapConsumer { base, filter_op }
+    }
+}
+
+impl<'p, T, U, C, P> Consumer<T> for FilterMapConsumer<'p, C, P>
+where
+    C: Consumer<U>,
+    P: Fn(T) -> Option<U> + Sync + 'p,
+{
+    type Folder = FilterMapFolder<'p, C::Folder, P>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FilterMapConsumer::new(left, self.filter_op),
+            FilterMapConsumer::new(right, self.filter_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        let base = self.base.into_folder();
+        FilterMapFolder {
+            base,
+            filter_op: self.filter_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'p, T, U, C, P> UnindexedConsumer<T> for FilterMapConsumer<'p, C, P>
+where
+    C: UnindexedConsumer<U>,
+    P: Fn(T) -> Option<U> + Sync + 'p,
+{
+    fn split_off_left(&self) -> Self {
+        FilterMapConsumer::new(self.base.split_off_left(), self.filter_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct FilterMapFolder<'p, C, P> {
+    base: C,
+    filter_op: &'p P,
+}
+
+impl<'p, T, U, C, P> Folder<T> for FilterMapFolder<'p, C, P>
+where
+    C: Folder<U>,
+    P: Fn(T) -> Option<U> + Sync + 'p,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let filter_op = self.filter_op;
+        if let Some(mapped_item) = filter_op(item) {
+            let base = self.base.consume(mapped_item);
+            FilterMapFolder { base, filter_op }
+        } else {
+            self
+        }
+    }
+
+    // This cannot easily specialize `consume_iter` to be better than
+    // the default, because that requires checking `self.base.full()`
+    // during a call to `self.base.consume_iter()`. (#632)
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/find.rs.html b/src/rayon/iter/find.rs.html new file mode 100644 index 0000000000..7080e63492 --- /dev/null +++ b/src/rayon/iter/find.rs.html @@ -0,0 +1,243 @@ +find.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+
use super::plumbing::*;
+use super::*;
+use std::sync::atomic::{AtomicBool, Ordering};
+
+pub(super) fn find<I, P>(pi: I, find_op: P) -> Option<I::Item>
+where
+    I: ParallelIterator,
+    P: Fn(&I::Item) -> bool + Sync,
+{
+    let found = AtomicBool::new(false);
+    let consumer = FindConsumer::new(&find_op, &found);
+    pi.drive_unindexed(consumer)
+}
+
+struct FindConsumer<'p, P> {
+    find_op: &'p P,
+    found: &'p AtomicBool,
+}
+
+impl<'p, P> FindConsumer<'p, P> {
+    fn new(find_op: &'p P, found: &'p AtomicBool) -> Self {
+        FindConsumer { find_op, found }
+    }
+}
+
+impl<'p, T, P: 'p> Consumer<T> for FindConsumer<'p, P>
+where
+    T: Send,
+    P: Fn(&T) -> bool + Sync,
+{
+    type Folder = FindFolder<'p, T, P>;
+    type Reducer = FindReducer;
+    type Result = Option<T>;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) {
+        (self.split_off_left(), self, FindReducer)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FindFolder {
+            find_op: self.find_op,
+            found: self.found,
+            item: None,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.found.load(Ordering::Relaxed)
+    }
+}
+
+impl<'p, T, P: 'p> UnindexedConsumer<T> for FindConsumer<'p, P>
+where
+    T: Send,
+    P: Fn(&T) -> bool + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        FindConsumer::new(self.find_op, self.found)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        FindReducer
+    }
+}
+
+struct FindFolder<'p, T, P> {
+    find_op: &'p P,
+    found: &'p AtomicBool,
+    item: Option<T>,
+}
+
+impl<'p, T, P> Folder<T> for FindFolder<'p, T, P>
+where
+    P: Fn(&T) -> bool + 'p,
+{
+    type Result = Option<T>;
+
+    fn consume(mut self, item: T) -> Self {
+        if (self.find_op)(&item) {
+            self.found.store(true, Ordering::Relaxed);
+            self.item = Some(item);
+        }
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        fn not_full<T>(found: &AtomicBool) -> impl Fn(&T) -> bool + '_ {
+            move |_| !found.load(Ordering::Relaxed)
+        }
+
+        self.item = iter
+            .into_iter()
+            // stop iterating if another thread has found something
+            .take_while(not_full(self.found))
+            .find(self.find_op);
+        if self.item.is_some() {
+            self.found.store(true, Ordering::Relaxed)
+        }
+        self
+    }
+
+    fn complete(self) -> Self::Result {
+        self.item
+    }
+
+    fn full(&self) -> bool {
+        self.found.load(Ordering::Relaxed)
+    }
+}
+
+struct FindReducer;
+
+impl<T> Reducer<Option<T>> for FindReducer {
+    fn reduce(self, left: Option<T>, right: Option<T>) -> Option<T> {
+        left.or(right)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/find_first_last/mod.rs.html b/src/rayon/iter/find_first_last/mod.rs.html new file mode 100644 index 0000000000..273c3231ea --- /dev/null +++ b/src/rayon/iter/find_first_last/mod.rs.html @@ -0,0 +1,463 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+
use super::plumbing::*;
+use super::*;
+use std::cell::Cell;
+use std::sync::atomic::{AtomicUsize, Ordering};
+
+#[cfg(test)]
+mod test;
+
+// The key optimization for find_first is that a consumer can stop its search if
+// some consumer to its left already found a match (and similarly for consumers
+// to the right for find_last). To make this work, all consumers need some
+// notion of their position in the data relative to other consumers, including
+// unindexed consumers that have no built-in notion of position.
+//
+// To solve this, we assign each consumer a lower and upper bound for an
+// imaginary "range" of data that it consumes. The initial consumer starts with
+// the range 0..usize::max_value(). The split divides this range in half so that
+// one resulting consumer has the range 0..(usize::max_value() / 2), and the
+// other has (usize::max_value() / 2)..usize::max_value(). Every subsequent
+// split divides the range in half again until it cannot be split anymore
+// (i.e. its length is 1), in which case the split returns two consumers with
+// the same range. In that case both consumers will continue to consume all
+// their data regardless of whether a better match is found, but the reducer
+// will still return the correct answer.
+
+#[derive(Copy, Clone)]
+enum MatchPosition {
+    Leftmost,
+    Rightmost,
+}
+
+/// Returns true if pos1 is a better match than pos2 according to MatchPosition
+#[inline]
+fn better_position(pos1: usize, pos2: usize, mp: MatchPosition) -> bool {
+    match mp {
+        MatchPosition::Leftmost => pos1 < pos2,
+        MatchPosition::Rightmost => pos1 > pos2,
+    }
+}
+
+pub(super) fn find_first<I, P>(pi: I, find_op: P) -> Option<I::Item>
+where
+    I: ParallelIterator,
+    P: Fn(&I::Item) -> bool + Sync,
+{
+    let best_found = AtomicUsize::new(usize::max_value());
+    let consumer = FindConsumer::new(&find_op, MatchPosition::Leftmost, &best_found);
+    pi.drive_unindexed(consumer)
+}
+
+pub(super) fn find_last<I, P>(pi: I, find_op: P) -> Option<I::Item>
+where
+    I: ParallelIterator,
+    P: Fn(&I::Item) -> bool + Sync,
+{
+    let best_found = AtomicUsize::new(0);
+    let consumer = FindConsumer::new(&find_op, MatchPosition::Rightmost, &best_found);
+    pi.drive_unindexed(consumer)
+}
+
+struct FindConsumer<'p, P> {
+    find_op: &'p P,
+    lower_bound: Cell<usize>,
+    upper_bound: usize,
+    match_position: MatchPosition,
+    best_found: &'p AtomicUsize,
+}
+
+impl<'p, P> FindConsumer<'p, P> {
+    fn new(find_op: &'p P, match_position: MatchPosition, best_found: &'p AtomicUsize) -> Self {
+        FindConsumer {
+            find_op,
+            lower_bound: Cell::new(0),
+            upper_bound: usize::max_value(),
+            match_position,
+            best_found,
+        }
+    }
+
+    fn current_index(&self) -> usize {
+        match self.match_position {
+            MatchPosition::Leftmost => self.lower_bound.get(),
+            MatchPosition::Rightmost => self.upper_bound,
+        }
+    }
+}
+
+impl<'p, T, P> Consumer<T> for FindConsumer<'p, P>
+where
+    T: Send,
+    P: Fn(&T) -> bool + Sync,
+{
+    type Folder = FindFolder<'p, T, P>;
+    type Reducer = FindReducer;
+    type Result = Option<T>;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) {
+        let dir = self.match_position;
+        (
+            self.split_off_left(),
+            self,
+            FindReducer {
+                match_position: dir,
+            },
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FindFolder {
+            find_op: self.find_op,
+            boundary: self.current_index(),
+            match_position: self.match_position,
+            best_found: self.best_found,
+            item: None,
+        }
+    }
+
+    fn full(&self) -> bool {
+        // can stop consuming if the best found index so far is *strictly*
+        // better than anything this consumer will find
+        better_position(
+            self.best_found.load(Ordering::Relaxed),
+            self.current_index(),
+            self.match_position,
+        )
+    }
+}
+
+impl<'p, T, P> UnindexedConsumer<T> for FindConsumer<'p, P>
+where
+    T: Send,
+    P: Fn(&T) -> bool + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        // Upper bound for one consumer will be lower bound for the other. This
+        // overlap is okay, because only one of the bounds will be used for
+        // comparing against best_found; the other is kept only to be able to
+        // divide the range in half.
+        //
+        // When the resolution of usize has been exhausted (i.e. when
+        // upper_bound = lower_bound), both results of this split will have the
+        // same range. When that happens, we lose the ability to tell one
+        // consumer to stop working when the other finds a better match, but the
+        // reducer ensures that the best answer is still returned (see the test
+        // above).
+        let old_lower_bound = self.lower_bound.get();
+        let median = old_lower_bound + ((self.upper_bound - old_lower_bound) / 2);
+        self.lower_bound.set(median);
+
+        FindConsumer {
+            find_op: self.find_op,
+            lower_bound: Cell::new(old_lower_bound),
+            upper_bound: median,
+            match_position: self.match_position,
+            best_found: self.best_found,
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        FindReducer {
+            match_position: self.match_position,
+        }
+    }
+}
+
+struct FindFolder<'p, T, P> {
+    find_op: &'p P,
+    boundary: usize,
+    match_position: MatchPosition,
+    best_found: &'p AtomicUsize,
+    item: Option<T>,
+}
+
+impl<'p, P: 'p + Fn(&T) -> bool, T> Folder<T> for FindFolder<'p, T, P> {
+    type Result = Option<T>;
+
+    fn consume(mut self, item: T) -> Self {
+        let found_best_in_range = match self.match_position {
+            MatchPosition::Leftmost => self.item.is_some(),
+            MatchPosition::Rightmost => false,
+        };
+
+        if !found_best_in_range && (self.find_op)(&item) {
+            // Update the best found index if ours is better.
+            let update =
+                self.best_found
+                    .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
+                        better_position(self.boundary, current, self.match_position)
+                            .then_some(self.boundary)
+                    });
+
+            // Save this item if our index was better or equal.
+            if update.is_ok() || update == Err(self.boundary) {
+                self.item = Some(item);
+            }
+        }
+        self
+    }
+
+    fn complete(self) -> Self::Result {
+        self.item
+    }
+
+    fn full(&self) -> bool {
+        let found_best_in_range = match self.match_position {
+            MatchPosition::Leftmost => self.item.is_some(),
+            MatchPosition::Rightmost => false,
+        };
+
+        found_best_in_range
+            || better_position(
+                self.best_found.load(Ordering::Relaxed),
+                self.boundary,
+                self.match_position,
+            )
+    }
+}
+
+struct FindReducer {
+    match_position: MatchPosition,
+}
+
+impl<T> Reducer<Option<T>> for FindReducer {
+    fn reduce(self, left: Option<T>, right: Option<T>) -> Option<T> {
+        match self.match_position {
+            MatchPosition::Leftmost => left.or(right),
+            MatchPosition::Rightmost => right.or(left),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/flat_map.rs.html b/src/rayon/iter/flat_map.rs.html new file mode 100644 index 0000000000..e19cb12aef --- /dev/null +++ b/src/rayon/iter/flat_map.rs.html @@ -0,0 +1,311 @@ +flat_map.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// `FlatMap` maps each element to a parallel iterator, then flattens these iterators together.
+/// This struct is created by the [`flat_map()`] method on [`ParallelIterator`]
+///
+/// [`flat_map()`]: trait.ParallelIterator.html#method.flat_map
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct FlatMap<I: ParallelIterator, F> {
+    base: I,
+    map_op: F,
+}
+
+impl<I: ParallelIterator + Debug, F> Debug for FlatMap<I, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("FlatMap").field("base", &self.base).finish()
+    }
+}
+
+impl<I: ParallelIterator, F> FlatMap<I, F> {
+    /// Creates a new `FlatMap` iterator.
+    pub(super) fn new(base: I, map_op: F) -> Self {
+        FlatMap { base, map_op }
+    }
+}
+
+impl<I, F, PI> ParallelIterator for FlatMap<I, F>
+where
+    I: ParallelIterator,
+    F: Fn(I::Item) -> PI + Sync + Send,
+    PI: IntoParallelIterator,
+{
+    type Item = PI::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer = FlatMapConsumer::new(consumer, &self.map_op);
+        self.base.drive_unindexed(consumer)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct FlatMapConsumer<'f, C, F> {
+    base: C,
+    map_op: &'f F,
+}
+
+impl<'f, C, F> FlatMapConsumer<'f, C, F> {
+    fn new(base: C, map_op: &'f F) -> Self {
+        FlatMapConsumer { base, map_op }
+    }
+}
+
+impl<'f, T, U, C, F> Consumer<T> for FlatMapConsumer<'f, C, F>
+where
+    C: UnindexedConsumer<U::Item>,
+    F: Fn(T) -> U + Sync,
+    U: IntoParallelIterator,
+{
+    type Folder = FlatMapFolder<'f, C, F, C::Result>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, C::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FlatMapConsumer::new(left, self.map_op),
+            FlatMapConsumer::new(right, self.map_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FlatMapFolder {
+            base: self.base,
+            map_op: self.map_op,
+            previous: None,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, U, C, F> UnindexedConsumer<T> for FlatMapConsumer<'f, C, F>
+where
+    C: UnindexedConsumer<U::Item>,
+    F: Fn(T) -> U + Sync,
+    U: IntoParallelIterator,
+{
+    fn split_off_left(&self) -> Self {
+        FlatMapConsumer::new(self.base.split_off_left(), self.map_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct FlatMapFolder<'f, C, F, R> {
+    base: C,
+    map_op: &'f F,
+    previous: Option<R>,
+}
+
+impl<'f, T, U, C, F> Folder<T> for FlatMapFolder<'f, C, F, C::Result>
+where
+    C: UnindexedConsumer<U::Item>,
+    F: Fn(T) -> U + Sync,
+    U: IntoParallelIterator,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let map_op = self.map_op;
+        let par_iter = map_op(item).into_par_iter();
+        let consumer = self.base.split_off_left();
+        let result = par_iter.drive_unindexed(consumer);
+
+        let previous = match self.previous {
+            None => Some(result),
+            Some(previous) => {
+                let reducer = self.base.to_reducer();
+                Some(reducer.reduce(previous, result))
+            }
+        };
+
+        FlatMapFolder {
+            base: self.base,
+            map_op,
+            previous,
+        }
+    }
+
+    fn complete(self) -> Self::Result {
+        match self.previous {
+            Some(previous) => previous,
+            None => self.base.into_folder().complete(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/flat_map_iter.rs.html b/src/rayon/iter/flat_map_iter.rs.html new file mode 100644 index 0000000000..eb9976fe32 --- /dev/null +++ b/src/rayon/iter/flat_map_iter.rs.html @@ -0,0 +1,297 @@ +flat_map_iter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// `FlatMapIter` maps each element to a serial iterator, then flattens these iterators together.
+/// This struct is created by the [`flat_map_iter()`] method on [`ParallelIterator`]
+///
+/// [`flat_map_iter()`]: trait.ParallelIterator.html#method.flat_map_iter
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct FlatMapIter<I: ParallelIterator, F> {
+    base: I,
+    map_op: F,
+}
+
+impl<I: ParallelIterator + Debug, F> Debug for FlatMapIter<I, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("FlatMapIter")
+            .field("base", &self.base)
+            .finish()
+    }
+}
+
+impl<I: ParallelIterator, F> FlatMapIter<I, F> {
+    /// Creates a new `FlatMapIter` iterator.
+    pub(super) fn new(base: I, map_op: F) -> Self {
+        FlatMapIter { base, map_op }
+    }
+}
+
+impl<I, F, SI> ParallelIterator for FlatMapIter<I, F>
+where
+    I: ParallelIterator,
+    F: Fn(I::Item) -> SI + Sync + Send,
+    SI: IntoIterator,
+    SI::Item: Send,
+{
+    type Item = SI::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer = FlatMapIterConsumer::new(consumer, &self.map_op);
+        self.base.drive_unindexed(consumer)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct FlatMapIterConsumer<'f, C, F> {
+    base: C,
+    map_op: &'f F,
+}
+
+impl<'f, C, F> FlatMapIterConsumer<'f, C, F> {
+    fn new(base: C, map_op: &'f F) -> Self {
+        FlatMapIterConsumer { base, map_op }
+    }
+}
+
+impl<'f, T, U, C, F> Consumer<T> for FlatMapIterConsumer<'f, C, F>
+where
+    C: UnindexedConsumer<U::Item>,
+    F: Fn(T) -> U + Sync,
+    U: IntoIterator,
+{
+    type Folder = FlatMapIterFolder<'f, C::Folder, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, C::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FlatMapIterConsumer::new(left, self.map_op),
+            FlatMapIterConsumer::new(right, self.map_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FlatMapIterFolder {
+            base: self.base.into_folder(),
+            map_op: self.map_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, U, C, F> UnindexedConsumer<T> for FlatMapIterConsumer<'f, C, F>
+where
+    C: UnindexedConsumer<U::Item>,
+    F: Fn(T) -> U + Sync,
+    U: IntoIterator,
+{
+    fn split_off_left(&self) -> Self {
+        FlatMapIterConsumer::new(self.base.split_off_left(), self.map_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct FlatMapIterFolder<'f, C, F> {
+    base: C,
+    map_op: &'f F,
+}
+
+impl<'f, T, U, C, F> Folder<T> for FlatMapIterFolder<'f, C, F>
+where
+    C: Folder<U::Item>,
+    F: Fn(T) -> U,
+    U: IntoIterator,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let map_op = self.map_op;
+        let base = self.base.consume_iter(map_op(item));
+        FlatMapIterFolder { base, map_op }
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        let map_op = self.map_op;
+        let iter = iter.into_iter().flat_map(map_op);
+        let base = self.base.consume_iter(iter);
+        FlatMapIterFolder { base, map_op }
+    }
+
+    fn complete(self) -> Self::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/flatten.rs.html b/src/rayon/iter/flatten.rs.html new file mode 100644 index 0000000000..61942446cb --- /dev/null +++ b/src/rayon/iter/flatten.rs.html @@ -0,0 +1,283 @@ +flatten.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+
use super::plumbing::*;
+use super::*;
+
+/// `Flatten` turns each element to a parallel iterator, then flattens these iterators
+/// together. This struct is created by the [`flatten()`] method on [`ParallelIterator`].
+///
+/// [`flatten()`]: trait.ParallelIterator.html#method.flatten
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Flatten<I: ParallelIterator> {
+    base: I,
+}
+
+impl<I> Flatten<I>
+where
+    I: ParallelIterator,
+    I::Item: IntoParallelIterator,
+{
+    /// Creates a new `Flatten` iterator.
+    pub(super) fn new(base: I) -> Self {
+        Flatten { base }
+    }
+}
+
+impl<I> ParallelIterator for Flatten<I>
+where
+    I: ParallelIterator,
+    I::Item: IntoParallelIterator,
+{
+    type Item = <I::Item as IntoParallelIterator>::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer = FlattenConsumer::new(consumer);
+        self.base.drive_unindexed(consumer)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct FlattenConsumer<C> {
+    base: C,
+}
+
+impl<C> FlattenConsumer<C> {
+    fn new(base: C) -> Self {
+        FlattenConsumer { base }
+    }
+}
+
+impl<T, C> Consumer<T> for FlattenConsumer<C>
+where
+    C: UnindexedConsumer<T::Item>,
+    T: IntoParallelIterator,
+{
+    type Folder = FlattenFolder<C, C::Result>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, C::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FlattenConsumer::new(left),
+            FlattenConsumer::new(right),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FlattenFolder {
+            base: self.base,
+            previous: None,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<T, C> UnindexedConsumer<T> for FlattenConsumer<C>
+where
+    C: UnindexedConsumer<T::Item>,
+    T: IntoParallelIterator,
+{
+    fn split_off_left(&self) -> Self {
+        FlattenConsumer::new(self.base.split_off_left())
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct FlattenFolder<C, R> {
+    base: C,
+    previous: Option<R>,
+}
+
+impl<T, C> Folder<T> for FlattenFolder<C, C::Result>
+where
+    C: UnindexedConsumer<T::Item>,
+    T: IntoParallelIterator,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let par_iter = item.into_par_iter();
+        let consumer = self.base.split_off_left();
+        let result = par_iter.drive_unindexed(consumer);
+
+        let previous = match self.previous {
+            None => Some(result),
+            Some(previous) => {
+                let reducer = self.base.to_reducer();
+                Some(reducer.reduce(previous, result))
+            }
+        };
+
+        FlattenFolder {
+            base: self.base,
+            previous,
+        }
+    }
+
+    fn complete(self) -> Self::Result {
+        match self.previous {
+            Some(previous) => previous,
+            None => self.base.into_folder().complete(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/flatten_iter.rs.html b/src/rayon/iter/flatten_iter.rs.html new file mode 100644 index 0000000000..edcdf5394f --- /dev/null +++ b/src/rayon/iter/flatten_iter.rs.html @@ -0,0 +1,267 @@ +flatten_iter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+
use super::plumbing::*;
+use super::*;
+
+/// `FlattenIter` turns each element to a serial iterator, then flattens these iterators
+/// together. This struct is created by the [`flatten_iter()`] method on [`ParallelIterator`].
+///
+/// [`flatten_iter()`]: trait.ParallelIterator.html#method.flatten_iter
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct FlattenIter<I: ParallelIterator> {
+    base: I,
+}
+
+impl<I> FlattenIter<I>
+where
+    I: ParallelIterator,
+    I::Item: IntoIterator,
+    <I::Item as IntoIterator>::Item: Send,
+{
+    /// Creates a new `FlattenIter` iterator.
+    pub(super) fn new(base: I) -> Self {
+        FlattenIter { base }
+    }
+}
+
+impl<I> ParallelIterator for FlattenIter<I>
+where
+    I: ParallelIterator,
+    I::Item: IntoIterator,
+    <I::Item as IntoIterator>::Item: Send,
+{
+    type Item = <I::Item as IntoIterator>::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer = FlattenIterConsumer::new(consumer);
+        self.base.drive_unindexed(consumer)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct FlattenIterConsumer<C> {
+    base: C,
+}
+
+impl<C> FlattenIterConsumer<C> {
+    fn new(base: C) -> Self {
+        FlattenIterConsumer { base }
+    }
+}
+
+impl<T, C> Consumer<T> for FlattenIterConsumer<C>
+where
+    C: UnindexedConsumer<T::Item>,
+    T: IntoIterator,
+{
+    type Folder = FlattenIterFolder<C::Folder>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, C::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FlattenIterConsumer::new(left),
+            FlattenIterConsumer::new(right),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FlattenIterFolder {
+            base: self.base.into_folder(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<T, C> UnindexedConsumer<T> for FlattenIterConsumer<C>
+where
+    C: UnindexedConsumer<T::Item>,
+    T: IntoIterator,
+{
+    fn split_off_left(&self) -> Self {
+        FlattenIterConsumer::new(self.base.split_off_left())
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct FlattenIterFolder<C> {
+    base: C,
+}
+
+impl<T, C> Folder<T> for FlattenIterFolder<C>
+where
+    C: Folder<T::Item>,
+    T: IntoIterator,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let base = self.base.consume_iter(item);
+        FlattenIterFolder { base }
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        let iter = iter.into_iter().flatten();
+        let base = self.base.consume_iter(iter);
+        FlattenIterFolder { base }
+    }
+
+    fn complete(self) -> Self::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/fold.rs.html b/src/rayon/iter/fold.rs.html new file mode 100644 index 0000000000..ece69d5cf4 --- /dev/null +++ b/src/rayon/iter/fold.rs.html @@ -0,0 +1,607 @@ +fold.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+impl<U, I, ID, F> Fold<I, ID, F>
+where
+    I: ParallelIterator,
+    F: Fn(U, I::Item) -> U + Sync + Send,
+    ID: Fn() -> U + Sync + Send,
+    U: Send,
+{
+    pub(super) fn new(base: I, identity: ID, fold_op: F) -> Self {
+        Fold {
+            base,
+            identity,
+            fold_op,
+        }
+    }
+}
+
+/// `Fold` is an iterator that applies a function over an iterator producing a single value.
+/// This struct is created by the [`fold()`] method on [`ParallelIterator`]
+///
+/// [`fold()`]: trait.ParallelIterator.html#method.fold
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct Fold<I, ID, F> {
+    base: I,
+    identity: ID,
+    fold_op: F,
+}
+
+impl<I: ParallelIterator + Debug, ID, F> Debug for Fold<I, ID, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Fold").field("base", &self.base).finish()
+    }
+}
+
+impl<U, I, ID, F> ParallelIterator for Fold<I, ID, F>
+where
+    I: ParallelIterator,
+    F: Fn(U, I::Item) -> U + Sync + Send,
+    ID: Fn() -> U + Sync + Send,
+    U: Send,
+{
+    type Item = U;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = FoldConsumer {
+            base: consumer,
+            fold_op: &self.fold_op,
+            identity: &self.identity,
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+struct FoldConsumer<'c, C, ID, F> {
+    base: C,
+    fold_op: &'c F,
+    identity: &'c ID,
+}
+
+impl<'r, U, T, C, ID, F> Consumer<T> for FoldConsumer<'r, C, ID, F>
+where
+    C: Consumer<U>,
+    F: Fn(U, T) -> U + Sync,
+    ID: Fn() -> U + Sync,
+    U: Send,
+{
+    type Folder = FoldFolder<'r, C::Folder, U, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FoldConsumer { base: left, ..self },
+            FoldConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FoldFolder {
+            base: self.base.into_folder(),
+            item: (self.identity)(),
+            fold_op: self.fold_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'r, U, T, C, ID, F> UnindexedConsumer<T> for FoldConsumer<'r, C, ID, F>
+where
+    C: UnindexedConsumer<U>,
+    F: Fn(U, T) -> U + Sync,
+    ID: Fn() -> U + Sync,
+    U: Send,
+{
+    fn split_off_left(&self) -> Self {
+        FoldConsumer {
+            base: self.base.split_off_left(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct FoldFolder<'r, C, ID, F> {
+    base: C,
+    fold_op: &'r F,
+    item: ID,
+}
+
+impl<'r, C, ID, F, T> Folder<T> for FoldFolder<'r, C, ID, F>
+where
+    C: Folder<ID>,
+    F: Fn(ID, T) -> ID + Sync,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let item = (self.fold_op)(self.item, item);
+        FoldFolder {
+            base: self.base,
+            fold_op: self.fold_op,
+            item,
+        }
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        fn not_full<C, ID, T>(base: &C) -> impl Fn(&T) -> bool + '_
+        where
+            C: Folder<ID>,
+        {
+            move |_| !base.full()
+        }
+
+        let base = self.base;
+        let item = iter
+            .into_iter()
+            // stop iterating if another thread has finished
+            .take_while(not_full(&base))
+            .fold(self.item, self.fold_op);
+
+        FoldFolder {
+            base,
+            item,
+            fold_op: self.fold_op,
+        }
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.consume(self.item).complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+// ///////////////////////////////////////////////////////////////////////////
+
+impl<U, I, F> FoldWith<I, U, F>
+where
+    I: ParallelIterator,
+    F: Fn(U, I::Item) -> U + Sync + Send,
+    U: Send + Clone,
+{
+    pub(super) fn new(base: I, item: U, fold_op: F) -> Self {
+        FoldWith {
+            base,
+            item,
+            fold_op,
+        }
+    }
+}
+
+/// `FoldWith` is an iterator that applies a function over an iterator producing a single value.
+/// This struct is created by the [`fold_with()`] method on [`ParallelIterator`]
+///
+/// [`fold_with()`]: trait.ParallelIterator.html#method.fold_with
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct FoldWith<I, U, F> {
+    base: I,
+    item: U,
+    fold_op: F,
+}
+
+impl<I: ParallelIterator + Debug, U: Debug, F> Debug for FoldWith<I, U, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("FoldWith")
+            .field("base", &self.base)
+            .field("item", &self.item)
+            .finish()
+    }
+}
+
+impl<U, I, F> ParallelIterator for FoldWith<I, U, F>
+where
+    I: ParallelIterator,
+    F: Fn(U, I::Item) -> U + Sync + Send,
+    U: Send + Clone,
+{
+    type Item = U;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = FoldWithConsumer {
+            base: consumer,
+            item: self.item,
+            fold_op: &self.fold_op,
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+struct FoldWithConsumer<'c, C, U, F> {
+    base: C,
+    item: U,
+    fold_op: &'c F,
+}
+
+impl<'r, U, T, C, F> Consumer<T> for FoldWithConsumer<'r, C, U, F>
+where
+    C: Consumer<U>,
+    F: Fn(U, T) -> U + Sync,
+    U: Send + Clone,
+{
+    type Folder = FoldFolder<'r, C::Folder, U, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            FoldWithConsumer {
+                base: left,
+                item: self.item.clone(),
+                ..self
+            },
+            FoldWithConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        FoldFolder {
+            base: self.base.into_folder(),
+            item: self.item,
+            fold_op: self.fold_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'r, U, T, C, F> UnindexedConsumer<T> for FoldWithConsumer<'r, C, U, F>
+where
+    C: UnindexedConsumer<U>,
+    F: Fn(U, T) -> U + Sync,
+    U: Send + Clone,
+{
+    fn split_off_left(&self) -> Self {
+        FoldWithConsumer {
+            base: self.base.split_off_left(),
+            item: self.item.clone(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/fold_chunks.rs.html b/src/rayon/iter/fold_chunks.rs.html new file mode 100644 index 0000000000..cc7181c01d --- /dev/null +++ b/src/rayon/iter/fold_chunks.rs.html @@ -0,0 +1,475 @@ +fold_chunks.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+
use std::fmt::{self, Debug};
+
+use super::chunks::ChunkProducer;
+use super::plumbing::*;
+use super::*;
+use crate::math::div_round_up;
+
+/// `FoldChunks` is an iterator that groups elements of an underlying iterator and applies a
+/// function over them, producing a single value for each group.
+///
+/// This struct is created by the [`fold_chunks()`] method on [`IndexedParallelIterator`]
+///
+/// [`fold_chunks()`]: trait.IndexedParallelIterator.html#method.fold_chunks
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct FoldChunks<I, ID, F>
+where
+    I: IndexedParallelIterator,
+{
+    base: I,
+    chunk_size: usize,
+    fold_op: F,
+    identity: ID,
+}
+
+impl<I: IndexedParallelIterator + Debug, ID, F> Debug for FoldChunks<I, ID, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Fold")
+            .field("base", &self.base)
+            .field("chunk_size", &self.chunk_size)
+            .finish()
+    }
+}
+
+impl<I, ID, U, F> FoldChunks<I, ID, F>
+where
+    I: IndexedParallelIterator,
+    ID: Fn() -> U + Send + Sync,
+    F: Fn(U, I::Item) -> U + Send + Sync,
+    U: Send,
+{
+    /// Creates a new `FoldChunks` iterator
+    pub(super) fn new(base: I, chunk_size: usize, identity: ID, fold_op: F) -> Self {
+        FoldChunks {
+            base,
+            chunk_size,
+            identity,
+            fold_op,
+        }
+    }
+}
+
+impl<I, ID, U, F> ParallelIterator for FoldChunks<I, ID, F>
+where
+    I: IndexedParallelIterator,
+    ID: Fn() -> U + Send + Sync,
+    F: Fn(U, I::Item) -> U + Send + Sync,
+    U: Send,
+{
+    type Item = U;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<U>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I, ID, U, F> IndexedParallelIterator for FoldChunks<I, ID, F>
+where
+    I: IndexedParallelIterator,
+    ID: Fn() -> U + Send + Sync,
+    F: Fn(U, I::Item) -> U + Send + Sync,
+    U: Send,
+{
+    fn len(&self) -> usize {
+        div_round_up(self.base.len(), self.chunk_size)
+    }
+
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let len = self.base.len();
+        return self.base.with_producer(Callback {
+            chunk_size: self.chunk_size,
+            len,
+            identity: self.identity,
+            fold_op: self.fold_op,
+            callback,
+        });
+
+        struct Callback<CB, ID, F> {
+            chunk_size: usize,
+            len: usize,
+            identity: ID,
+            fold_op: F,
+            callback: CB,
+        }
+
+        impl<T, CB, ID, U, F> ProducerCallback<T> for Callback<CB, ID, F>
+        where
+            CB: ProducerCallback<U>,
+            ID: Fn() -> U + Send + Sync,
+            F: Fn(U, T) -> U + Send + Sync,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let identity = &self.identity;
+                let fold_op = &self.fold_op;
+                let fold_iter = move |iter: P::IntoIter| iter.fold(identity(), fold_op);
+                let producer = ChunkProducer::new(self.chunk_size, self.len, base, fold_iter);
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+    use std::ops::Add;
+
+    #[test]
+    fn check_fold_chunks() {
+        let words = "bishbashbosh!"
+            .chars()
+            .collect::<Vec<_>>()
+            .into_par_iter()
+            .fold_chunks(4, String::new, |mut s, c| {
+                s.push(c);
+                s
+            })
+            .collect::<Vec<_>>();
+
+        assert_eq!(words, vec!["bish", "bash", "bosh", "!"]);
+    }
+
+    // 'closure' values for tests below
+    fn id() -> i32 {
+        0
+    }
+    fn sum<T, U>(x: T, y: U) -> T
+    where
+        T: Add<U, Output = T>,
+    {
+        x + y
+    }
+
+    #[test]
+    #[should_panic(expected = "chunk_size must not be zero")]
+    fn check_fold_chunks_zero_size() {
+        let _: Vec<i32> = vec![1, 2, 3]
+            .into_par_iter()
+            .fold_chunks(0, id, sum)
+            .collect();
+    }
+
+    #[test]
+    fn check_fold_chunks_even_size() {
+        assert_eq!(
+            vec![1 + 2 + 3, 4 + 5 + 6, 7 + 8 + 9],
+            (1..10)
+                .into_par_iter()
+                .fold_chunks(3, id, sum)
+                .collect::<Vec<i32>>()
+        );
+    }
+
+    #[test]
+    fn check_fold_chunks_empty() {
+        let v: Vec<i32> = vec![];
+        let expected: Vec<i32> = vec![];
+        assert_eq!(
+            expected,
+            v.into_par_iter()
+                .fold_chunks(2, id, sum)
+                .collect::<Vec<i32>>()
+        );
+    }
+
+    #[test]
+    fn check_fold_chunks_len() {
+        assert_eq!(4, (0..8).into_par_iter().fold_chunks(2, id, sum).len());
+        assert_eq!(3, (0..9).into_par_iter().fold_chunks(3, id, sum).len());
+        assert_eq!(3, (0..8).into_par_iter().fold_chunks(3, id, sum).len());
+        assert_eq!(1, [1].par_iter().fold_chunks(3, id, sum).len());
+        assert_eq!(0, (0..0).into_par_iter().fold_chunks(3, id, sum).len());
+    }
+
+    #[test]
+    fn check_fold_chunks_uneven() {
+        let cases: Vec<(Vec<u32>, usize, Vec<u32>)> = vec![
+            ((0..5).collect(), 3, vec![1 + 2, 3 + 4]),
+            (vec![1], 5, vec![1]),
+            ((0..4).collect(), 3, vec![1 + 2, 3]),
+        ];
+
+        for (i, (v, n, expected)) in cases.into_iter().enumerate() {
+            let mut res: Vec<u32> = vec![];
+            v.par_iter()
+                .fold_chunks(n, || 0, sum)
+                .collect_into_vec(&mut res);
+            assert_eq!(expected, res, "Case {} failed", i);
+
+            res.truncate(0);
+            v.into_par_iter()
+                .fold_chunks(n, || 0, sum)
+                .rev()
+                .collect_into_vec(&mut res);
+            assert_eq!(
+                expected.into_iter().rev().collect::<Vec<u32>>(),
+                res,
+                "Case {} reversed failed",
+                i
+            );
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/fold_chunks_with.rs.html b/src/rayon/iter/fold_chunks_with.rs.html new file mode 100644 index 0000000000..530af5d09c --- /dev/null +++ b/src/rayon/iter/fold_chunks_with.rs.html @@ -0,0 +1,465 @@ +fold_chunks_with.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+
use std::fmt::{self, Debug};
+
+use super::chunks::ChunkProducer;
+use super::plumbing::*;
+use super::*;
+use crate::math::div_round_up;
+
+/// `FoldChunksWith` is an iterator that groups elements of an underlying iterator and applies a
+/// function over them, producing a single value for each group.
+///
+/// This struct is created by the [`fold_chunks_with()`] method on [`IndexedParallelIterator`]
+///
+/// [`fold_chunks_with()`]: trait.IndexedParallelIterator.html#method.fold_chunks
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct FoldChunksWith<I, U, F>
+where
+    I: IndexedParallelIterator,
+{
+    base: I,
+    chunk_size: usize,
+    item: U,
+    fold_op: F,
+}
+
+impl<I: IndexedParallelIterator + Debug, U: Debug, F> Debug for FoldChunksWith<I, U, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Fold")
+            .field("base", &self.base)
+            .field("chunk_size", &self.chunk_size)
+            .field("item", &self.item)
+            .finish()
+    }
+}
+
+impl<I, U, F> FoldChunksWith<I, U, F>
+where
+    I: IndexedParallelIterator,
+    U: Send + Clone,
+    F: Fn(U, I::Item) -> U + Send + Sync,
+{
+    /// Creates a new `FoldChunksWith` iterator
+    pub(super) fn new(base: I, chunk_size: usize, item: U, fold_op: F) -> Self {
+        FoldChunksWith {
+            base,
+            chunk_size,
+            item,
+            fold_op,
+        }
+    }
+}
+
+impl<I, U, F> ParallelIterator for FoldChunksWith<I, U, F>
+where
+    I: IndexedParallelIterator,
+    U: Send + Clone,
+    F: Fn(U, I::Item) -> U + Send + Sync,
+{
+    type Item = U;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<U>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I, U, F> IndexedParallelIterator for FoldChunksWith<I, U, F>
+where
+    I: IndexedParallelIterator,
+    U: Send + Clone,
+    F: Fn(U, I::Item) -> U + Send + Sync,
+{
+    fn len(&self) -> usize {
+        div_round_up(self.base.len(), self.chunk_size)
+    }
+
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let len = self.base.len();
+        return self.base.with_producer(Callback {
+            chunk_size: self.chunk_size,
+            len,
+            item: self.item,
+            fold_op: self.fold_op,
+            callback,
+        });
+
+        struct Callback<CB, T, F> {
+            chunk_size: usize,
+            len: usize,
+            item: T,
+            fold_op: F,
+            callback: CB,
+        }
+
+        impl<T, U, F, CB> ProducerCallback<T> for Callback<CB, U, F>
+        where
+            CB: ProducerCallback<U>,
+            U: Send + Clone,
+            F: Fn(U, T) -> U + Send + Sync,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let item = self.item;
+                let fold_op = &self.fold_op;
+                let fold_iter = move |iter: P::IntoIter| iter.fold(item.clone(), fold_op);
+                let producer = ChunkProducer::new(self.chunk_size, self.len, base, fold_iter);
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+    use std::ops::Add;
+
+    #[test]
+    fn check_fold_chunks_with() {
+        let words = "bishbashbosh!"
+            .chars()
+            .collect::<Vec<_>>()
+            .into_par_iter()
+            .fold_chunks_with(4, String::new(), |mut s, c| {
+                s.push(c);
+                s
+            })
+            .collect::<Vec<_>>();
+
+        assert_eq!(words, vec!["bish", "bash", "bosh", "!"]);
+    }
+
+    // 'closure' value for tests below
+    fn sum<T, U>(x: T, y: U) -> T
+    where
+        T: Add<U, Output = T>,
+    {
+        x + y
+    }
+
+    #[test]
+    #[should_panic(expected = "chunk_size must not be zero")]
+    fn check_fold_chunks_zero_size() {
+        let _: Vec<i32> = vec![1, 2, 3]
+            .into_par_iter()
+            .fold_chunks_with(0, 0, sum)
+            .collect();
+    }
+
+    #[test]
+    fn check_fold_chunks_even_size() {
+        assert_eq!(
+            vec![1 + 2 + 3, 4 + 5 + 6, 7 + 8 + 9],
+            (1..10)
+                .into_par_iter()
+                .fold_chunks_with(3, 0, sum)
+                .collect::<Vec<i32>>()
+        );
+    }
+
+    #[test]
+    fn check_fold_chunks_with_empty() {
+        let v: Vec<i32> = vec![];
+        let expected: Vec<i32> = vec![];
+        assert_eq!(
+            expected,
+            v.into_par_iter()
+                .fold_chunks_with(2, 0, sum)
+                .collect::<Vec<i32>>()
+        );
+    }
+
+    #[test]
+    fn check_fold_chunks_len() {
+        assert_eq!(4, (0..8).into_par_iter().fold_chunks_with(2, 0, sum).len());
+        assert_eq!(3, (0..9).into_par_iter().fold_chunks_with(3, 0, sum).len());
+        assert_eq!(3, (0..8).into_par_iter().fold_chunks_with(3, 0, sum).len());
+        assert_eq!(1, [1].par_iter().fold_chunks_with(3, 0, sum).len());
+        assert_eq!(0, (0..0).into_par_iter().fold_chunks_with(3, 0, sum).len());
+    }
+
+    #[test]
+    fn check_fold_chunks_uneven() {
+        let cases: Vec<(Vec<u32>, usize, Vec<u32>)> = vec![
+            ((0..5).collect(), 3, vec![1 + 2, 3 + 4]),
+            (vec![1], 5, vec![1]),
+            ((0..4).collect(), 3, vec![1 + 2, 3]),
+        ];
+
+        for (i, (v, n, expected)) in cases.into_iter().enumerate() {
+            let mut res: Vec<u32> = vec![];
+            v.par_iter()
+                .fold_chunks_with(n, 0, sum)
+                .collect_into_vec(&mut res);
+            assert_eq!(expected, res, "Case {} failed", i);
+
+            res.truncate(0);
+            v.into_par_iter()
+                .fold_chunks_with(n, 0, sum)
+                .rev()
+                .collect_into_vec(&mut res);
+            assert_eq!(
+                expected.into_iter().rev().collect::<Vec<u32>>(),
+                res,
+                "Case {} reversed failed",
+                i
+            );
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/for_each.rs.html b/src/rayon/iter/for_each.rs.html new file mode 100644 index 0000000000..b065311b9d --- /dev/null +++ b/src/rayon/iter/for_each.rs.html @@ -0,0 +1,157 @@ +for_each.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+
use super::noop::*;
+use super::plumbing::*;
+use super::ParallelIterator;
+
+pub(super) fn for_each<I, F, T>(pi: I, op: &F)
+where
+    I: ParallelIterator<Item = T>,
+    F: Fn(T) + Sync,
+    T: Send,
+{
+    let consumer = ForEachConsumer { op };
+    pi.drive_unindexed(consumer)
+}
+
+struct ForEachConsumer<'f, F> {
+    op: &'f F,
+}
+
+impl<'f, F, T> Consumer<T> for ForEachConsumer<'f, F>
+where
+    F: Fn(T) + Sync,
+{
+    type Folder = ForEachConsumer<'f, F>;
+    type Reducer = NoopReducer;
+    type Result = ();
+
+    fn split_at(self, _index: usize) -> (Self, Self, NoopReducer) {
+        (self.split_off_left(), self, NoopReducer)
+    }
+
+    fn into_folder(self) -> Self {
+        self
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<'f, F, T> Folder<T> for ForEachConsumer<'f, F>
+where
+    F: Fn(T) + Sync,
+{
+    type Result = ();
+
+    fn consume(self, item: T) -> Self {
+        (self.op)(item);
+        self
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        iter.into_iter().for_each(self.op);
+        self
+    }
+
+    fn complete(self) {}
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<'f, F, T> UnindexedConsumer<T> for ForEachConsumer<'f, F>
+where
+    F: Fn(T) + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        ForEachConsumer { op: self.op }
+    }
+
+    fn to_reducer(&self) -> NoopReducer {
+        NoopReducer
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/from_par_iter.rs.html b/src/rayon/iter/from_par_iter.rs.html new file mode 100644 index 0000000000..6773f2c770 --- /dev/null +++ b/src/rayon/iter/from_par_iter.rs.html @@ -0,0 +1,623 @@ +from_par_iter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+
use super::noop::NoopConsumer;
+use super::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator};
+
+use std::borrow::Cow;
+use std::collections::LinkedList;
+use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
+use std::collections::{BinaryHeap, VecDeque};
+use std::ffi::{OsStr, OsString};
+use std::hash::{BuildHasher, Hash};
+use std::rc::Rc;
+use std::sync::Arc;
+
+/// Creates an empty default collection and extends it.
+fn collect_extended<C, I>(par_iter: I) -> C
+where
+    I: IntoParallelIterator,
+    C: ParallelExtend<I::Item> + Default,
+{
+    let mut collection = C::default();
+    collection.par_extend(par_iter);
+    collection
+}
+
+/// Collects items from a parallel iterator into a vector.
+impl<T> FromParallelIterator<T> for Vec<T>
+where
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects items from a parallel iterator into a boxed slice.
+impl<T> FromParallelIterator<T> for Box<[T]>
+where
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        Vec::from_par_iter(par_iter).into()
+    }
+}
+
+/// Collects items from a parallel iterator into a reference-counted slice.
+impl<T> FromParallelIterator<T> for Rc<[T]>
+where
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        Vec::from_par_iter(par_iter).into()
+    }
+}
+
+/// Collects items from a parallel iterator into an atomically-reference-counted slice.
+impl<T> FromParallelIterator<T> for Arc<[T]>
+where
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        Vec::from_par_iter(par_iter).into()
+    }
+}
+
+/// Collects items from a parallel iterator into a vecdeque.
+impl<T> FromParallelIterator<T> for VecDeque<T>
+where
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        Vec::from_par_iter(par_iter).into()
+    }
+}
+
+/// Collects items from a parallel iterator into a binaryheap.
+/// The heap-ordering is calculated serially after all items are collected.
+impl<T> FromParallelIterator<T> for BinaryHeap<T>
+where
+    T: Ord + Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        Vec::from_par_iter(par_iter).into()
+    }
+}
+
+/// Collects items from a parallel iterator into a freshly allocated
+/// linked list.
+impl<T> FromParallelIterator<T> for LinkedList<T>
+where
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects (key, value) pairs from a parallel iterator into a
+/// hashmap. If multiple pairs correspond to the same key, then the
+/// ones produced earlier in the parallel iterator will be
+/// overwritten, just as with a sequential iterator.
+impl<K, V, S> FromParallelIterator<(K, V)> for HashMap<K, V, S>
+where
+    K: Eq + Hash + Send,
+    V: Send,
+    S: BuildHasher + Default + Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = (K, V)>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects (key, value) pairs from a parallel iterator into a
+/// btreemap. If multiple pairs correspond to the same key, then the
+/// ones produced earlier in the parallel iterator will be
+/// overwritten, just as with a sequential iterator.
+impl<K, V> FromParallelIterator<(K, V)> for BTreeMap<K, V>
+where
+    K: Ord + Send,
+    V: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = (K, V)>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects values from a parallel iterator into a hashset.
+impl<V, S> FromParallelIterator<V> for HashSet<V, S>
+where
+    V: Eq + Hash + Send,
+    S: BuildHasher + Default + Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = V>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects values from a parallel iterator into a btreeset.
+impl<V> FromParallelIterator<V> for BTreeSet<V>
+where
+    V: Send + Ord,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = V>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects characters from a parallel iterator into a string.
+impl FromParallelIterator<char> for String {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = char>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects characters from a parallel iterator into a string.
+impl<'a> FromParallelIterator<&'a char> for String {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = &'a char>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects string slices from a parallel iterator into a string.
+impl<'a> FromParallelIterator<&'a str> for String {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = &'a str>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects strings from a parallel iterator into one large string.
+impl FromParallelIterator<String> for String {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = String>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects boxed strings from a parallel iterator into one large string.
+impl FromParallelIterator<Box<str>> for String {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = Box<str>>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects string slices from a parallel iterator into a string.
+impl<'a> FromParallelIterator<Cow<'a, str>> for String {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = Cow<'a, str>>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects OS-string slices from a parallel iterator into an OS-string.
+impl<'a> FromParallelIterator<&'a OsStr> for OsString {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = &'a OsStr>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects OS-strings from a parallel iterator into one large OS-string.
+impl FromParallelIterator<OsString> for OsString {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = OsString>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects OS-string slices from a parallel iterator into an OS-string.
+impl<'a> FromParallelIterator<Cow<'a, OsStr>> for OsString {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = Cow<'a, OsStr>>,
+    {
+        collect_extended(par_iter)
+    }
+}
+
+/// Collects an arbitrary `Cow` collection.
+///
+/// Note, the standard library only has `FromIterator` for `Cow<'a, str>` and
+/// `Cow<'a, [T]>`, because no one thought to add a blanket implementation
+/// before it was stabilized.
+impl<'a, C: ?Sized, T> FromParallelIterator<T> for Cow<'a, C>
+where
+    C: ToOwned,
+    C::Owned: FromParallelIterator<T>,
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        Cow::Owned(C::Owned::from_par_iter(par_iter))
+    }
+}
+
+/// Collapses all unit items from a parallel iterator into one.
+///
+/// This is more useful when combined with higher-level abstractions, like
+/// collecting to a `Result<(), E>` where you only care about errors:
+///
+/// ```
+/// use std::io::*;
+/// use rayon::prelude::*;
+///
+/// let data = vec![1, 2, 3, 4, 5];
+/// let res: Result<()> = data.par_iter()
+///     .map(|x| writeln!(stdout(), "{}", x))
+///     .collect();
+/// assert!(res.is_ok());
+/// ```
+impl FromParallelIterator<()> for () {
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = ()>,
+    {
+        par_iter.into_par_iter().drive_unindexed(NoopConsumer)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/inspect.rs.html b/src/rayon/iter/inspect.rs.html new file mode 100644 index 0000000000..e5403be54a --- /dev/null +++ b/src/rayon/iter/inspect.rs.html @@ -0,0 +1,517 @@ +inspect.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+use std::iter;
+
+/// `Inspect` is an iterator that calls a function with a reference to each
+/// element before yielding it.
+///
+/// This struct is created by the [`inspect()`] method on [`ParallelIterator`]
+///
+/// [`inspect()`]: trait.ParallelIterator.html#method.inspect
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct Inspect<I: ParallelIterator, F> {
+    base: I,
+    inspect_op: F,
+}
+
+impl<I: ParallelIterator + Debug, F> Debug for Inspect<I, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Inspect").field("base", &self.base).finish()
+    }
+}
+
+impl<I, F> Inspect<I, F>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `Inspect` iterator.
+    pub(super) fn new(base: I, inspect_op: F) -> Self {
+        Inspect { base, inspect_op }
+    }
+}
+
+impl<I, F> ParallelIterator for Inspect<I, F>
+where
+    I: ParallelIterator,
+    F: Fn(&I::Item) + Sync + Send,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = InspectConsumer::new(consumer, &self.inspect_op);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<I, F> IndexedParallelIterator for Inspect<I, F>
+where
+    I: IndexedParallelIterator,
+    F: Fn(&I::Item) + Sync + Send,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = InspectConsumer::new(consumer, &self.inspect_op);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            inspect_op: self.inspect_op,
+        });
+
+        struct Callback<CB, F> {
+            callback: CB,
+            inspect_op: F,
+        }
+
+        impl<T, F, CB> ProducerCallback<T> for Callback<CB, F>
+        where
+            CB: ProducerCallback<T>,
+            F: Fn(&T) + Sync,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = InspectProducer {
+                    base,
+                    inspect_op: &self.inspect_op,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct InspectProducer<'f, P, F> {
+    base: P,
+    inspect_op: &'f F,
+}
+
+impl<'f, P, F> Producer for InspectProducer<'f, P, F>
+where
+    P: Producer,
+    F: Fn(&P::Item) + Sync,
+{
+    type Item = P::Item;
+    type IntoIter = iter::Inspect<P::IntoIter, &'f F>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter().inspect(self.inspect_op)
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            InspectProducer {
+                base: left,
+                inspect_op: self.inspect_op,
+            },
+            InspectProducer {
+                base: right,
+                inspect_op: self.inspect_op,
+            },
+        )
+    }
+
+    fn fold_with<G>(self, folder: G) -> G
+    where
+        G: Folder<Self::Item>,
+    {
+        let folder1 = InspectFolder {
+            base: folder,
+            inspect_op: self.inspect_op,
+        };
+        self.base.fold_with(folder1).base
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct InspectConsumer<'f, C, F> {
+    base: C,
+    inspect_op: &'f F,
+}
+
+impl<'f, C, F> InspectConsumer<'f, C, F> {
+    fn new(base: C, inspect_op: &'f F) -> Self {
+        InspectConsumer { base, inspect_op }
+    }
+}
+
+impl<'f, T, C, F> Consumer<T> for InspectConsumer<'f, C, F>
+where
+    C: Consumer<T>,
+    F: Fn(&T) + Sync,
+{
+    type Folder = InspectFolder<'f, C::Folder, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            InspectConsumer::new(left, self.inspect_op),
+            InspectConsumer::new(right, self.inspect_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        InspectFolder {
+            base: self.base.into_folder(),
+            inspect_op: self.inspect_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, C, F> UnindexedConsumer<T> for InspectConsumer<'f, C, F>
+where
+    C: UnindexedConsumer<T>,
+    F: Fn(&T) + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        InspectConsumer::new(self.base.split_off_left(), self.inspect_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct InspectFolder<'f, C, F> {
+    base: C,
+    inspect_op: &'f F,
+}
+
+impl<'f, T, C, F> Folder<T> for InspectFolder<'f, C, F>
+where
+    C: Folder<T>,
+    F: Fn(&T),
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        (self.inspect_op)(&item);
+        InspectFolder {
+            base: self.base.consume(item),
+            inspect_op: self.inspect_op,
+        }
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.base = self
+            .base
+            .consume_iter(iter.into_iter().inspect(self.inspect_op));
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/interleave.rs.html b/src/rayon/iter/interleave.rs.html new file mode 100644 index 0000000000..d8f906ce4a --- /dev/null +++ b/src/rayon/iter/interleave.rs.html @@ -0,0 +1,673 @@ +interleave.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+
use super::plumbing::*;
+use super::*;
+use std::iter::Fuse;
+
+/// `Interleave` is an iterator that interleaves elements of iterators
+/// `i` and `j` in one continuous iterator. This struct is created by
+/// the [`interleave()`] method on [`IndexedParallelIterator`]
+///
+/// [`interleave()`]: trait.IndexedParallelIterator.html#method.interleave
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Interleave<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    i: I,
+    j: J,
+}
+
+impl<I, J> Interleave<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    /// Creates a new `Interleave` iterator
+    pub(super) fn new(i: I, j: J) -> Self {
+        Interleave { i, j }
+    }
+}
+
+impl<I, J> ParallelIterator for Interleave<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<I::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I, J> IndexedParallelIterator for Interleave<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.i.len().checked_add(self.j.len()).expect("overflow")
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let (i_len, j_len) = (self.i.len(), self.j.len());
+        return self.i.with_producer(CallbackI {
+            callback,
+            i_len,
+            j_len,
+            i_next: false,
+            j: self.j,
+        });
+
+        struct CallbackI<CB, J> {
+            callback: CB,
+            i_len: usize,
+            j_len: usize,
+            i_next: bool,
+            j: J,
+        }
+
+        impl<CB, J> ProducerCallback<J::Item> for CallbackI<CB, J>
+        where
+            J: IndexedParallelIterator,
+            CB: ProducerCallback<J::Item>,
+        {
+            type Output = CB::Output;
+
+            fn callback<I>(self, i_producer: I) -> Self::Output
+            where
+                I: Producer<Item = J::Item>,
+            {
+                self.j.with_producer(CallbackJ {
+                    i_producer,
+                    i_len: self.i_len,
+                    j_len: self.j_len,
+                    i_next: self.i_next,
+                    callback: self.callback,
+                })
+            }
+        }
+
+        struct CallbackJ<CB, I> {
+            callback: CB,
+            i_len: usize,
+            j_len: usize,
+            i_next: bool,
+            i_producer: I,
+        }
+
+        impl<CB, I> ProducerCallback<I::Item> for CallbackJ<CB, I>
+        where
+            I: Producer,
+            CB: ProducerCallback<I::Item>,
+        {
+            type Output = CB::Output;
+
+            fn callback<J>(self, j_producer: J) -> Self::Output
+            where
+                J: Producer<Item = I::Item>,
+            {
+                let producer = InterleaveProducer::new(
+                    self.i_producer,
+                    j_producer,
+                    self.i_len,
+                    self.j_len,
+                    self.i_next,
+                );
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+struct InterleaveProducer<I, J>
+where
+    I: Producer,
+    J: Producer<Item = I::Item>,
+{
+    i: I,
+    j: J,
+    i_len: usize,
+    j_len: usize,
+    i_next: bool,
+}
+
+impl<I, J> InterleaveProducer<I, J>
+where
+    I: Producer,
+    J: Producer<Item = I::Item>,
+{
+    fn new(i: I, j: J, i_len: usize, j_len: usize, i_next: bool) -> InterleaveProducer<I, J> {
+        InterleaveProducer {
+            i,
+            j,
+            i_len,
+            j_len,
+            i_next,
+        }
+    }
+}
+
+impl<I, J> Producer for InterleaveProducer<I, J>
+where
+    I: Producer,
+    J: Producer<Item = I::Item>,
+{
+    type Item = I::Item;
+    type IntoIter = InterleaveSeq<I::IntoIter, J::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        InterleaveSeq {
+            i: self.i.into_iter().fuse(),
+            j: self.j.into_iter().fuse(),
+            i_next: self.i_next,
+        }
+    }
+
+    fn min_len(&self) -> usize {
+        Ord::max(self.i.min_len(), self.j.min_len())
+    }
+
+    fn max_len(&self) -> usize {
+        Ord::min(self.i.max_len(), self.j.max_len())
+    }
+
+    /// We know 0 < index <= self.i_len + self.j_len
+    ///
+    /// Find a, b satisfying:
+    ///
+    ///  (1) 0 < a <= self.i_len
+    ///  (2) 0 < b <= self.j_len
+    ///  (3) a + b == index
+    ///
+    /// For even splits, set a = b = index/2.
+    /// For odd splits, set a = (index/2)+1, b = index/2, if `i`
+    /// should yield the next element, otherwise, if `j` should yield
+    /// the next element, set a = index/2 and b = (index/2)+1
+    fn split_at(self, index: usize) -> (Self, Self) {
+        #[inline]
+        fn odd_offset(flag: bool) -> usize {
+            (!flag) as usize
+        }
+
+        let even = index % 2 == 0;
+        let idx = index >> 1;
+
+        // desired split
+        let (i_idx, j_idx) = (
+            idx + odd_offset(even || self.i_next),
+            idx + odd_offset(even || !self.i_next),
+        );
+
+        let (i_split, j_split) = if self.i_len >= i_idx && self.j_len >= j_idx {
+            (i_idx, j_idx)
+        } else if self.i_len >= i_idx {
+            // j too short
+            (index - self.j_len, self.j_len)
+        } else {
+            // i too short
+            (self.i_len, index - self.i_len)
+        };
+
+        let trailing_i_next = even == self.i_next;
+        let (i_left, i_right) = self.i.split_at(i_split);
+        let (j_left, j_right) = self.j.split_at(j_split);
+
+        (
+            InterleaveProducer::new(i_left, j_left, i_split, j_split, self.i_next),
+            InterleaveProducer::new(
+                i_right,
+                j_right,
+                self.i_len - i_split,
+                self.j_len - j_split,
+                trailing_i_next,
+            ),
+        )
+    }
+}
+
+/// Wrapper for Interleave to implement DoubleEndedIterator and
+/// ExactSizeIterator.
+///
+/// This iterator is fused.
+struct InterleaveSeq<I, J> {
+    i: Fuse<I>,
+    j: Fuse<J>,
+
+    /// Flag to control which iterator should provide the next element. When
+    /// `false` then `i` produces the next element, otherwise `j` produces the
+    /// next element.
+    i_next: bool,
+}
+
+/// Iterator implementation for InterleaveSeq. This implementation is
+/// taken more or less verbatim from itertools. It is replicated here
+/// (instead of calling itertools directly), because we also need to
+/// implement `DoubledEndedIterator` and `ExactSizeIterator`.
+impl<I, J> Iterator for InterleaveSeq<I, J>
+where
+    I: Iterator,
+    J: Iterator<Item = I::Item>,
+{
+    type Item = I::Item;
+
+    #[inline]
+    fn next(&mut self) -> Option<Self::Item> {
+        self.i_next = !self.i_next;
+        if self.i_next {
+            match self.i.next() {
+                None => self.j.next(),
+                r => r,
+            }
+        } else {
+            match self.j.next() {
+                None => self.i.next(),
+                r => r,
+            }
+        }
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        let (ih, jh) = (self.i.size_hint(), self.j.size_hint());
+        let min = ih.0.saturating_add(jh.0);
+        let max = match (ih.1, jh.1) {
+            (Some(x), Some(y)) => x.checked_add(y),
+            _ => None,
+        };
+        (min, max)
+    }
+}
+
+// The implementation for DoubleEndedIterator requires
+// ExactSizeIterator to provide `next_back()`. The last element will
+// come from the iterator that runs out last (ie has the most elements
+// in it). If the iterators have the same number of elements, then the
+// last iterator will provide the last element.
+impl<I, J> DoubleEndedIterator for InterleaveSeq<I, J>
+where
+    I: DoubleEndedIterator + ExactSizeIterator,
+    J: DoubleEndedIterator<Item = I::Item> + ExactSizeIterator<Item = I::Item>,
+{
+    #[inline]
+    fn next_back(&mut self) -> Option<I::Item> {
+        match self.i.len().cmp(&self.j.len()) {
+            Ordering::Less => self.j.next_back(),
+            Ordering::Equal => {
+                if self.i_next {
+                    self.i.next_back()
+                } else {
+                    self.j.next_back()
+                }
+            }
+            Ordering::Greater => self.i.next_back(),
+        }
+    }
+}
+
+impl<I, J> ExactSizeIterator for InterleaveSeq<I, J>
+where
+    I: ExactSizeIterator,
+    J: ExactSizeIterator<Item = I::Item>,
+{
+    #[inline]
+    fn len(&self) -> usize {
+        self.i.len() + self.j.len()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/interleave_shortest.rs.html b/src/rayon/iter/interleave_shortest.rs.html new file mode 100644 index 0000000000..fe0cf61163 --- /dev/null +++ b/src/rayon/iter/interleave_shortest.rs.html @@ -0,0 +1,173 @@ +interleave_shortest.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+
use super::plumbing::*;
+use super::*;
+
+/// `InterleaveShortest` is an iterator that works similarly to
+/// `Interleave`, but this version stops returning elements once one
+/// of the iterators run out.
+///
+/// This struct is created by the [`interleave_shortest()`] method on
+/// [`IndexedParallelIterator`].
+///
+/// [`interleave_shortest()`]: trait.IndexedParallelIterator.html#method.interleave_shortest
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct InterleaveShortest<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    interleave: Interleave<Take<I>, Take<J>>,
+}
+
+impl<I, J> InterleaveShortest<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    /// Creates a new `InterleaveShortest` iterator
+    pub(super) fn new(i: I, j: J) -> Self {
+        InterleaveShortest {
+            interleave: if i.len() <= j.len() {
+                // take equal lengths from both iterators
+                let n = i.len();
+                i.take(n).interleave(j.take(n))
+            } else {
+                // take one extra item from the first iterator
+                let n = j.len();
+                i.take(n + 1).interleave(j.take(n))
+            },
+        }
+    }
+}
+
+impl<I, J> ParallelIterator for InterleaveShortest<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<I::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I, J> IndexedParallelIterator for InterleaveShortest<I, J>
+where
+    I: IndexedParallelIterator,
+    J: IndexedParallelIterator<Item = I::Item>,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.interleave.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        self.interleave.with_producer(callback)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/intersperse.rs.html b/src/rayon/iter/intersperse.rs.html new file mode 100644 index 0000000000..7d8fc851e3 --- /dev/null +++ b/src/rayon/iter/intersperse.rs.html @@ -0,0 +1,823 @@ +intersperse.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+
use super::plumbing::*;
+use super::*;
+use std::cell::Cell;
+use std::iter::{self, Fuse};
+
+/// `Intersperse` is an iterator that inserts a particular item between each
+/// item of the adapted iterator.  This struct is created by the
+/// [`intersperse()`] method on [`ParallelIterator`]
+///
+/// [`intersperse()`]: trait.ParallelIterator.html#method.intersperse
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone, Debug)]
+pub struct Intersperse<I>
+where
+    I: ParallelIterator,
+    I::Item: Clone,
+{
+    base: I,
+    item: I::Item,
+}
+
+impl<I> Intersperse<I>
+where
+    I: ParallelIterator,
+    I::Item: Clone,
+{
+    /// Creates a new `Intersperse` iterator
+    pub(super) fn new(base: I, item: I::Item) -> Self {
+        Intersperse { base, item }
+    }
+}
+
+impl<I> ParallelIterator for Intersperse<I>
+where
+    I: ParallelIterator,
+    I::Item: Clone + Send,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<I::Item>,
+    {
+        let consumer1 = IntersperseConsumer::new(consumer, self.item);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        match self.base.opt_len()? {
+            0 => Some(0),
+            len => len.checked_add(len - 1),
+        }
+    }
+}
+
+impl<I> IndexedParallelIterator for Intersperse<I>
+where
+    I: IndexedParallelIterator,
+    I::Item: Clone + Send,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = IntersperseConsumer::new(consumer, self.item);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        let len = self.base.len();
+        if len > 0 {
+            len.checked_add(len - 1).expect("overflow")
+        } else {
+            0
+        }
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let len = self.len();
+        return self.base.with_producer(Callback {
+            callback,
+            item: self.item,
+            len,
+        });
+
+        struct Callback<CB, T> {
+            callback: CB,
+            item: T,
+            len: usize,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB, T>
+        where
+            CB: ProducerCallback<T>,
+            T: Clone + Send,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = IntersperseProducer::new(base, self.item, self.len);
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+struct IntersperseProducer<P>
+where
+    P: Producer,
+{
+    base: P,
+    item: P::Item,
+    len: usize,
+    clone_first: bool,
+}
+
+impl<P> IntersperseProducer<P>
+where
+    P: Producer,
+{
+    fn new(base: P, item: P::Item, len: usize) -> Self {
+        IntersperseProducer {
+            base,
+            item,
+            len,
+            clone_first: false,
+        }
+    }
+}
+
+impl<P> Producer for IntersperseProducer<P>
+where
+    P: Producer,
+    P::Item: Clone + Send,
+{
+    type Item = P::Item;
+    type IntoIter = IntersperseIter<P::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        IntersperseIter {
+            base: self.base.into_iter().fuse(),
+            item: self.item,
+            clone_first: self.len > 0 && self.clone_first,
+
+            // If there's more than one item, then even lengths end the opposite
+            // of how they started with respect to interspersed clones.
+            clone_last: self.len > 1 && ((self.len & 1 == 0) ^ self.clone_first),
+        }
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        debug_assert!(index <= self.len);
+
+        // The left needs half of the items from the base producer, and the
+        // other half will be our interspersed item.  If we're not leading with
+        // a cloned item, then we need to round up the base number of items,
+        // otherwise round down.
+        let base_index = (index + !self.clone_first as usize) / 2;
+        let (left_base, right_base) = self.base.split_at(base_index);
+
+        let left = IntersperseProducer {
+            base: left_base,
+            item: self.item.clone(),
+            len: index,
+            clone_first: self.clone_first,
+        };
+
+        let right = IntersperseProducer {
+            base: right_base,
+            item: self.item,
+            len: self.len - index,
+
+            // If the index is odd, the right side toggles `clone_first`.
+            clone_first: (index & 1 == 1) ^ self.clone_first,
+        };
+
+        (left, right)
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        let folder1 = IntersperseFolder {
+            base: folder,
+            item: self.item,
+            clone_first: self.clone_first,
+        };
+        self.base.fold_with(folder1).base
+    }
+}
+
+struct IntersperseIter<I>
+where
+    I: Iterator,
+{
+    base: Fuse<I>,
+    item: I::Item,
+    clone_first: bool,
+    clone_last: bool,
+}
+
+impl<I> Iterator for IntersperseIter<I>
+where
+    I: DoubleEndedIterator + ExactSizeIterator,
+    I::Item: Clone,
+{
+    type Item = I::Item;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        if self.clone_first {
+            self.clone_first = false;
+            Some(self.item.clone())
+        } else if let next @ Some(_) = self.base.next() {
+            // If there are any items left, we'll need another clone in front.
+            self.clone_first = self.base.len() != 0;
+            next
+        } else if self.clone_last {
+            self.clone_last = false;
+            Some(self.item.clone())
+        } else {
+            None
+        }
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        let len = self.len();
+        (len, Some(len))
+    }
+}
+
+impl<I> DoubleEndedIterator for IntersperseIter<I>
+where
+    I: DoubleEndedIterator + ExactSizeIterator,
+    I::Item: Clone,
+{
+    fn next_back(&mut self) -> Option<Self::Item> {
+        if self.clone_last {
+            self.clone_last = false;
+            Some(self.item.clone())
+        } else if let next_back @ Some(_) = self.base.next_back() {
+            // If there are any items left, we'll need another clone in back.
+            self.clone_last = self.base.len() != 0;
+            next_back
+        } else if self.clone_first {
+            self.clone_first = false;
+            Some(self.item.clone())
+        } else {
+            None
+        }
+    }
+}
+
+impl<I> ExactSizeIterator for IntersperseIter<I>
+where
+    I: DoubleEndedIterator + ExactSizeIterator,
+    I::Item: Clone,
+{
+    fn len(&self) -> usize {
+        let len = self.base.len();
+        len + len.saturating_sub(1) + self.clone_first as usize + self.clone_last as usize
+    }
+}
+
+struct IntersperseConsumer<C, T> {
+    base: C,
+    item: T,
+    clone_first: Cell<bool>,
+}
+
+impl<C, T> IntersperseConsumer<C, T>
+where
+    C: Consumer<T>,
+{
+    fn new(base: C, item: T) -> Self {
+        IntersperseConsumer {
+            base,
+            item,
+            clone_first: false.into(),
+        }
+    }
+}
+
+impl<C, T> Consumer<T> for IntersperseConsumer<C, T>
+where
+    C: Consumer<T>,
+    T: Clone + Send,
+{
+    type Folder = IntersperseFolder<C::Folder, T>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(mut self, index: usize) -> (Self, Self, Self::Reducer) {
+        // We'll feed twice as many items to the base consumer, except if we're
+        // not currently leading with a cloned item, then it's one less.
+        let base_index = index + index.saturating_sub(!self.clone_first.get() as usize);
+        let (left, right, reducer) = self.base.split_at(base_index);
+
+        let right = IntersperseConsumer {
+            base: right,
+            item: self.item.clone(),
+            clone_first: true.into(),
+        };
+        self.base = left;
+        (self, right, reducer)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        IntersperseFolder {
+            base: self.base.into_folder(),
+            item: self.item,
+            clone_first: self.clone_first.get(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<C, T> UnindexedConsumer<T> for IntersperseConsumer<C, T>
+where
+    C: UnindexedConsumer<T>,
+    T: Clone + Send,
+{
+    fn split_off_left(&self) -> Self {
+        let left = IntersperseConsumer {
+            base: self.base.split_off_left(),
+            item: self.item.clone(),
+            clone_first: self.clone_first.clone(),
+        };
+        self.clone_first.set(true);
+        left
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct IntersperseFolder<C, T> {
+    base: C,
+    item: T,
+    clone_first: bool,
+}
+
+impl<C, T> Folder<T> for IntersperseFolder<C, T>
+where
+    C: Folder<T>,
+    T: Clone,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        if self.clone_first {
+            self.base = self.base.consume(self.item.clone());
+            if self.base.full() {
+                return self;
+            }
+        } else {
+            self.clone_first = true;
+        }
+        self.base = self.base.consume(item);
+        self
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        let mut clone_first = self.clone_first;
+        let between_item = self.item;
+        let base = self.base.consume_iter(iter.into_iter().flat_map(|item| {
+            let first = if clone_first {
+                Some(between_item.clone())
+            } else {
+                clone_first = true;
+                None
+            };
+            first.into_iter().chain(iter::once(item))
+        }));
+        IntersperseFolder {
+            base,
+            item: between_item,
+            clone_first,
+        }
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/len.rs.html b/src/rayon/iter/len.rs.html new file mode 100644 index 0000000000..a8f5c7a1b8 --- /dev/null +++ b/src/rayon/iter/len.rs.html @@ -0,0 +1,543 @@ +len.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+
use super::plumbing::*;
+use super::*;
+
+/// `MinLen` is an iterator that imposes a minimum length on iterator splits.
+/// This struct is created by the [`with_min_len()`] method on [`IndexedParallelIterator`]
+///
+/// [`with_min_len()`]: trait.IndexedParallelIterator.html#method.with_min_len
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct MinLen<I: IndexedParallelIterator> {
+    base: I,
+    min: usize,
+}
+
+impl<I> MinLen<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `MinLen` iterator.
+    pub(super) fn new(base: I, min: usize) -> Self {
+        MinLen { base, min }
+    }
+}
+
+impl<I> ParallelIterator for MinLen<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for MinLen<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            min: self.min,
+        });
+
+        struct Callback<CB> {
+            callback: CB,
+            min: usize,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+        {
+            type Output = CB::Output;
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = MinLenProducer {
+                    base,
+                    min: self.min,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// `MinLenProducer` implementation
+
+struct MinLenProducer<P> {
+    base: P,
+    min: usize,
+}
+
+impl<P> Producer for MinLenProducer<P>
+where
+    P: Producer,
+{
+    type Item = P::Item;
+    type IntoIter = P::IntoIter;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter()
+    }
+
+    fn min_len(&self) -> usize {
+        Ord::max(self.min, self.base.min_len())
+    }
+
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            MinLenProducer {
+                base: left,
+                min: self.min,
+            },
+            MinLenProducer {
+                base: right,
+                min: self.min,
+            },
+        )
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.base.fold_with(folder)
+    }
+}
+
+/// `MaxLen` is an iterator that imposes a maximum length on iterator splits.
+/// This struct is created by the [`with_max_len()`] method on [`IndexedParallelIterator`]
+///
+/// [`with_max_len()`]: trait.IndexedParallelIterator.html#method.with_max_len
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct MaxLen<I: IndexedParallelIterator> {
+    base: I,
+    max: usize,
+}
+
+impl<I> MaxLen<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `MaxLen` iterator.
+    pub(super) fn new(base: I, max: usize) -> Self {
+        MaxLen { base, max }
+    }
+}
+
+impl<I> ParallelIterator for MaxLen<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for MaxLen<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            max: self.max,
+        });
+
+        struct Callback<CB> {
+            callback: CB,
+            max: usize,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+        {
+            type Output = CB::Output;
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = MaxLenProducer {
+                    base,
+                    max: self.max,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// `MaxLenProducer` implementation
+
+struct MaxLenProducer<P> {
+    base: P,
+    max: usize,
+}
+
+impl<P> Producer for MaxLenProducer<P>
+where
+    P: Producer,
+{
+    type Item = P::Item;
+    type IntoIter = P::IntoIter;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter()
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+
+    fn max_len(&self) -> usize {
+        Ord::min(self.max, self.base.max_len())
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            MaxLenProducer {
+                base: left,
+                max: self.max,
+            },
+            MaxLenProducer {
+                base: right,
+                max: self.max,
+            },
+        )
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.base.fold_with(folder)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/map.rs.html b/src/rayon/iter/map.rs.html new file mode 100644 index 0000000000..576f109e55 --- /dev/null +++ b/src/rayon/iter/map.rs.html @@ -0,0 +1,521 @@ +map.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+use std::iter;
+
+/// `Map` is an iterator that transforms the elements of an underlying iterator.
+///
+/// This struct is created by the [`map()`] method on [`ParallelIterator`]
+///
+/// [`map()`]: trait.ParallelIterator.html#method.map
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct Map<I: ParallelIterator, F> {
+    base: I,
+    map_op: F,
+}
+
+impl<I: ParallelIterator + Debug, F> Debug for Map<I, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Map").field("base", &self.base).finish()
+    }
+}
+
+impl<I, F> Map<I, F>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `Map` iterator.
+    pub(super) fn new(base: I, map_op: F) -> Self {
+        Map { base, map_op }
+    }
+}
+
+impl<I, F, R> ParallelIterator for Map<I, F>
+where
+    I: ParallelIterator,
+    F: Fn(I::Item) -> R + Sync + Send,
+    R: Send,
+{
+    type Item = F::Output;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = MapConsumer::new(consumer, &self.map_op);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<I, F, R> IndexedParallelIterator for Map<I, F>
+where
+    I: IndexedParallelIterator,
+    F: Fn(I::Item) -> R + Sync + Send,
+    R: Send,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = MapConsumer::new(consumer, &self.map_op);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            map_op: self.map_op,
+        });
+
+        struct Callback<CB, F> {
+            callback: CB,
+            map_op: F,
+        }
+
+        impl<T, F, R, CB> ProducerCallback<T> for Callback<CB, F>
+        where
+            CB: ProducerCallback<R>,
+            F: Fn(T) -> R + Sync,
+            R: Send,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = MapProducer {
+                    base,
+                    map_op: &self.map_op,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct MapProducer<'f, P, F> {
+    base: P,
+    map_op: &'f F,
+}
+
+impl<'f, P, F, R> Producer for MapProducer<'f, P, F>
+where
+    P: Producer,
+    F: Fn(P::Item) -> R + Sync,
+    R: Send,
+{
+    type Item = F::Output;
+    type IntoIter = iter::Map<P::IntoIter, &'f F>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter().map(self.map_op)
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            MapProducer {
+                base: left,
+                map_op: self.map_op,
+            },
+            MapProducer {
+                base: right,
+                map_op: self.map_op,
+            },
+        )
+    }
+
+    fn fold_with<G>(self, folder: G) -> G
+    where
+        G: Folder<Self::Item>,
+    {
+        let folder1 = MapFolder {
+            base: folder,
+            map_op: self.map_op,
+        };
+        self.base.fold_with(folder1).base
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct MapConsumer<'f, C, F> {
+    base: C,
+    map_op: &'f F,
+}
+
+impl<'f, C, F> MapConsumer<'f, C, F> {
+    fn new(base: C, map_op: &'f F) -> Self {
+        MapConsumer { base, map_op }
+    }
+}
+
+impl<'f, T, R, C, F> Consumer<T> for MapConsumer<'f, C, F>
+where
+    C: Consumer<F::Output>,
+    F: Fn(T) -> R + Sync,
+    R: Send,
+{
+    type Folder = MapFolder<'f, C::Folder, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            MapConsumer::new(left, self.map_op),
+            MapConsumer::new(right, self.map_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        MapFolder {
+            base: self.base.into_folder(),
+            map_op: self.map_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, R, C, F> UnindexedConsumer<T> for MapConsumer<'f, C, F>
+where
+    C: UnindexedConsumer<F::Output>,
+    F: Fn(T) -> R + Sync,
+    R: Send,
+{
+    fn split_off_left(&self) -> Self {
+        MapConsumer::new(self.base.split_off_left(), self.map_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct MapFolder<'f, C, F> {
+    base: C,
+    map_op: &'f F,
+}
+
+impl<'f, T, R, C, F> Folder<T> for MapFolder<'f, C, F>
+where
+    C: Folder<F::Output>,
+    F: Fn(T) -> R,
+{
+    type Result = C::Result;
+
+    fn consume(self, item: T) -> Self {
+        let mapped_item = (self.map_op)(item);
+        MapFolder {
+            base: self.base.consume(mapped_item),
+            map_op: self.map_op,
+        }
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.base = self.base.consume_iter(iter.into_iter().map(self.map_op));
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/map_with.rs.html b/src/rayon/iter/map_with.rs.html new file mode 100644 index 0000000000..7cf2dacae2 --- /dev/null +++ b/src/rayon/iter/map_with.rs.html @@ -0,0 +1,1149 @@ +map_with.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// `MapWith` is an iterator that transforms the elements of an underlying iterator.
+///
+/// This struct is created by the [`map_with()`] method on [`ParallelIterator`]
+///
+/// [`map_with()`]: trait.ParallelIterator.html#method.map_with
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct MapWith<I: ParallelIterator, T, F> {
+    base: I,
+    item: T,
+    map_op: F,
+}
+
+impl<I: ParallelIterator + Debug, T: Debug, F> Debug for MapWith<I, T, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("MapWith")
+            .field("base", &self.base)
+            .field("item", &self.item)
+            .finish()
+    }
+}
+
+impl<I, T, F> MapWith<I, T, F>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `MapWith` iterator.
+    pub(super) fn new(base: I, item: T, map_op: F) -> Self {
+        MapWith { base, item, map_op }
+    }
+}
+
+impl<I, T, F, R> ParallelIterator for MapWith<I, T, F>
+where
+    I: ParallelIterator,
+    T: Send + Clone,
+    F: Fn(&mut T, I::Item) -> R + Sync + Send,
+    R: Send,
+{
+    type Item = R;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = MapWithConsumer::new(consumer, self.item, &self.map_op);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<I, T, F, R> IndexedParallelIterator for MapWith<I, T, F>
+where
+    I: IndexedParallelIterator,
+    T: Send + Clone,
+    F: Fn(&mut T, I::Item) -> R + Sync + Send,
+    R: Send,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = MapWithConsumer::new(consumer, self.item, &self.map_op);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            item: self.item,
+            map_op: self.map_op,
+        });
+
+        struct Callback<CB, U, F> {
+            callback: CB,
+            item: U,
+            map_op: F,
+        }
+
+        impl<T, U, F, R, CB> ProducerCallback<T> for Callback<CB, U, F>
+        where
+            CB: ProducerCallback<R>,
+            U: Send + Clone,
+            F: Fn(&mut U, T) -> R + Sync,
+            R: Send,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = MapWithProducer {
+                    base,
+                    item: self.item,
+                    map_op: &self.map_op,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct MapWithProducer<'f, P, U, F> {
+    base: P,
+    item: U,
+    map_op: &'f F,
+}
+
+impl<'f, P, U, F, R> Producer for MapWithProducer<'f, P, U, F>
+where
+    P: Producer,
+    U: Send + Clone,
+    F: Fn(&mut U, P::Item) -> R + Sync,
+    R: Send,
+{
+    type Item = R;
+    type IntoIter = MapWithIter<'f, P::IntoIter, U, F>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        MapWithIter {
+            base: self.base.into_iter(),
+            item: self.item,
+            map_op: self.map_op,
+        }
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            MapWithProducer {
+                base: left,
+                item: self.item.clone(),
+                map_op: self.map_op,
+            },
+            MapWithProducer {
+                base: right,
+                item: self.item,
+                map_op: self.map_op,
+            },
+        )
+    }
+
+    fn fold_with<G>(self, folder: G) -> G
+    where
+        G: Folder<Self::Item>,
+    {
+        let folder1 = MapWithFolder {
+            base: folder,
+            item: self.item,
+            map_op: self.map_op,
+        };
+        self.base.fold_with(folder1).base
+    }
+}
+
+struct MapWithIter<'f, I, U, F> {
+    base: I,
+    item: U,
+    map_op: &'f F,
+}
+
+impl<'f, I, U, F, R> Iterator for MapWithIter<'f, I, U, F>
+where
+    I: Iterator,
+    F: Fn(&mut U, I::Item) -> R + Sync,
+    R: Send,
+{
+    type Item = R;
+
+    fn next(&mut self) -> Option<R> {
+        let item = self.base.next()?;
+        Some((self.map_op)(&mut self.item, item))
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.base.size_hint()
+    }
+}
+
+impl<'f, I, U, F, R> DoubleEndedIterator for MapWithIter<'f, I, U, F>
+where
+    I: DoubleEndedIterator,
+    F: Fn(&mut U, I::Item) -> R + Sync,
+    R: Send,
+{
+    fn next_back(&mut self) -> Option<R> {
+        let item = self.base.next_back()?;
+        Some((self.map_op)(&mut self.item, item))
+    }
+}
+
+impl<'f, I, U, F, R> ExactSizeIterator for MapWithIter<'f, I, U, F>
+where
+    I: ExactSizeIterator,
+    F: Fn(&mut U, I::Item) -> R + Sync,
+    R: Send,
+{
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct MapWithConsumer<'f, C, U, F> {
+    base: C,
+    item: U,
+    map_op: &'f F,
+}
+
+impl<'f, C, U, F> MapWithConsumer<'f, C, U, F> {
+    fn new(base: C, item: U, map_op: &'f F) -> Self {
+        MapWithConsumer { base, item, map_op }
+    }
+}
+
+impl<'f, T, U, R, C, F> Consumer<T> for MapWithConsumer<'f, C, U, F>
+where
+    C: Consumer<R>,
+    U: Send + Clone,
+    F: Fn(&mut U, T) -> R + Sync,
+    R: Send,
+{
+    type Folder = MapWithFolder<'f, C::Folder, U, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            MapWithConsumer::new(left, self.item.clone(), self.map_op),
+            MapWithConsumer::new(right, self.item, self.map_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        MapWithFolder {
+            base: self.base.into_folder(),
+            item: self.item,
+            map_op: self.map_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, U, R, C, F> UnindexedConsumer<T> for MapWithConsumer<'f, C, U, F>
+where
+    C: UnindexedConsumer<R>,
+    U: Send + Clone,
+    F: Fn(&mut U, T) -> R + Sync,
+    R: Send,
+{
+    fn split_off_left(&self) -> Self {
+        MapWithConsumer::new(self.base.split_off_left(), self.item.clone(), self.map_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct MapWithFolder<'f, C, U, F> {
+    base: C,
+    item: U,
+    map_op: &'f F,
+}
+
+impl<'f, T, U, R, C, F> Folder<T> for MapWithFolder<'f, C, U, F>
+where
+    C: Folder<R>,
+    F: Fn(&mut U, T) -> R,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        let mapped_item = (self.map_op)(&mut self.item, item);
+        self.base = self.base.consume(mapped_item);
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        fn with<'f, T, U, R>(
+            item: &'f mut U,
+            map_op: impl Fn(&mut U, T) -> R + 'f,
+        ) -> impl FnMut(T) -> R + 'f {
+            move |x| map_op(item, x)
+        }
+
+        {
+            let mapped_iter = iter.into_iter().map(with(&mut self.item, self.map_op));
+            self.base = self.base.consume_iter(mapped_iter);
+        }
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+// ------------------------------------------------------------------------------------------------
+
+/// `MapInit` is an iterator that transforms the elements of an underlying iterator.
+///
+/// This struct is created by the [`map_init()`] method on [`ParallelIterator`]
+///
+/// [`map_init()`]: trait.ParallelIterator.html#method.map_init
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct MapInit<I: ParallelIterator, INIT, F> {
+    base: I,
+    init: INIT,
+    map_op: F,
+}
+
+impl<I: ParallelIterator + Debug, INIT, F> Debug for MapInit<I, INIT, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("MapInit").field("base", &self.base).finish()
+    }
+}
+
+impl<I, INIT, F> MapInit<I, INIT, F>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `MapInit` iterator.
+    pub(super) fn new(base: I, init: INIT, map_op: F) -> Self {
+        MapInit { base, init, map_op }
+    }
+}
+
+impl<I, INIT, T, F, R> ParallelIterator for MapInit<I, INIT, F>
+where
+    I: ParallelIterator,
+    INIT: Fn() -> T + Sync + Send,
+    F: Fn(&mut T, I::Item) -> R + Sync + Send,
+    R: Send,
+{
+    type Item = R;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = MapInitConsumer::new(consumer, &self.init, &self.map_op);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<I, INIT, T, F, R> IndexedParallelIterator for MapInit<I, INIT, F>
+where
+    I: IndexedParallelIterator,
+    INIT: Fn() -> T + Sync + Send,
+    F: Fn(&mut T, I::Item) -> R + Sync + Send,
+    R: Send,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = MapInitConsumer::new(consumer, &self.init, &self.map_op);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            init: self.init,
+            map_op: self.map_op,
+        });
+
+        struct Callback<CB, INIT, F> {
+            callback: CB,
+            init: INIT,
+            map_op: F,
+        }
+
+        impl<T, INIT, U, F, R, CB> ProducerCallback<T> for Callback<CB, INIT, F>
+        where
+            CB: ProducerCallback<R>,
+            INIT: Fn() -> U + Sync,
+            F: Fn(&mut U, T) -> R + Sync,
+            R: Send,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = MapInitProducer {
+                    base,
+                    init: &self.init,
+                    map_op: &self.map_op,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct MapInitProducer<'f, P, INIT, F> {
+    base: P,
+    init: &'f INIT,
+    map_op: &'f F,
+}
+
+impl<'f, P, INIT, U, F, R> Producer for MapInitProducer<'f, P, INIT, F>
+where
+    P: Producer,
+    INIT: Fn() -> U + Sync,
+    F: Fn(&mut U, P::Item) -> R + Sync,
+    R: Send,
+{
+    type Item = R;
+    type IntoIter = MapWithIter<'f, P::IntoIter, U, F>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        MapWithIter {
+            base: self.base.into_iter(),
+            item: (self.init)(),
+            map_op: self.map_op,
+        }
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            MapInitProducer {
+                base: left,
+                init: self.init,
+                map_op: self.map_op,
+            },
+            MapInitProducer {
+                base: right,
+                init: self.init,
+                map_op: self.map_op,
+            },
+        )
+    }
+
+    fn fold_with<G>(self, folder: G) -> G
+    where
+        G: Folder<Self::Item>,
+    {
+        let folder1 = MapWithFolder {
+            base: folder,
+            item: (self.init)(),
+            map_op: self.map_op,
+        };
+        self.base.fold_with(folder1).base
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct MapInitConsumer<'f, C, INIT, F> {
+    base: C,
+    init: &'f INIT,
+    map_op: &'f F,
+}
+
+impl<'f, C, INIT, F> MapInitConsumer<'f, C, INIT, F> {
+    fn new(base: C, init: &'f INIT, map_op: &'f F) -> Self {
+        MapInitConsumer { base, init, map_op }
+    }
+}
+
+impl<'f, T, INIT, U, R, C, F> Consumer<T> for MapInitConsumer<'f, C, INIT, F>
+where
+    C: Consumer<R>,
+    INIT: Fn() -> U + Sync,
+    F: Fn(&mut U, T) -> R + Sync,
+    R: Send,
+{
+    type Folder = MapWithFolder<'f, C::Folder, U, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            MapInitConsumer::new(left, self.init, self.map_op),
+            MapInitConsumer::new(right, self.init, self.map_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        MapWithFolder {
+            base: self.base.into_folder(),
+            item: (self.init)(),
+            map_op: self.map_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, INIT, U, R, C, F> UnindexedConsumer<T> for MapInitConsumer<'f, C, INIT, F>
+where
+    C: UnindexedConsumer<R>,
+    INIT: Fn() -> U + Sync,
+    F: Fn(&mut U, T) -> R + Sync,
+    R: Send,
+{
+    fn split_off_left(&self) -> Self {
+        MapInitConsumer::new(self.base.split_off_left(), self.init, self.map_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/mod.rs.html b/src/rayon/iter/mod.rs.html new file mode 100644 index 0000000000..b277d6e362 --- /dev/null +++ b/src/rayon/iter/mod.rs.html @@ -0,0 +1,7315 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
+2903
+2904
+2905
+2906
+2907
+2908
+2909
+2910
+2911
+2912
+2913
+2914
+2915
+2916
+2917
+2918
+2919
+2920
+2921
+2922
+2923
+2924
+2925
+2926
+2927
+2928
+2929
+2930
+2931
+2932
+2933
+2934
+2935
+2936
+2937
+2938
+2939
+2940
+2941
+2942
+2943
+2944
+2945
+2946
+2947
+2948
+2949
+2950
+2951
+2952
+2953
+2954
+2955
+2956
+2957
+2958
+2959
+2960
+2961
+2962
+2963
+2964
+2965
+2966
+2967
+2968
+2969
+2970
+2971
+2972
+2973
+2974
+2975
+2976
+2977
+2978
+2979
+2980
+2981
+2982
+2983
+2984
+2985
+2986
+2987
+2988
+2989
+2990
+2991
+2992
+2993
+2994
+2995
+2996
+2997
+2998
+2999
+3000
+3001
+3002
+3003
+3004
+3005
+3006
+3007
+3008
+3009
+3010
+3011
+3012
+3013
+3014
+3015
+3016
+3017
+3018
+3019
+3020
+3021
+3022
+3023
+3024
+3025
+3026
+3027
+3028
+3029
+3030
+3031
+3032
+3033
+3034
+3035
+3036
+3037
+3038
+3039
+3040
+3041
+3042
+3043
+3044
+3045
+3046
+3047
+3048
+3049
+3050
+3051
+3052
+3053
+3054
+3055
+3056
+3057
+3058
+3059
+3060
+3061
+3062
+3063
+3064
+3065
+3066
+3067
+3068
+3069
+3070
+3071
+3072
+3073
+3074
+3075
+3076
+3077
+3078
+3079
+3080
+3081
+3082
+3083
+3084
+3085
+3086
+3087
+3088
+3089
+3090
+3091
+3092
+3093
+3094
+3095
+3096
+3097
+3098
+3099
+3100
+3101
+3102
+3103
+3104
+3105
+3106
+3107
+3108
+3109
+3110
+3111
+3112
+3113
+3114
+3115
+3116
+3117
+3118
+3119
+3120
+3121
+3122
+3123
+3124
+3125
+3126
+3127
+3128
+3129
+3130
+3131
+3132
+3133
+3134
+3135
+3136
+3137
+3138
+3139
+3140
+3141
+3142
+3143
+3144
+3145
+3146
+3147
+3148
+3149
+3150
+3151
+3152
+3153
+3154
+3155
+3156
+3157
+3158
+3159
+3160
+3161
+3162
+3163
+3164
+3165
+3166
+3167
+3168
+3169
+3170
+3171
+3172
+3173
+3174
+3175
+3176
+3177
+3178
+3179
+3180
+3181
+3182
+3183
+3184
+3185
+3186
+3187
+3188
+3189
+3190
+3191
+3192
+3193
+3194
+3195
+3196
+3197
+3198
+3199
+3200
+3201
+3202
+3203
+3204
+3205
+3206
+3207
+3208
+3209
+3210
+3211
+3212
+3213
+3214
+3215
+3216
+3217
+3218
+3219
+3220
+3221
+3222
+3223
+3224
+3225
+3226
+3227
+3228
+3229
+3230
+3231
+3232
+3233
+3234
+3235
+3236
+3237
+3238
+3239
+3240
+3241
+3242
+3243
+3244
+3245
+3246
+3247
+3248
+3249
+3250
+3251
+3252
+3253
+3254
+3255
+3256
+3257
+3258
+3259
+3260
+3261
+3262
+3263
+3264
+3265
+3266
+3267
+3268
+3269
+3270
+3271
+3272
+3273
+3274
+3275
+3276
+3277
+3278
+3279
+3280
+3281
+3282
+3283
+3284
+3285
+3286
+3287
+3288
+3289
+3290
+3291
+3292
+3293
+3294
+3295
+3296
+3297
+3298
+3299
+3300
+3301
+3302
+3303
+3304
+3305
+3306
+3307
+3308
+3309
+3310
+3311
+3312
+3313
+3314
+3315
+3316
+3317
+3318
+3319
+3320
+3321
+3322
+3323
+3324
+3325
+3326
+3327
+3328
+3329
+3330
+3331
+3332
+3333
+3334
+3335
+3336
+3337
+3338
+3339
+3340
+3341
+3342
+3343
+3344
+3345
+3346
+3347
+3348
+3349
+3350
+3351
+3352
+3353
+3354
+3355
+3356
+3357
+3358
+3359
+3360
+3361
+3362
+3363
+3364
+3365
+3366
+3367
+3368
+3369
+3370
+3371
+3372
+3373
+3374
+3375
+3376
+3377
+3378
+3379
+3380
+3381
+3382
+3383
+3384
+3385
+3386
+3387
+3388
+3389
+3390
+3391
+3392
+3393
+3394
+3395
+3396
+3397
+3398
+3399
+3400
+3401
+3402
+3403
+3404
+3405
+3406
+3407
+3408
+3409
+3410
+3411
+3412
+3413
+3414
+3415
+3416
+3417
+3418
+3419
+3420
+3421
+3422
+3423
+3424
+3425
+3426
+3427
+3428
+3429
+3430
+3431
+3432
+3433
+3434
+3435
+3436
+3437
+3438
+3439
+3440
+3441
+3442
+3443
+3444
+3445
+3446
+3447
+3448
+3449
+3450
+3451
+3452
+3453
+3454
+3455
+3456
+3457
+3458
+3459
+3460
+3461
+3462
+3463
+3464
+3465
+3466
+3467
+3468
+3469
+3470
+3471
+3472
+3473
+3474
+3475
+3476
+3477
+3478
+3479
+3480
+3481
+3482
+3483
+3484
+3485
+3486
+3487
+3488
+3489
+3490
+3491
+3492
+3493
+3494
+3495
+3496
+3497
+3498
+3499
+3500
+3501
+3502
+3503
+3504
+3505
+3506
+3507
+3508
+3509
+3510
+3511
+3512
+3513
+3514
+3515
+3516
+3517
+3518
+3519
+3520
+3521
+3522
+3523
+3524
+3525
+3526
+3527
+3528
+3529
+3530
+3531
+3532
+3533
+3534
+3535
+3536
+3537
+3538
+3539
+3540
+3541
+3542
+3543
+3544
+3545
+3546
+3547
+3548
+3549
+3550
+3551
+3552
+3553
+3554
+3555
+3556
+3557
+3558
+3559
+3560
+3561
+3562
+3563
+3564
+3565
+3566
+3567
+3568
+3569
+3570
+3571
+3572
+3573
+3574
+3575
+3576
+3577
+3578
+3579
+3580
+3581
+3582
+3583
+3584
+3585
+3586
+3587
+3588
+3589
+3590
+3591
+3592
+3593
+3594
+3595
+3596
+3597
+3598
+3599
+3600
+3601
+3602
+3603
+3604
+3605
+3606
+3607
+3608
+3609
+3610
+3611
+3612
+3613
+3614
+3615
+3616
+3617
+3618
+3619
+3620
+3621
+3622
+3623
+3624
+3625
+3626
+3627
+3628
+3629
+3630
+3631
+3632
+3633
+3634
+3635
+3636
+3637
+3638
+3639
+3640
+3641
+3642
+3643
+3644
+3645
+3646
+3647
+3648
+3649
+3650
+3651
+3652
+3653
+3654
+3655
+3656
+
//! Traits for writing parallel programs using an iterator-style interface
+//!
+//! You will rarely need to interact with this module directly unless you have
+//! need to name one of the iterator types.
+//!
+//! Parallel iterators make it easy to write iterator-like chains that
+//! execute in parallel: typically all you have to do is convert the
+//! first `.iter()` (or `iter_mut()`, `into_iter()`, etc) method into
+//! `par_iter()` (or `par_iter_mut()`, `into_par_iter()`, etc). For
+//! example, to compute the sum of the squares of a sequence of
+//! integers, one might write:
+//!
+//! ```rust
+//! use rayon::prelude::*;
+//! fn sum_of_squares(input: &[i32]) -> i32 {
+//!     input.par_iter()
+//!          .map(|i| i * i)
+//!          .sum()
+//! }
+//! ```
+//!
+//! Or, to increment all the integers in a slice, you could write:
+//!
+//! ```rust
+//! use rayon::prelude::*;
+//! fn increment_all(input: &mut [i32]) {
+//!     input.par_iter_mut()
+//!          .for_each(|p| *p += 1);
+//! }
+//! ```
+//!
+//! To use parallel iterators, first import the traits by adding
+//! something like `use rayon::prelude::*` to your module. You can
+//! then call `par_iter`, `par_iter_mut`, or `into_par_iter` to get a
+//! parallel iterator. Like a [regular iterator][], parallel
+//! iterators work by first constructing a computation and then
+//! executing it.
+//!
+//! In addition to `par_iter()` and friends, some types offer other
+//! ways to create (or consume) parallel iterators:
+//!
+//! - Slices (`&[T]`, `&mut [T]`) offer methods like `par_split` and
+//!   `par_windows`, as well as various parallel sorting
+//!   operations. See [the `ParallelSlice` trait] for the full list.
+//! - Strings (`&str`) offer methods like `par_split` and `par_lines`.
+//!   See [the `ParallelString` trait] for the full list.
+//! - Various collections offer [`par_extend`], which grows a
+//!   collection given a parallel iterator. (If you don't have a
+//!   collection to extend, you can use [`collect()`] to create a new
+//!   one from scratch.)
+//!
+//! [the `ParallelSlice` trait]: ../slice/trait.ParallelSlice.html
+//! [the `ParallelString` trait]: ../str/trait.ParallelString.html
+//! [`par_extend`]: trait.ParallelExtend.html
+//! [`collect()`]: trait.ParallelIterator.html#method.collect
+//!
+//! To see the full range of methods available on parallel iterators,
+//! check out the [`ParallelIterator`] and [`IndexedParallelIterator`]
+//! traits.
+//!
+//! If you'd like to build a custom parallel iterator, or to write your own
+//! combinator, then check out the [split] function and the [plumbing] module.
+//!
+//! [regular iterator]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
+//! [`ParallelIterator`]: trait.ParallelIterator.html
+//! [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+//! [split]: fn.split.html
+//! [plumbing]: plumbing/index.html
+//!
+//! Note: Several of the `ParallelIterator` methods rely on a `Try` trait which
+//! has been deliberately obscured from the public API.  This trait is intended
+//! to mirror the unstable `std::ops::Try` with implementations for `Option` and
+//! `Result`, where `Some`/`Ok` values will let those iterators continue, but
+//! `None`/`Err` values will exit early.
+//!
+//! A note about object safety: It is currently _not_ possible to wrap
+//! a `ParallelIterator` (or any trait that depends on it) using a
+//! `Box<dyn ParallelIterator>` or other kind of dynamic allocation,
+//! because `ParallelIterator` is **not object-safe**.
+//! (This keeps the implementation simpler and allows extra optimizations.)
+
+use self::plumbing::*;
+use self::private::Try;
+pub use either::Either;
+use std::cmp::Ordering;
+use std::collections::LinkedList;
+use std::iter::{Product, Sum};
+use std::ops::{Fn, RangeBounds};
+
+pub mod plumbing;
+
+#[cfg(test)]
+mod test;
+
+// There is a method to the madness here:
+//
+// - These modules are private but expose certain types to the end-user
+//   (e.g., `enumerate::Enumerate`) -- specifically, the types that appear in the
+//   public API surface of the `ParallelIterator` traits.
+// - In **this** module, those public types are always used unprefixed, which forces
+//   us to add a `pub use` and helps identify if we missed anything.
+// - In contrast, items that appear **only** in the body of a method,
+//   e.g. `find::find()`, are always used **prefixed**, so that they
+//   can be readily distinguished.
+
+mod blocks;
+mod chain;
+mod chunks;
+mod cloned;
+mod collect;
+mod copied;
+mod empty;
+mod enumerate;
+mod extend;
+mod filter;
+mod filter_map;
+mod find;
+mod find_first_last;
+mod flat_map;
+mod flat_map_iter;
+mod flatten;
+mod flatten_iter;
+mod fold;
+mod fold_chunks;
+mod fold_chunks_with;
+mod for_each;
+mod from_par_iter;
+mod inspect;
+mod interleave;
+mod interleave_shortest;
+mod intersperse;
+mod len;
+mod map;
+mod map_with;
+mod multizip;
+mod noop;
+mod once;
+mod panic_fuse;
+mod par_bridge;
+mod positions;
+mod product;
+mod reduce;
+mod repeat;
+mod rev;
+mod skip;
+mod skip_any;
+mod skip_any_while;
+mod splitter;
+mod step_by;
+mod sum;
+mod take;
+mod take_any;
+mod take_any_while;
+mod try_fold;
+mod try_reduce;
+mod try_reduce_with;
+mod unzip;
+mod update;
+mod walk_tree;
+mod while_some;
+mod zip;
+mod zip_eq;
+
+pub use self::{
+    blocks::{ExponentialBlocks, UniformBlocks},
+    chain::Chain,
+    chunks::Chunks,
+    cloned::Cloned,
+    copied::Copied,
+    empty::{empty, Empty},
+    enumerate::Enumerate,
+    filter::Filter,
+    filter_map::FilterMap,
+    flat_map::FlatMap,
+    flat_map_iter::FlatMapIter,
+    flatten::Flatten,
+    flatten_iter::FlattenIter,
+    fold::{Fold, FoldWith},
+    fold_chunks::FoldChunks,
+    fold_chunks_with::FoldChunksWith,
+    inspect::Inspect,
+    interleave::Interleave,
+    interleave_shortest::InterleaveShortest,
+    intersperse::Intersperse,
+    len::{MaxLen, MinLen},
+    map::Map,
+    map_with::{MapInit, MapWith},
+    multizip::MultiZip,
+    once::{once, Once},
+    panic_fuse::PanicFuse,
+    par_bridge::{IterBridge, ParallelBridge},
+    positions::Positions,
+    repeat::{repeat, repeatn, Repeat, RepeatN},
+    rev::Rev,
+    skip::Skip,
+    skip_any::SkipAny,
+    skip_any_while::SkipAnyWhile,
+    splitter::{split, Split},
+    step_by::StepBy,
+    take::Take,
+    take_any::TakeAny,
+    take_any_while::TakeAnyWhile,
+    try_fold::{TryFold, TryFoldWith},
+    update::Update,
+    walk_tree::{
+        walk_tree, walk_tree_postfix, walk_tree_prefix, WalkTree, WalkTreePostfix, WalkTreePrefix,
+    },
+    while_some::WhileSome,
+    zip::Zip,
+    zip_eq::ZipEq,
+};
+
+/// `IntoParallelIterator` implements the conversion to a [`ParallelIterator`].
+///
+/// By implementing `IntoParallelIterator` for a type, you define how it will
+/// transformed into an iterator. This is a parallel version of the standard
+/// library's [`std::iter::IntoIterator`] trait.
+///
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+/// [`std::iter::IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
+pub trait IntoParallelIterator {
+    /// The parallel iterator type that will be created.
+    type Iter: ParallelIterator<Item = Self::Item>;
+
+    /// The type of item that the parallel iterator will produce.
+    type Item: Send;
+
+    /// Converts `self` into a parallel iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// println!("counting in parallel:");
+    /// (0..100).into_par_iter()
+    ///     .for_each(|i| println!("{}", i));
+    /// ```
+    ///
+    /// This conversion is often implicit for arguments to methods like [`zip`].
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let v: Vec<_> = (0..5).into_par_iter().zip(5..10).collect();
+    /// assert_eq!(v, [(0, 5), (1, 6), (2, 7), (3, 8), (4, 9)]);
+    /// ```
+    ///
+    /// [`zip`]: trait.IndexedParallelIterator.html#method.zip
+    fn into_par_iter(self) -> Self::Iter;
+}
+
+/// `IntoParallelRefIterator` implements the conversion to a
+/// [`ParallelIterator`], providing shared references to the data.
+///
+/// This is a parallel version of the `iter()` method
+/// defined by various collections.
+///
+/// This trait is automatically implemented
+/// `for I where &I: IntoParallelIterator`. In most cases, users
+/// will want to implement [`IntoParallelIterator`] rather than implement
+/// this trait directly.
+///
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+/// [`IntoParallelIterator`]: trait.IntoParallelIterator.html
+pub trait IntoParallelRefIterator<'data> {
+    /// The type of the parallel iterator that will be returned.
+    type Iter: ParallelIterator<Item = Self::Item>;
+
+    /// The type of item that the parallel iterator will produce.
+    /// This will typically be an `&'data T` reference type.
+    type Item: Send + 'data;
+
+    /// Converts `self` into a parallel iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let v: Vec<_> = (0..100).collect();
+    /// assert_eq!(v.par_iter().sum::<i32>(), 100 * 99 / 2);
+    ///
+    /// // `v.par_iter()` is shorthand for `(&v).into_par_iter()`,
+    /// // producing the exact same references.
+    /// assert!(v.par_iter().zip(&v)
+    ///          .all(|(a, b)| std::ptr::eq(a, b)));
+    /// ```
+    fn par_iter(&'data self) -> Self::Iter;
+}
+
+impl<'data, I: 'data + ?Sized> IntoParallelRefIterator<'data> for I
+where
+    &'data I: IntoParallelIterator,
+{
+    type Iter = <&'data I as IntoParallelIterator>::Iter;
+    type Item = <&'data I as IntoParallelIterator>::Item;
+
+    fn par_iter(&'data self) -> Self::Iter {
+        self.into_par_iter()
+    }
+}
+
+/// `IntoParallelRefMutIterator` implements the conversion to a
+/// [`ParallelIterator`], providing mutable references to the data.
+///
+/// This is a parallel version of the `iter_mut()` method
+/// defined by various collections.
+///
+/// This trait is automatically implemented
+/// `for I where &mut I: IntoParallelIterator`. In most cases, users
+/// will want to implement [`IntoParallelIterator`] rather than implement
+/// this trait directly.
+///
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+/// [`IntoParallelIterator`]: trait.IntoParallelIterator.html
+pub trait IntoParallelRefMutIterator<'data> {
+    /// The type of iterator that will be created.
+    type Iter: ParallelIterator<Item = Self::Item>;
+
+    /// The type of item that will be produced; this is typically an
+    /// `&'data mut T` reference.
+    type Item: Send + 'data;
+
+    /// Creates the parallel iterator from `self`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = vec![0usize; 5];
+    /// v.par_iter_mut().enumerate().for_each(|(i, x)| *x = i);
+    /// assert_eq!(v, [0, 1, 2, 3, 4]);
+    /// ```
+    fn par_iter_mut(&'data mut self) -> Self::Iter;
+}
+
+impl<'data, I: 'data + ?Sized> IntoParallelRefMutIterator<'data> for I
+where
+    &'data mut I: IntoParallelIterator,
+{
+    type Iter = <&'data mut I as IntoParallelIterator>::Iter;
+    type Item = <&'data mut I as IntoParallelIterator>::Item;
+
+    fn par_iter_mut(&'data mut self) -> Self::Iter {
+        self.into_par_iter()
+    }
+}
+
+/// Parallel version of the standard iterator trait.
+///
+/// The combinators on this trait are available on **all** parallel
+/// iterators.  Additional methods can be found on the
+/// [`IndexedParallelIterator`] trait: those methods are only
+/// available for parallel iterators where the number of items is
+/// known in advance (so, e.g., after invoking `filter`, those methods
+/// become unavailable).
+///
+/// For examples of using parallel iterators, see [the docs on the
+/// `iter` module][iter].
+///
+/// [iter]: index.html
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+pub trait ParallelIterator: Sized + Send {
+    /// The type of item that this parallel iterator produces.
+    /// For example, if you use the [`for_each`] method, this is the type of
+    /// item that your closure will be invoked with.
+    ///
+    /// [`for_each`]: #method.for_each
+    type Item: Send;
+
+    /// Executes `OP` on each item produced by the iterator, in parallel.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// (0..100).into_par_iter().for_each(|x| println!("{:?}", x));
+    /// ```
+    fn for_each<OP>(self, op: OP)
+    where
+        OP: Fn(Self::Item) + Sync + Send,
+    {
+        for_each::for_each(self, &op)
+    }
+
+    /// Executes `OP` on the given `init` value with each item produced by
+    /// the iterator, in parallel.
+    ///
+    /// The `init` value will be cloned only as needed to be paired with
+    /// the group of items in each rayon job.  It does not require the type
+    /// to be `Sync`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::sync::mpsc::channel;
+    /// use rayon::prelude::*;
+    ///
+    /// let (sender, receiver) = channel();
+    ///
+    /// (0..5).into_par_iter().for_each_with(sender, |s, x| s.send(x).unwrap());
+    ///
+    /// let mut res: Vec<_> = receiver.iter().collect();
+    ///
+    /// res.sort();
+    ///
+    /// assert_eq!(&res[..], &[0, 1, 2, 3, 4])
+    /// ```
+    fn for_each_with<OP, T>(self, init: T, op: OP)
+    where
+        OP: Fn(&mut T, Self::Item) + Sync + Send,
+        T: Send + Clone,
+    {
+        self.map_with(init, op).collect()
+    }
+
+    /// Executes `OP` on a value returned by `init` with each item produced by
+    /// the iterator, in parallel.
+    ///
+    /// The `init` function will be called only as needed for a value to be
+    /// paired with the group of items in each rayon job.  There is no
+    /// constraint on that returned type at all!
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rand::Rng;
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = vec![0u8; 1_000_000];
+    ///
+    /// v.par_chunks_mut(1000)
+    ///     .for_each_init(
+    ///         || rand::thread_rng(),
+    ///         |rng, chunk| rng.fill(chunk),
+    ///     );
+    ///
+    /// // There's a remote chance that this will fail...
+    /// for i in 0u8..=255 {
+    ///     assert!(v.contains(&i));
+    /// }
+    /// ```
+    fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)
+    where
+        OP: Fn(&mut T, Self::Item) + Sync + Send,
+        INIT: Fn() -> T + Sync + Send,
+    {
+        self.map_init(init, op).collect()
+    }
+
+    /// Executes a fallible `OP` on each item produced by the iterator, in parallel.
+    ///
+    /// If the `OP` returns `Result::Err` or `Option::None`, we will attempt to
+    /// stop processing the rest of the items in the iterator as soon as
+    /// possible, and we will return that terminating value.  Otherwise, we will
+    /// return an empty `Result::Ok(())` or `Option::Some(())`.  If there are
+    /// multiple errors in parallel, it is not specified which will be returned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use std::io::{self, Write};
+    ///
+    /// // This will stop iteration early if there's any write error, like
+    /// // having piped output get closed on the other end.
+    /// (0..100).into_par_iter()
+    ///     .try_for_each(|x| writeln!(io::stdout(), "{:?}", x))
+    ///     .expect("expected no write errors");
+    /// ```
+    fn try_for_each<OP, R>(self, op: OP) -> R
+    where
+        OP: Fn(Self::Item) -> R + Sync + Send,
+        R: Try<Output = ()> + Send,
+    {
+        fn ok<R: Try<Output = ()>>(_: (), _: ()) -> R {
+            R::from_output(())
+        }
+
+        self.map(op).try_reduce(<()>::default, ok)
+    }
+
+    /// Executes a fallible `OP` on the given `init` value with each item
+    /// produced by the iterator, in parallel.
+    ///
+    /// This combines the `init` semantics of [`for_each_with()`] and the
+    /// failure semantics of [`try_for_each()`].
+    ///
+    /// [`for_each_with()`]: #method.for_each_with
+    /// [`try_for_each()`]: #method.try_for_each
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::sync::mpsc::channel;
+    /// use rayon::prelude::*;
+    ///
+    /// let (sender, receiver) = channel();
+    ///
+    /// (0..5).into_par_iter()
+    ///     .try_for_each_with(sender, |s, x| s.send(x))
+    ///     .expect("expected no send errors");
+    ///
+    /// let mut res: Vec<_> = receiver.iter().collect();
+    ///
+    /// res.sort();
+    ///
+    /// assert_eq!(&res[..], &[0, 1, 2, 3, 4])
+    /// ```
+    fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R
+    where
+        OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
+        T: Send + Clone,
+        R: Try<Output = ()> + Send,
+    {
+        fn ok<R: Try<Output = ()>>(_: (), _: ()) -> R {
+            R::from_output(())
+        }
+
+        self.map_with(init, op).try_reduce(<()>::default, ok)
+    }
+
+    /// Executes a fallible `OP` on a value returned by `init` with each item
+    /// produced by the iterator, in parallel.
+    ///
+    /// This combines the `init` semantics of [`for_each_init()`] and the
+    /// failure semantics of [`try_for_each()`].
+    ///
+    /// [`for_each_init()`]: #method.for_each_init
+    /// [`try_for_each()`]: #method.try_for_each
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rand::Rng;
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = vec![0u8; 1_000_000];
+    ///
+    /// v.par_chunks_mut(1000)
+    ///     .try_for_each_init(
+    ///         || rand::thread_rng(),
+    ///         |rng, chunk| rng.try_fill(chunk),
+    ///     )
+    ///     .expect("expected no rand errors");
+    ///
+    /// // There's a remote chance that this will fail...
+    /// for i in 0u8..=255 {
+    ///     assert!(v.contains(&i));
+    /// }
+    /// ```
+    fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R
+    where
+        OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
+        INIT: Fn() -> T + Sync + Send,
+        R: Try<Output = ()> + Send,
+    {
+        fn ok<R: Try<Output = ()>>(_: (), _: ()) -> R {
+            R::from_output(())
+        }
+
+        self.map_init(init, op).try_reduce(<()>::default, ok)
+    }
+
+    /// Counts the number of items in this parallel iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let count = (0..100).into_par_iter().count();
+    ///
+    /// assert_eq!(count, 100);
+    /// ```
+    fn count(self) -> usize {
+        fn one<T>(_: T) -> usize {
+            1
+        }
+
+        self.map(one).sum()
+    }
+
+    /// Applies `map_op` to each item of this iterator, producing a new
+    /// iterator with the results.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut par_iter = (0..5).into_par_iter().map(|x| x * 2);
+    ///
+    /// let doubles: Vec<_> = par_iter.collect();
+    ///
+    /// assert_eq!(&doubles[..], &[0, 2, 4, 6, 8]);
+    /// ```
+    fn map<F, R>(self, map_op: F) -> Map<Self, F>
+    where
+        F: Fn(Self::Item) -> R + Sync + Send,
+        R: Send,
+    {
+        Map::new(self, map_op)
+    }
+
+    /// Applies `map_op` to the given `init` value with each item of this
+    /// iterator, producing a new iterator with the results.
+    ///
+    /// The `init` value will be cloned only as needed to be paired with
+    /// the group of items in each rayon job.  It does not require the type
+    /// to be `Sync`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::sync::mpsc::channel;
+    /// use rayon::prelude::*;
+    ///
+    /// let (sender, receiver) = channel();
+    ///
+    /// let a: Vec<_> = (0..5)
+    ///                 .into_par_iter()            // iterating over i32
+    ///                 .map_with(sender, |s, x| {
+    ///                     s.send(x).unwrap();     // sending i32 values through the channel
+    ///                     x                       // returning i32
+    ///                 })
+    ///                 .collect();                 // collecting the returned values into a vector
+    ///
+    /// let mut b: Vec<_> = receiver.iter()         // iterating over the values in the channel
+    ///                             .collect();     // and collecting them
+    /// b.sort();
+    ///
+    /// assert_eq!(a, b);
+    /// ```
+    fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>
+    where
+        F: Fn(&mut T, Self::Item) -> R + Sync + Send,
+        T: Send + Clone,
+        R: Send,
+    {
+        MapWith::new(self, init, map_op)
+    }
+
+    /// Applies `map_op` to a value returned by `init` with each item of this
+    /// iterator, producing a new iterator with the results.
+    ///
+    /// The `init` function will be called only as needed for a value to be
+    /// paired with the group of items in each rayon job.  There is no
+    /// constraint on that returned type at all!
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rand::Rng;
+    /// use rayon::prelude::*;
+    ///
+    /// let a: Vec<_> = (1i32..1_000_000)
+    ///     .into_par_iter()
+    ///     .map_init(
+    ///         || rand::thread_rng(),  // get the thread-local RNG
+    ///         |rng, x| if rng.gen() { // randomly negate items
+    ///             -x
+    ///         } else {
+    ///             x
+    ///         },
+    ///     ).collect();
+    ///
+    /// // There's a remote chance that this will fail...
+    /// assert!(a.iter().any(|&x| x < 0));
+    /// assert!(a.iter().any(|&x| x > 0));
+    /// ```
+    fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>
+    where
+        F: Fn(&mut T, Self::Item) -> R + Sync + Send,
+        INIT: Fn() -> T + Sync + Send,
+        R: Send,
+    {
+        MapInit::new(self, init, map_op)
+    }
+
+    /// Creates an iterator which clones all of its elements.  This may be
+    /// useful when you have an iterator over `&T`, but you need `T`, and
+    /// that type implements `Clone`. See also [`copied()`].
+    ///
+    /// [`copied()`]: #method.copied
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3];
+    ///
+    /// let v_cloned: Vec<_> = a.par_iter().cloned().collect();
+    ///
+    /// // cloned is the same as .map(|&x| x), for integers
+    /// let v_map: Vec<_> = a.par_iter().map(|&x| x).collect();
+    ///
+    /// assert_eq!(v_cloned, vec![1, 2, 3]);
+    /// assert_eq!(v_map, vec![1, 2, 3]);
+    /// ```
+    fn cloned<'a, T>(self) -> Cloned<Self>
+    where
+        T: 'a + Clone + Send,
+        Self: ParallelIterator<Item = &'a T>,
+    {
+        Cloned::new(self)
+    }
+
+    /// Creates an iterator which copies all of its elements.  This may be
+    /// useful when you have an iterator over `&T`, but you need `T`, and
+    /// that type implements `Copy`. See also [`cloned()`].
+    ///
+    /// [`cloned()`]: #method.cloned
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3];
+    ///
+    /// let v_copied: Vec<_> = a.par_iter().copied().collect();
+    ///
+    /// // copied is the same as .map(|&x| x), for integers
+    /// let v_map: Vec<_> = a.par_iter().map(|&x| x).collect();
+    ///
+    /// assert_eq!(v_copied, vec![1, 2, 3]);
+    /// assert_eq!(v_map, vec![1, 2, 3]);
+    /// ```
+    fn copied<'a, T>(self) -> Copied<Self>
+    where
+        T: 'a + Copy + Send,
+        Self: ParallelIterator<Item = &'a T>,
+    {
+        Copied::new(self)
+    }
+
+    /// Applies `inspect_op` to a reference to each item of this iterator,
+    /// producing a new iterator passing through the original items.  This is
+    /// often useful for debugging to see what's happening in iterator stages.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 4, 2, 3];
+    ///
+    /// // this iterator sequence is complex.
+    /// let sum = a.par_iter()
+    ///             .cloned()
+    ///             .filter(|&x| x % 2 == 0)
+    ///             .reduce(|| 0, |sum, i| sum + i);
+    ///
+    /// println!("{}", sum);
+    ///
+    /// // let's add some inspect() calls to investigate what's happening
+    /// let sum = a.par_iter()
+    ///             .cloned()
+    ///             .inspect(|x| println!("about to filter: {}", x))
+    ///             .filter(|&x| x % 2 == 0)
+    ///             .inspect(|x| println!("made it through filter: {}", x))
+    ///             .reduce(|| 0, |sum, i| sum + i);
+    ///
+    /// println!("{}", sum);
+    /// ```
+    fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>
+    where
+        OP: Fn(&Self::Item) + Sync + Send,
+    {
+        Inspect::new(self, inspect_op)
+    }
+
+    /// Mutates each item of this iterator before yielding it.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let par_iter = (0..5).into_par_iter().update(|x| {*x *= 2;});
+    ///
+    /// let doubles: Vec<_> = par_iter.collect();
+    ///
+    /// assert_eq!(&doubles[..], &[0, 2, 4, 6, 8]);
+    /// ```
+    fn update<F>(self, update_op: F) -> Update<Self, F>
+    where
+        F: Fn(&mut Self::Item) + Sync + Send,
+    {
+        Update::new(self, update_op)
+    }
+
+    /// Applies `filter_op` to each item of this iterator, producing a new
+    /// iterator with only the items that gave `true` results.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut par_iter = (0..10).into_par_iter().filter(|x| x % 2 == 0);
+    ///
+    /// let even_numbers: Vec<_> = par_iter.collect();
+    ///
+    /// assert_eq!(&even_numbers[..], &[0, 2, 4, 6, 8]);
+    /// ```
+    fn filter<P>(self, filter_op: P) -> Filter<Self, P>
+    where
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        Filter::new(self, filter_op)
+    }
+
+    /// Applies `filter_op` to each item of this iterator to get an `Option`,
+    /// producing a new iterator with only the items from `Some` results.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut par_iter = (0..10).into_par_iter()
+    ///                         .filter_map(|x| {
+    ///                             if x % 2 == 0 { Some(x * 3) }
+    ///                             else { None }
+    ///                         });
+    ///
+    /// let even_numbers: Vec<_> = par_iter.collect();
+    ///
+    /// assert_eq!(&even_numbers[..], &[0, 6, 12, 18, 24]);
+    /// ```
+    fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>
+    where
+        P: Fn(Self::Item) -> Option<R> + Sync + Send,
+        R: Send,
+    {
+        FilterMap::new(self, filter_op)
+    }
+
+    /// Applies `map_op` to each item of this iterator to get nested parallel iterators,
+    /// producing a new parallel iterator that flattens these back into one.
+    ///
+    /// See also [`flat_map_iter`](#method.flat_map_iter).
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [[1, 2], [3, 4], [5, 6], [7, 8]];
+    ///
+    /// let par_iter = a.par_iter().cloned().flat_map(|a| a.to_vec());
+    ///
+    /// let vec: Vec<_> = par_iter.collect();
+    ///
+    /// assert_eq!(&vec[..], &[1, 2, 3, 4, 5, 6, 7, 8]);
+    /// ```
+    fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>
+    where
+        F: Fn(Self::Item) -> PI + Sync + Send,
+        PI: IntoParallelIterator,
+    {
+        FlatMap::new(self, map_op)
+    }
+
+    /// Applies `map_op` to each item of this iterator to get nested serial iterators,
+    /// producing a new parallel iterator that flattens these back into one.
+    ///
+    /// # `flat_map_iter` versus `flat_map`
+    ///
+    /// These two methods are similar but behave slightly differently. With [`flat_map`],
+    /// each of the nested iterators must be a parallel iterator, and they will be further
+    /// split up with nested parallelism. With `flat_map_iter`, each nested iterator is a
+    /// sequential `Iterator`, and we only parallelize _between_ them, while the items
+    /// produced by each nested iterator are processed sequentially.
+    ///
+    /// When choosing between these methods, consider whether nested parallelism suits the
+    /// potential iterators at hand. If there's little computation involved, or its length
+    /// is much less than the outer parallel iterator, then it may perform better to avoid
+    /// the overhead of parallelism, just flattening sequentially with `flat_map_iter`.
+    /// If there is a lot of computation, potentially outweighing the outer parallel
+    /// iterator, then the nested parallelism of `flat_map` may be worthwhile.
+    ///
+    /// [`flat_map`]: #method.flat_map
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use std::cell::RefCell;
+    ///
+    /// let a = [[1, 2], [3, 4], [5, 6], [7, 8]];
+    ///
+    /// let par_iter = a.par_iter().flat_map_iter(|a| {
+    ///     // The serial iterator doesn't have to be thread-safe, just its items.
+    ///     let cell_iter = RefCell::new(a.iter().cloned());
+    ///     std::iter::from_fn(move || cell_iter.borrow_mut().next())
+    /// });
+    ///
+    /// let vec: Vec<_> = par_iter.collect();
+    ///
+    /// assert_eq!(&vec[..], &[1, 2, 3, 4, 5, 6, 7, 8]);
+    /// ```
+    fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>
+    where
+        F: Fn(Self::Item) -> SI + Sync + Send,
+        SI: IntoIterator,
+        SI::Item: Send,
+    {
+        FlatMapIter::new(self, map_op)
+    }
+
+    /// An adaptor that flattens parallel-iterable `Item`s into one large iterator.
+    ///
+    /// See also [`flatten_iter`](#method.flatten_iter).
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let x: Vec<Vec<_>> = vec![vec![1, 2], vec![3, 4]];
+    /// let y: Vec<_> = x.into_par_iter().flatten().collect();
+    ///
+    /// assert_eq!(y, vec![1, 2, 3, 4]);
+    /// ```
+    fn flatten(self) -> Flatten<Self>
+    where
+        Self::Item: IntoParallelIterator,
+    {
+        Flatten::new(self)
+    }
+
+    /// An adaptor that flattens serial-iterable `Item`s into one large iterator.
+    ///
+    /// See also [`flatten`](#method.flatten) and the analogous comparison of
+    /// [`flat_map_iter` versus `flat_map`](#flat_map_iter-versus-flat_map).
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let x: Vec<Vec<_>> = vec![vec![1, 2], vec![3, 4]];
+    /// let iters: Vec<_> = x.into_iter().map(Vec::into_iter).collect();
+    /// let y: Vec<_> = iters.into_par_iter().flatten_iter().collect();
+    ///
+    /// assert_eq!(y, vec![1, 2, 3, 4]);
+    /// ```
+    fn flatten_iter(self) -> FlattenIter<Self>
+    where
+        Self::Item: IntoIterator,
+        <Self::Item as IntoIterator>::Item: Send,
+    {
+        FlattenIter::new(self)
+    }
+
+    /// Reduces the items in the iterator into one item using `op`.
+    /// The argument `identity` should be a closure that can produce
+    /// "identity" value which may be inserted into the sequence as
+    /// needed to create opportunities for parallel execution. So, for
+    /// example, if you are doing a summation, then `identity()` ought
+    /// to produce something that represents the zero for your type
+    /// (but consider just calling `sum()` in that case).
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// // Iterate over a sequence of pairs `(x0, y0), ..., (xN, yN)`
+    /// // and use reduce to compute one pair `(x0 + ... + xN, y0 + ... + yN)`
+    /// // where the first/second elements are summed separately.
+    /// use rayon::prelude::*;
+    /// let sums = [(0, 1), (5, 6), (16, 2), (8, 9)]
+    ///            .par_iter()        // iterating over &(i32, i32)
+    ///            .cloned()          // iterating over (i32, i32)
+    ///            .reduce(|| (0, 0), // the "identity" is 0 in both columns
+    ///                    |a, b| (a.0 + b.0, a.1 + b.1));
+    /// assert_eq!(sums, (0 + 5 + 16 + 8, 1 + 6 + 2 + 9));
+    /// ```
+    ///
+    /// **Note:** unlike a sequential `fold` operation, the order in
+    /// which `op` will be applied to reduce the result is not fully
+    /// specified. So `op` should be [associative] or else the results
+    /// will be non-deterministic. And of course `identity()` should
+    /// produce a true identity.
+    ///
+    /// [associative]: https://en.wikipedia.org/wiki/Associative_property
+    fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item
+    where
+        OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
+        ID: Fn() -> Self::Item + Sync + Send,
+    {
+        reduce::reduce(self, identity, op)
+    }
+
+    /// Reduces the items in the iterator into one item using `op`.
+    /// If the iterator is empty, `None` is returned; otherwise,
+    /// `Some` is returned.
+    ///
+    /// This version of `reduce` is simple but somewhat less
+    /// efficient. If possible, it is better to call `reduce()`, which
+    /// requires an identity element.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let sums = [(0, 1), (5, 6), (16, 2), (8, 9)]
+    ///            .par_iter()        // iterating over &(i32, i32)
+    ///            .cloned()          // iterating over (i32, i32)
+    ///            .reduce_with(|a, b| (a.0 + b.0, a.1 + b.1))
+    ///            .unwrap();
+    /// assert_eq!(sums, (0 + 5 + 16 + 8, 1 + 6 + 2 + 9));
+    /// ```
+    ///
+    /// **Note:** unlike a sequential `fold` operation, the order in
+    /// which `op` will be applied to reduce the result is not fully
+    /// specified. So `op` should be [associative] or else the results
+    /// will be non-deterministic.
+    ///
+    /// [associative]: https://en.wikipedia.org/wiki/Associative_property
+    fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>
+    where
+        OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
+    {
+        fn opt_fold<T>(op: impl Fn(T, T) -> T) -> impl Fn(Option<T>, T) -> Option<T> {
+            move |opt_a, b| match opt_a {
+                Some(a) => Some(op(a, b)),
+                None => Some(b),
+            }
+        }
+
+        fn opt_reduce<T>(op: impl Fn(T, T) -> T) -> impl Fn(Option<T>, Option<T>) -> Option<T> {
+            move |opt_a, opt_b| match (opt_a, opt_b) {
+                (Some(a), Some(b)) => Some(op(a, b)),
+                (Some(v), None) | (None, Some(v)) => Some(v),
+                (None, None) => None,
+            }
+        }
+
+        self.fold(<_>::default, opt_fold(&op))
+            .reduce(<_>::default, opt_reduce(&op))
+    }
+
+    /// Reduces the items in the iterator into one item using a fallible `op`.
+    /// The `identity` argument is used the same way as in [`reduce()`].
+    ///
+    /// [`reduce()`]: #method.reduce
+    ///
+    /// If a `Result::Err` or `Option::None` item is found, or if `op` reduces
+    /// to one, we will attempt to stop processing the rest of the items in the
+    /// iterator as soon as possible, and we will return that terminating value.
+    /// Otherwise, we will return the final reduced `Result::Ok(T)` or
+    /// `Option::Some(T)`.  If there are multiple errors in parallel, it is not
+    /// specified which will be returned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// // Compute the sum of squares, being careful about overflow.
+    /// fn sum_squares<I: IntoParallelIterator<Item = i32>>(iter: I) -> Option<i32> {
+    ///     iter.into_par_iter()
+    ///         .map(|i| i.checked_mul(i))            // square each item,
+    ///         .try_reduce(|| 0, i32::checked_add)   // and add them up!
+    /// }
+    /// assert_eq!(sum_squares(0..5), Some(0 + 1 + 4 + 9 + 16));
+    ///
+    /// // The sum might overflow
+    /// assert_eq!(sum_squares(0..10_000), None);
+    ///
+    /// // Or the squares might overflow before it even reaches `try_reduce`
+    /// assert_eq!(sum_squares(1_000_000..1_000_001), None);
+    /// ```
+    fn try_reduce<T, OP, ID>(self, identity: ID, op: OP) -> Self::Item
+    where
+        OP: Fn(T, T) -> Self::Item + Sync + Send,
+        ID: Fn() -> T + Sync + Send,
+        Self::Item: Try<Output = T>,
+    {
+        try_reduce::try_reduce(self, identity, op)
+    }
+
+    /// Reduces the items in the iterator into one item using a fallible `op`.
+    ///
+    /// Like [`reduce_with()`], if the iterator is empty, `None` is returned;
+    /// otherwise, `Some` is returned.  Beyond that, it behaves like
+    /// [`try_reduce()`] for handling `Err`/`None`.
+    ///
+    /// [`reduce_with()`]: #method.reduce_with
+    /// [`try_reduce()`]: #method.try_reduce
+    ///
+    /// For instance, with `Option` items, the return value may be:
+    /// - `None`, the iterator was empty
+    /// - `Some(None)`, we stopped after encountering `None`.
+    /// - `Some(Some(x))`, the entire iterator reduced to `x`.
+    ///
+    /// With `Result` items, the nesting is more obvious:
+    /// - `None`, the iterator was empty
+    /// - `Some(Err(e))`, we stopped after encountering an error `e`.
+    /// - `Some(Ok(x))`, the entire iterator reduced to `x`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let files = ["/dev/null", "/does/not/exist"];
+    ///
+    /// // Find the biggest file
+    /// files.into_par_iter()
+    ///     .map(|path| std::fs::metadata(path).map(|m| (path, m.len())))
+    ///     .try_reduce_with(|a, b| {
+    ///         Ok(if a.1 >= b.1 { a } else { b })
+    ///     })
+    ///     .expect("Some value, since the iterator is not empty")
+    ///     .expect_err("not found");
+    /// ```
+    fn try_reduce_with<T, OP>(self, op: OP) -> Option<Self::Item>
+    where
+        OP: Fn(T, T) -> Self::Item + Sync + Send,
+        Self::Item: Try<Output = T>,
+    {
+        try_reduce_with::try_reduce_with(self, op)
+    }
+
+    /// Parallel fold is similar to sequential fold except that the
+    /// sequence of items may be subdivided before it is
+    /// folded. Consider a list of numbers like `22 3 77 89 46`. If
+    /// you used sequential fold to add them (`fold(0, |a,b| a+b)`,
+    /// you would wind up first adding 0 + 22, then 22 + 3, then 25 +
+    /// 77, and so forth. The **parallel fold** works similarly except
+    /// that it first breaks up your list into sublists, and hence
+    /// instead of yielding up a single sum at the end, it yields up
+    /// multiple sums. The number of results is nondeterministic, as
+    /// is the point where the breaks occur.
+    ///
+    /// So if we did the same parallel fold (`fold(0, |a,b| a+b)`) on
+    /// our example list, we might wind up with a sequence of two numbers,
+    /// like so:
+    ///
+    /// ```notrust
+    /// 22 3 77 89 46
+    ///       |     |
+    ///     102   135
+    /// ```
+    ///
+    /// Or perhaps these three numbers:
+    ///
+    /// ```notrust
+    /// 22 3 77 89 46
+    ///       |  |  |
+    ///     102 89 46
+    /// ```
+    ///
+    /// In general, Rayon will attempt to find good breaking points
+    /// that keep all of your cores busy.
+    ///
+    /// ### Fold versus reduce
+    ///
+    /// The `fold()` and `reduce()` methods each take an identity element
+    /// and a combining function, but they operate rather differently.
+    ///
+    /// `reduce()` requires that the identity function has the same
+    /// type as the things you are iterating over, and it fully
+    /// reduces the list of items into a single item. So, for example,
+    /// imagine we are iterating over a list of bytes `bytes: [128_u8,
+    /// 64_u8, 64_u8]`. If we used `bytes.reduce(|| 0_u8, |a: u8, b:
+    /// u8| a + b)`, we would get an overflow. This is because `0`,
+    /// `a`, and `b` here are all bytes, just like the numbers in the
+    /// list (I wrote the types explicitly above, but those are the
+    /// only types you can use). To avoid the overflow, we would need
+    /// to do something like `bytes.map(|b| b as u32).reduce(|| 0, |a,
+    /// b| a + b)`, in which case our result would be `256`.
+    ///
+    /// In contrast, with `fold()`, the identity function does not
+    /// have to have the same type as the things you are iterating
+    /// over, and you potentially get back many results. So, if we
+    /// continue with the `bytes` example from the previous paragraph,
+    /// we could do `bytes.fold(|| 0_u32, |a, b| a + (b as u32))` to
+    /// convert our bytes into `u32`. And of course we might not get
+    /// back a single sum.
+    ///
+    /// There is a more subtle distinction as well, though it's
+    /// actually implied by the above points. When you use `reduce()`,
+    /// your reduction function is sometimes called with values that
+    /// were never part of your original parallel iterator (for
+    /// example, both the left and right might be a partial sum). With
+    /// `fold()`, in contrast, the left value in the fold function is
+    /// always the accumulator, and the right value is always from
+    /// your original sequence.
+    ///
+    /// ### Fold vs Map/Reduce
+    ///
+    /// Fold makes sense if you have some operation where it is
+    /// cheaper to create groups of elements at a time. For example,
+    /// imagine collecting characters into a string. If you were going
+    /// to use map/reduce, you might try this:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let s =
+    ///     ['a', 'b', 'c', 'd', 'e']
+    ///     .par_iter()
+    ///     .map(|c: &char| format!("{}", c))
+    ///     .reduce(|| String::new(),
+    ///             |mut a: String, b: String| { a.push_str(&b); a });
+    ///
+    /// assert_eq!(s, "abcde");
+    /// ```
+    ///
+    /// Because reduce produces the same type of element as its input,
+    /// you have to first map each character into a string, and then
+    /// you can reduce them. This means we create one string per
+    /// element in our iterator -- not so great. Using `fold`, we can
+    /// do this instead:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let s =
+    ///     ['a', 'b', 'c', 'd', 'e']
+    ///     .par_iter()
+    ///     .fold(|| String::new(),
+    ///             |mut s: String, c: &char| { s.push(*c); s })
+    ///     .reduce(|| String::new(),
+    ///             |mut a: String, b: String| { a.push_str(&b); a });
+    ///
+    /// assert_eq!(s, "abcde");
+    /// ```
+    ///
+    /// Now `fold` will process groups of our characters at a time,
+    /// and we only make one string per group. We should wind up with
+    /// some small-ish number of strings roughly proportional to the
+    /// number of CPUs you have (it will ultimately depend on how busy
+    /// your processors are). Note that we still need to do a reduce
+    /// afterwards to combine those groups of strings into a single
+    /// string.
+    ///
+    /// You could use a similar trick to save partial results (e.g., a
+    /// cache) or something similar.
+    ///
+    /// ### Combining fold with other operations
+    ///
+    /// You can combine `fold` with `reduce` if you want to produce a
+    /// single value. This is then roughly equivalent to a map/reduce
+    /// combination in effect:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let bytes = 0..22_u8;
+    /// let sum = bytes.into_par_iter()
+    ///                .fold(|| 0_u32, |a: u32, b: u8| a + (b as u32))
+    ///                .sum::<u32>();
+    ///
+    /// assert_eq!(sum, (0..22).sum()); // compare to sequential
+    /// ```
+    fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>
+    where
+        F: Fn(T, Self::Item) -> T + Sync + Send,
+        ID: Fn() -> T + Sync + Send,
+        T: Send,
+    {
+        Fold::new(self, identity, fold_op)
+    }
+
+    /// Applies `fold_op` to the given `init` value with each item of this
+    /// iterator, finally producing the value for further use.
+    ///
+    /// This works essentially like `fold(|| init.clone(), fold_op)`, except
+    /// it doesn't require the `init` type to be `Sync`, nor any other form
+    /// of added synchronization.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let bytes = 0..22_u8;
+    /// let sum = bytes.into_par_iter()
+    ///                .fold_with(0_u32, |a: u32, b: u8| a + (b as u32))
+    ///                .sum::<u32>();
+    ///
+    /// assert_eq!(sum, (0..22).sum()); // compare to sequential
+    /// ```
+    fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>
+    where
+        F: Fn(T, Self::Item) -> T + Sync + Send,
+        T: Send + Clone,
+    {
+        FoldWith::new(self, init, fold_op)
+    }
+
+    /// Performs a fallible parallel fold.
+    ///
+    /// This is a variation of [`fold()`] for operations which can fail with
+    /// `Option::None` or `Result::Err`.  The first such failure stops
+    /// processing the local set of items, without affecting other folds in the
+    /// iterator's subdivisions.
+    ///
+    /// Often, `try_fold()` will be followed by [`try_reduce()`]
+    /// for a final reduction and global short-circuiting effect.
+    ///
+    /// [`fold()`]: #method.fold
+    /// [`try_reduce()`]: #method.try_reduce
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let bytes = 0..22_u8;
+    /// let sum = bytes.into_par_iter()
+    ///                .try_fold(|| 0_u32, |a: u32, b: u8| a.checked_add(b as u32))
+    ///                .try_reduce(|| 0, u32::checked_add);
+    ///
+    /// assert_eq!(sum, Some((0..22).sum())); // compare to sequential
+    /// ```
+    fn try_fold<T, R, ID, F>(self, identity: ID, fold_op: F) -> TryFold<Self, R, ID, F>
+    where
+        F: Fn(T, Self::Item) -> R + Sync + Send,
+        ID: Fn() -> T + Sync + Send,
+        R: Try<Output = T> + Send,
+    {
+        TryFold::new(self, identity, fold_op)
+    }
+
+    /// Performs a fallible parallel fold with a cloneable `init` value.
+    ///
+    /// This combines the `init` semantics of [`fold_with()`] and the failure
+    /// semantics of [`try_fold()`].
+    ///
+    /// [`fold_with()`]: #method.fold_with
+    /// [`try_fold()`]: #method.try_fold
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let bytes = 0..22_u8;
+    /// let sum = bytes.into_par_iter()
+    ///                .try_fold_with(0_u32, |a: u32, b: u8| a.checked_add(b as u32))
+    ///                .try_reduce(|| 0, u32::checked_add);
+    ///
+    /// assert_eq!(sum, Some((0..22).sum())); // compare to sequential
+    /// ```
+    fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>
+    where
+        F: Fn(T, Self::Item) -> R + Sync + Send,
+        R: Try<Output = T> + Send,
+        T: Clone + Send,
+    {
+        TryFoldWith::new(self, init, fold_op)
+    }
+
+    /// Sums up the items in the iterator.
+    ///
+    /// Note that the order in items will be reduced is not specified,
+    /// so if the `+` operator is not truly [associative] \(as is the
+    /// case for floating point numbers), then the results are not
+    /// fully deterministic.
+    ///
+    /// [associative]: https://en.wikipedia.org/wiki/Associative_property
+    ///
+    /// Basically equivalent to `self.reduce(|| 0, |a, b| a + b)`,
+    /// except that the type of `0` and the `+` operation may vary
+    /// depending on the type of value being produced.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 5, 7];
+    ///
+    /// let sum: i32 = a.par_iter().sum();
+    ///
+    /// assert_eq!(sum, 13);
+    /// ```
+    fn sum<S>(self) -> S
+    where
+        S: Send + Sum<Self::Item> + Sum<S>,
+    {
+        sum::sum(self)
+    }
+
+    /// Multiplies all the items in the iterator.
+    ///
+    /// Note that the order in items will be reduced is not specified,
+    /// so if the `*` operator is not truly [associative] \(as is the
+    /// case for floating point numbers), then the results are not
+    /// fully deterministic.
+    ///
+    /// [associative]: https://en.wikipedia.org/wiki/Associative_property
+    ///
+    /// Basically equivalent to `self.reduce(|| 1, |a, b| a * b)`,
+    /// except that the type of `1` and the `*` operation may vary
+    /// depending on the type of value being produced.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// fn factorial(n: u32) -> u32 {
+    ///    (1..n+1).into_par_iter().product()
+    /// }
+    ///
+    /// assert_eq!(factorial(0), 1);
+    /// assert_eq!(factorial(1), 1);
+    /// assert_eq!(factorial(5), 120);
+    /// ```
+    fn product<P>(self) -> P
+    where
+        P: Send + Product<Self::Item> + Product<P>,
+    {
+        product::product(self)
+    }
+
+    /// Computes the minimum of all the items in the iterator. If the
+    /// iterator is empty, `None` is returned; otherwise, `Some(min)`
+    /// is returned.
+    ///
+    /// Note that the order in which the items will be reduced is not
+    /// specified, so if the `Ord` impl is not truly associative, then
+    /// the results are not deterministic.
+    ///
+    /// Basically equivalent to `self.reduce_with(|a, b| Ord::min(a, b))`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [45, 74, 32];
+    ///
+    /// assert_eq!(a.par_iter().min(), Some(&32));
+    ///
+    /// let b: [i32; 0] = [];
+    ///
+    /// assert_eq!(b.par_iter().min(), None);
+    /// ```
+    fn min(self) -> Option<Self::Item>
+    where
+        Self::Item: Ord,
+    {
+        self.reduce_with(Ord::min)
+    }
+
+    /// Computes the minimum of all the items in the iterator with respect to
+    /// the given comparison function. If the iterator is empty, `None` is
+    /// returned; otherwise, `Some(min)` is returned.
+    ///
+    /// Note that the order in which the items will be reduced is not
+    /// specified, so if the comparison function is not associative, then
+    /// the results are not deterministic.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [-3_i32, 77, 53, 240, -1];
+    ///
+    /// assert_eq!(a.par_iter().min_by(|x, y| x.cmp(y)), Some(&-3));
+    /// ```
+    fn min_by<F>(self, f: F) -> Option<Self::Item>
+    where
+        F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
+    {
+        fn min<T>(f: impl Fn(&T, &T) -> Ordering) -> impl Fn(T, T) -> T {
+            move |a, b| match f(&a, &b) {
+                Ordering::Greater => b,
+                _ => a,
+            }
+        }
+
+        self.reduce_with(min(f))
+    }
+
+    /// Computes the item that yields the minimum value for the given
+    /// function. If the iterator is empty, `None` is returned;
+    /// otherwise, `Some(item)` is returned.
+    ///
+    /// Note that the order in which the items will be reduced is not
+    /// specified, so if the `Ord` impl is not truly associative, then
+    /// the results are not deterministic.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [-3_i32, 34, 2, 5, -10, -3, -23];
+    ///
+    /// assert_eq!(a.par_iter().min_by_key(|x| x.abs()), Some(&2));
+    /// ```
+    fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>
+    where
+        K: Ord + Send,
+        F: Sync + Send + Fn(&Self::Item) -> K,
+    {
+        fn key<T, K>(f: impl Fn(&T) -> K) -> impl Fn(T) -> (K, T) {
+            move |x| (f(&x), x)
+        }
+
+        fn min_key<T, K: Ord>(a: (K, T), b: (K, T)) -> (K, T) {
+            match (a.0).cmp(&b.0) {
+                Ordering::Greater => b,
+                _ => a,
+            }
+        }
+
+        let (_, x) = self.map(key(f)).reduce_with(min_key)?;
+        Some(x)
+    }
+
+    /// Computes the maximum of all the items in the iterator. If the
+    /// iterator is empty, `None` is returned; otherwise, `Some(max)`
+    /// is returned.
+    ///
+    /// Note that the order in which the items will be reduced is not
+    /// specified, so if the `Ord` impl is not truly associative, then
+    /// the results are not deterministic.
+    ///
+    /// Basically equivalent to `self.reduce_with(|a, b| Ord::max(a, b))`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [45, 74, 32];
+    ///
+    /// assert_eq!(a.par_iter().max(), Some(&74));
+    ///
+    /// let b: [i32; 0] = [];
+    ///
+    /// assert_eq!(b.par_iter().max(), None);
+    /// ```
+    fn max(self) -> Option<Self::Item>
+    where
+        Self::Item: Ord,
+    {
+        self.reduce_with(Ord::max)
+    }
+
+    /// Computes the maximum of all the items in the iterator with respect to
+    /// the given comparison function. If the iterator is empty, `None` is
+    /// returned; otherwise, `Some(max)` is returned.
+    ///
+    /// Note that the order in which the items will be reduced is not
+    /// specified, so if the comparison function is not associative, then
+    /// the results are not deterministic.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [-3_i32, 77, 53, 240, -1];
+    ///
+    /// assert_eq!(a.par_iter().max_by(|x, y| x.abs().cmp(&y.abs())), Some(&240));
+    /// ```
+    fn max_by<F>(self, f: F) -> Option<Self::Item>
+    where
+        F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
+    {
+        fn max<T>(f: impl Fn(&T, &T) -> Ordering) -> impl Fn(T, T) -> T {
+            move |a, b| match f(&a, &b) {
+                Ordering::Greater => a,
+                _ => b,
+            }
+        }
+
+        self.reduce_with(max(f))
+    }
+
+    /// Computes the item that yields the maximum value for the given
+    /// function. If the iterator is empty, `None` is returned;
+    /// otherwise, `Some(item)` is returned.
+    ///
+    /// Note that the order in which the items will be reduced is not
+    /// specified, so if the `Ord` impl is not truly associative, then
+    /// the results are not deterministic.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [-3_i32, 34, 2, 5, -10, -3, -23];
+    ///
+    /// assert_eq!(a.par_iter().max_by_key(|x| x.abs()), Some(&34));
+    /// ```
+    fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>
+    where
+        K: Ord + Send,
+        F: Sync + Send + Fn(&Self::Item) -> K,
+    {
+        fn key<T, K>(f: impl Fn(&T) -> K) -> impl Fn(T) -> (K, T) {
+            move |x| (f(&x), x)
+        }
+
+        fn max_key<T, K: Ord>(a: (K, T), b: (K, T)) -> (K, T) {
+            match (a.0).cmp(&b.0) {
+                Ordering::Greater => a,
+                _ => b,
+            }
+        }
+
+        let (_, x) = self.map(key(f)).reduce_with(max_key)?;
+        Some(x)
+    }
+
+    /// Takes two iterators and creates a new iterator over both.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [0, 1, 2];
+    /// let b = [9, 8, 7];
+    ///
+    /// let par_iter = a.par_iter().chain(b.par_iter());
+    ///
+    /// let chained: Vec<_> = par_iter.cloned().collect();
+    ///
+    /// assert_eq!(&chained[..], &[0, 1, 2, 9, 8, 7]);
+    /// ```
+    fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>
+    where
+        C: IntoParallelIterator<Item = Self::Item>,
+    {
+        Chain::new(self, chain.into_par_iter())
+    }
+
+    /// Searches for **some** item in the parallel iterator that
+    /// matches the given predicate and returns it. This operation
+    /// is similar to [`find` on sequential iterators][find] but
+    /// the item returned may not be the **first** one in the parallel
+    /// sequence which matches, since we search the entire sequence in parallel.
+    ///
+    /// Once a match is found, we will attempt to stop processing
+    /// the rest of the items in the iterator as soon as possible
+    /// (just as `find` stops iterating once a match is found).
+    ///
+    /// [find]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3, 3];
+    ///
+    /// assert_eq!(a.par_iter().find_any(|&&x| x == 3), Some(&3));
+    ///
+    /// assert_eq!(a.par_iter().find_any(|&&x| x == 100), None);
+    /// ```
+    fn find_any<P>(self, predicate: P) -> Option<Self::Item>
+    where
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        find::find(self, predicate)
+    }
+
+    /// Searches for the sequentially **first** item in the parallel iterator
+    /// that matches the given predicate and returns it.
+    ///
+    /// Once a match is found, all attempts to the right of the match
+    /// will be stopped, while attempts to the left must continue in case
+    /// an earlier match is found.
+    ///
+    /// For added performance, you might consider using `find_first` in conjunction with
+    /// [`by_exponential_blocks()`][IndexedParallelIterator::by_exponential_blocks].
+    ///
+    /// Note that not all parallel iterators have a useful order, much like
+    /// sequential `HashMap` iteration, so "first" may be nebulous.  If you
+    /// just want the first match that discovered anywhere in the iterator,
+    /// `find_any` is a better choice.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3, 3];
+    ///
+    /// assert_eq!(a.par_iter().find_first(|&&x| x == 3), Some(&3));
+    ///
+    /// assert_eq!(a.par_iter().find_first(|&&x| x == 100), None);
+    /// ```
+    fn find_first<P>(self, predicate: P) -> Option<Self::Item>
+    where
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        find_first_last::find_first(self, predicate)
+    }
+
+    /// Searches for the sequentially **last** item in the parallel iterator
+    /// that matches the given predicate and returns it.
+    ///
+    /// Once a match is found, all attempts to the left of the match
+    /// will be stopped, while attempts to the right must continue in case
+    /// a later match is found.
+    ///
+    /// Note that not all parallel iterators have a useful order, much like
+    /// sequential `HashMap` iteration, so "last" may be nebulous.  When the
+    /// order doesn't actually matter to you, `find_any` is a better choice.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3, 3];
+    ///
+    /// assert_eq!(a.par_iter().find_last(|&&x| x == 3), Some(&3));
+    ///
+    /// assert_eq!(a.par_iter().find_last(|&&x| x == 100), None);
+    /// ```
+    fn find_last<P>(self, predicate: P) -> Option<Self::Item>
+    where
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        find_first_last::find_last(self, predicate)
+    }
+
+    /// Applies the given predicate to the items in the parallel iterator
+    /// and returns **any** non-None result of the map operation.
+    ///
+    /// Once a non-None value is produced from the map operation, we will
+    /// attempt to stop processing the rest of the items in the iterator
+    /// as soon as possible.
+    ///
+    /// Note that this method only returns **some** item in the parallel
+    /// iterator that is not None from the map predicate. The item returned
+    /// may not be the **first** non-None value produced in the parallel
+    /// sequence, since the entire sequence is mapped over in parallel.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let c = ["lol", "NaN", "5", "5"];
+    ///
+    /// let found_number = c.par_iter().find_map_any(|s| s.parse().ok());
+    ///
+    /// assert_eq!(found_number, Some(5));
+    /// ```
+    fn find_map_any<P, R>(self, predicate: P) -> Option<R>
+    where
+        P: Fn(Self::Item) -> Option<R> + Sync + Send,
+        R: Send,
+    {
+        fn yes<T>(_: &T) -> bool {
+            true
+        }
+        self.filter_map(predicate).find_any(yes)
+    }
+
+    /// Applies the given predicate to the items in the parallel iterator and
+    /// returns the sequentially **first** non-None result of the map operation.
+    ///
+    /// Once a non-None value is produced from the map operation, all attempts
+    /// to the right of the match will be stopped, while attempts to the left
+    /// must continue in case an earlier match is found.
+    ///
+    /// Note that not all parallel iterators have a useful order, much like
+    /// sequential `HashMap` iteration, so "first" may be nebulous. If you
+    /// just want the first non-None value discovered anywhere in the iterator,
+    /// `find_map_any` is a better choice.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let c = ["lol", "NaN", "2", "5"];
+    ///
+    /// let first_number = c.par_iter().find_map_first(|s| s.parse().ok());
+    ///
+    /// assert_eq!(first_number, Some(2));
+    /// ```
+    fn find_map_first<P, R>(self, predicate: P) -> Option<R>
+    where
+        P: Fn(Self::Item) -> Option<R> + Sync + Send,
+        R: Send,
+    {
+        fn yes<T>(_: &T) -> bool {
+            true
+        }
+        self.filter_map(predicate).find_first(yes)
+    }
+
+    /// Applies the given predicate to the items in the parallel iterator and
+    /// returns the sequentially **last** non-None result of the map operation.
+    ///
+    /// Once a non-None value is produced from the map operation, all attempts
+    /// to the left of the match will be stopped, while attempts to the right
+    /// must continue in case a later match is found.
+    ///
+    /// Note that not all parallel iterators have a useful order, much like
+    /// sequential `HashMap` iteration, so "first" may be nebulous. If you
+    /// just want the first non-None value discovered anywhere in the iterator,
+    /// `find_map_any` is a better choice.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let c = ["lol", "NaN", "2", "5"];
+    ///
+    /// let last_number = c.par_iter().find_map_last(|s| s.parse().ok());
+    ///
+    /// assert_eq!(last_number, Some(5));
+    /// ```
+    fn find_map_last<P, R>(self, predicate: P) -> Option<R>
+    where
+        P: Fn(Self::Item) -> Option<R> + Sync + Send,
+        R: Send,
+    {
+        fn yes<T>(_: &T) -> bool {
+            true
+        }
+        self.filter_map(predicate).find_last(yes)
+    }
+
+    #[doc(hidden)]
+    #[deprecated(note = "parallel `find` does not search in order -- use `find_any`, \\
+                         `find_first`, or `find_last`")]
+    fn find<P>(self, predicate: P) -> Option<Self::Item>
+    where
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        self.find_any(predicate)
+    }
+
+    /// Searches for **some** item in the parallel iterator that
+    /// matches the given predicate, and if so returns true.  Once
+    /// a match is found, we'll attempt to stop process the rest
+    /// of the items.  Proving that there's no match, returning false,
+    /// does require visiting every item.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [0, 12, 3, 4, 0, 23, 0];
+    ///
+    /// let is_valid = a.par_iter().any(|&x| x > 10);
+    ///
+    /// assert!(is_valid);
+    /// ```
+    fn any<P>(self, predicate: P) -> bool
+    where
+        P: Fn(Self::Item) -> bool + Sync + Send,
+    {
+        self.map(predicate).find_any(bool::clone).is_some()
+    }
+
+    /// Tests that every item in the parallel iterator matches the given
+    /// predicate, and if so returns true.  If a counter-example is found,
+    /// we'll attempt to stop processing more items, then return false.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [0, 12, 3, 4, 0, 23, 0];
+    ///
+    /// let is_valid = a.par_iter().all(|&x| x > 10);
+    ///
+    /// assert!(!is_valid);
+    /// ```
+    fn all<P>(self, predicate: P) -> bool
+    where
+        P: Fn(Self::Item) -> bool + Sync + Send,
+    {
+        #[inline]
+        fn is_false(x: &bool) -> bool {
+            !x
+        }
+
+        self.map(predicate).find_any(is_false).is_none()
+    }
+
+    /// Creates an iterator over the `Some` items of this iterator, halting
+    /// as soon as any `None` is found.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use std::sync::atomic::{AtomicUsize, Ordering};
+    ///
+    /// let counter = AtomicUsize::new(0);
+    /// let value = (0_i32..2048)
+    ///     .into_par_iter()
+    ///     .map(|x| {
+    ///              counter.fetch_add(1, Ordering::SeqCst);
+    ///              if x < 1024 { Some(x) } else { None }
+    ///          })
+    ///     .while_some()
+    ///     .max();
+    ///
+    /// assert!(value < Some(1024));
+    /// assert!(counter.load(Ordering::SeqCst) < 2048); // should not have visited every single one
+    /// ```
+    fn while_some<T>(self) -> WhileSome<Self>
+    where
+        Self: ParallelIterator<Item = Option<T>>,
+        T: Send,
+    {
+        WhileSome::new(self)
+    }
+
+    /// Wraps an iterator with a fuse in case of panics, to halt all threads
+    /// as soon as possible.
+    ///
+    /// Panics within parallel iterators are always propagated to the caller,
+    /// but they don't always halt the rest of the iterator right away, due to
+    /// the internal semantics of [`join`]. This adaptor makes a greater effort
+    /// to stop processing other items sooner, with the cost of additional
+    /// synchronization overhead, which may also inhibit some optimizations.
+    ///
+    /// [`join`]: ../fn.join.html#panics
+    ///
+    /// # Examples
+    ///
+    /// If this code didn't use `panic_fuse()`, it would continue processing
+    /// many more items in other threads (with long sleep delays) before the
+    /// panic is finally propagated.
+    ///
+    /// ```should_panic
+    /// use rayon::prelude::*;
+    /// use std::{thread, time};
+    ///
+    /// (0..1_000_000)
+    ///     .into_par_iter()
+    ///     .panic_fuse()
+    ///     .for_each(|i| {
+    ///         // simulate some work
+    ///         thread::sleep(time::Duration::from_secs(1));
+    ///         assert!(i > 0); // oops!
+    ///     });
+    /// ```
+    fn panic_fuse(self) -> PanicFuse<Self> {
+        PanicFuse::new(self)
+    }
+
+    /// Creates a fresh collection containing all the elements produced
+    /// by this parallel iterator.
+    ///
+    /// You may prefer [`collect_into_vec()`] implemented on
+    /// [`IndexedParallelIterator`], if your underlying iterator also implements
+    /// it. [`collect_into_vec()`] allocates efficiently with precise knowledge
+    /// of how many elements the iterator contains, and even allows you to reuse
+    /// an existing vector's backing store rather than allocating a fresh vector.
+    ///
+    /// See also [`collect_vec_list()`][Self::collect_vec_list] for collecting
+    /// into a `LinkedList<Vec<T>>`.
+    ///
+    /// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+    /// [`collect_into_vec()`]:
+    ///     trait.IndexedParallelIterator.html#method.collect_into_vec
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let sync_vec: Vec<_> = (0..100).into_iter().collect();
+    ///
+    /// let async_vec: Vec<_> = (0..100).into_par_iter().collect();
+    ///
+    /// assert_eq!(sync_vec, async_vec);
+    /// ```
+    ///
+    /// You can collect a pair of collections like [`unzip`](#method.unzip)
+    /// for paired items:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [(0, 1), (1, 2), (2, 3), (3, 4)];
+    /// let (first, second): (Vec<_>, Vec<_>) = a.into_par_iter().collect();
+    ///
+    /// assert_eq!(first, [0, 1, 2, 3]);
+    /// assert_eq!(second, [1, 2, 3, 4]);
+    /// ```
+    ///
+    /// Or like [`partition_map`](#method.partition_map) for `Either` items:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use rayon::iter::Either;
+    ///
+    /// let (left, right): (Vec<_>, Vec<_>) = (0..8).into_par_iter().map(|x| {
+    ///     if x % 2 == 0 {
+    ///         Either::Left(x * 4)
+    ///     } else {
+    ///         Either::Right(x * 3)
+    ///     }
+    /// }).collect();
+    ///
+    /// assert_eq!(left, [0, 8, 16, 24]);
+    /// assert_eq!(right, [3, 9, 15, 21]);
+    /// ```
+    ///
+    /// You can even collect an arbitrarily-nested combination of pairs and `Either`:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use rayon::iter::Either;
+    ///
+    /// let (first, (left, right)): (Vec<_>, (Vec<_>, Vec<_>))
+    ///     = (0..8).into_par_iter().map(|x| {
+    ///         if x % 2 == 0 {
+    ///             (x, Either::Left(x * 4))
+    ///         } else {
+    ///             (-x, Either::Right(x * 3))
+    ///         }
+    ///     }).collect();
+    ///
+    /// assert_eq!(first, [0, -1, 2, -3, 4, -5, 6, -7]);
+    /// assert_eq!(left, [0, 8, 16, 24]);
+    /// assert_eq!(right, [3, 9, 15, 21]);
+    /// ```
+    ///
+    /// All of that can _also_ be combined with short-circuiting collection of
+    /// `Result` or `Option` types:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use rayon::iter::Either;
+    ///
+    /// let result: Result<(Vec<_>, (Vec<_>, Vec<_>)), _>
+    ///     = (0..8).into_par_iter().map(|x| {
+    ///         if x > 5 {
+    ///             Err(x)
+    ///         } else if x % 2 == 0 {
+    ///             Ok((x, Either::Left(x * 4)))
+    ///         } else {
+    ///             Ok((-x, Either::Right(x * 3)))
+    ///         }
+    ///     }).collect();
+    ///
+    /// let error = result.unwrap_err();
+    /// assert!(error == 6 || error == 7);
+    /// ```
+    fn collect<C>(self) -> C
+    where
+        C: FromParallelIterator<Self::Item>,
+    {
+        C::from_par_iter(self)
+    }
+
+    /// Unzips the items of a parallel iterator into a pair of arbitrary
+    /// `ParallelExtend` containers.
+    ///
+    /// You may prefer to use `unzip_into_vecs()`, which allocates more
+    /// efficiently with precise knowledge of how many elements the
+    /// iterator contains, and even allows you to reuse existing
+    /// vectors' backing stores rather than allocating fresh vectors.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [(0, 1), (1, 2), (2, 3), (3, 4)];
+    ///
+    /// let (left, right): (Vec<_>, Vec<_>) = a.par_iter().cloned().unzip();
+    ///
+    /// assert_eq!(left, [0, 1, 2, 3]);
+    /// assert_eq!(right, [1, 2, 3, 4]);
+    /// ```
+    ///
+    /// Nested pairs can be unzipped too.
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let (values, (squares, cubes)): (Vec<_>, (Vec<_>, Vec<_>)) = (0..4).into_par_iter()
+    ///     .map(|i| (i, (i * i, i * i * i)))
+    ///     .unzip();
+    ///
+    /// assert_eq!(values, [0, 1, 2, 3]);
+    /// assert_eq!(squares, [0, 1, 4, 9]);
+    /// assert_eq!(cubes, [0, 1, 8, 27]);
+    /// ```
+    fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
+    where
+        Self: ParallelIterator<Item = (A, B)>,
+        FromA: Default + Send + ParallelExtend<A>,
+        FromB: Default + Send + ParallelExtend<B>,
+        A: Send,
+        B: Send,
+    {
+        unzip::unzip(self)
+    }
+
+    /// Partitions the items of a parallel iterator into a pair of arbitrary
+    /// `ParallelExtend` containers.  Items for which the `predicate` returns
+    /// true go into the first container, and the rest go into the second.
+    ///
+    /// Note: unlike the standard `Iterator::partition`, this allows distinct
+    /// collection types for the left and right items.  This is more flexible,
+    /// but may require new type annotations when converting sequential code
+    /// that used type inference assuming the two were the same.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let (left, right): (Vec<_>, Vec<_>) = (0..8).into_par_iter().partition(|x| x % 2 == 0);
+    ///
+    /// assert_eq!(left, [0, 2, 4, 6]);
+    /// assert_eq!(right, [1, 3, 5, 7]);
+    /// ```
+    fn partition<A, B, P>(self, predicate: P) -> (A, B)
+    where
+        A: Default + Send + ParallelExtend<Self::Item>,
+        B: Default + Send + ParallelExtend<Self::Item>,
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        unzip::partition(self, predicate)
+    }
+
+    /// Partitions and maps the items of a parallel iterator into a pair of
+    /// arbitrary `ParallelExtend` containers.  `Either::Left` items go into
+    /// the first container, and `Either::Right` items go into the second.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use rayon::iter::Either;
+    ///
+    /// let (left, right): (Vec<_>, Vec<_>) = (0..8).into_par_iter()
+    ///     .partition_map(|x| {
+    ///         if x % 2 == 0 {
+    ///             Either::Left(x * 4)
+    ///         } else {
+    ///             Either::Right(x * 3)
+    ///         }
+    ///     });
+    ///
+    /// assert_eq!(left, [0, 8, 16, 24]);
+    /// assert_eq!(right, [3, 9, 15, 21]);
+    /// ```
+    ///
+    /// Nested `Either` enums can be split as well.
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use rayon::iter::Either::*;
+    ///
+    /// let ((fizzbuzz, fizz), (buzz, other)): ((Vec<_>, Vec<_>), (Vec<_>, Vec<_>)) = (1..20)
+    ///     .into_par_iter()
+    ///     .partition_map(|x| match (x % 3, x % 5) {
+    ///         (0, 0) => Left(Left(x)),
+    ///         (0, _) => Left(Right(x)),
+    ///         (_, 0) => Right(Left(x)),
+    ///         (_, _) => Right(Right(x)),
+    ///     });
+    ///
+    /// assert_eq!(fizzbuzz, [15]);
+    /// assert_eq!(fizz, [3, 6, 9, 12, 18]);
+    /// assert_eq!(buzz, [5, 10]);
+    /// assert_eq!(other, [1, 2, 4, 7, 8, 11, 13, 14, 16, 17, 19]);
+    /// ```
+    fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)
+    where
+        A: Default + Send + ParallelExtend<L>,
+        B: Default + Send + ParallelExtend<R>,
+        P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
+        L: Send,
+        R: Send,
+    {
+        unzip::partition_map(self, predicate)
+    }
+
+    /// Intersperses clones of an element between items of this iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let x = vec![1, 2, 3];
+    /// let r: Vec<_> = x.into_par_iter().intersperse(-1).collect();
+    ///
+    /// assert_eq!(r, vec![1, -1, 2, -1, 3]);
+    /// ```
+    fn intersperse(self, element: Self::Item) -> Intersperse<Self>
+    where
+        Self::Item: Clone,
+    {
+        Intersperse::new(self, element)
+    }
+
+    /// Creates an iterator that yields `n` elements from *anywhere* in the original iterator.
+    ///
+    /// This is similar to [`IndexedParallelIterator::take`] without being
+    /// constrained to the "first" `n` of the original iterator order. The
+    /// taken items will still maintain their relative order where that is
+    /// visible in `collect`, `reduce`, and similar outputs.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (0..100)
+    ///     .into_par_iter()
+    ///     .filter(|&x| x % 2 == 0)
+    ///     .take_any(5)
+    ///     .collect();
+    ///
+    /// assert_eq!(result.len(), 5);
+    /// assert!(result.windows(2).all(|w| w[0] < w[1]));
+    /// ```
+    fn take_any(self, n: usize) -> TakeAny<Self> {
+        TakeAny::new(self, n)
+    }
+
+    /// Creates an iterator that skips `n` elements from *anywhere* in the original iterator.
+    ///
+    /// This is similar to [`IndexedParallelIterator::skip`] without being
+    /// constrained to the "first" `n` of the original iterator order. The
+    /// remaining items will still maintain their relative order where that is
+    /// visible in `collect`, `reduce`, and similar outputs.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (0..100)
+    ///     .into_par_iter()
+    ///     .filter(|&x| x % 2 == 0)
+    ///     .skip_any(5)
+    ///     .collect();
+    ///
+    /// assert_eq!(result.len(), 45);
+    /// assert!(result.windows(2).all(|w| w[0] < w[1]));
+    /// ```
+    fn skip_any(self, n: usize) -> SkipAny<Self> {
+        SkipAny::new(self, n)
+    }
+
+    /// Creates an iterator that takes elements from *anywhere* in the original iterator
+    /// until the given `predicate` returns `false`.
+    ///
+    /// The `predicate` may be anything -- e.g. it could be checking a fact about the item, a
+    /// global condition unrelated to the item itself, or some combination thereof.
+    ///
+    /// If parallel calls to the `predicate` race and give different results, then the
+    /// `true` results will still take those particular items, while respecting the `false`
+    /// result from elsewhere to skip any further items.
+    ///
+    /// This is similar to [`Iterator::take_while`] without being constrained to the original
+    /// iterator order. The taken items will still maintain their relative order where that is
+    /// visible in `collect`, `reduce`, and similar outputs.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (0..100)
+    ///     .into_par_iter()
+    ///     .take_any_while(|x| *x < 50)
+    ///     .collect();
+    ///
+    /// assert!(result.len() <= 50);
+    /// assert!(result.windows(2).all(|w| w[0] < w[1]));
+    /// ```
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use std::sync::atomic::AtomicUsize;
+    /// use std::sync::atomic::Ordering::Relaxed;
+    ///
+    /// // Collect any group of items that sum <= 1000
+    /// let quota = AtomicUsize::new(1000);
+    /// let result: Vec<_> = (0_usize..100)
+    ///     .into_par_iter()
+    ///     .take_any_while(|&x| {
+    ///         quota.fetch_update(Relaxed, Relaxed, |q| q.checked_sub(x))
+    ///             .is_ok()
+    ///     })
+    ///     .collect();
+    ///
+    /// let sum = result.iter().sum::<usize>();
+    /// assert!(matches!(sum, 902..=1000));
+    /// ```
+    fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>
+    where
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        TakeAnyWhile::new(self, predicate)
+    }
+
+    /// Creates an iterator that skips elements from *anywhere* in the original iterator
+    /// until the given `predicate` returns `false`.
+    ///
+    /// The `predicate` may be anything -- e.g. it could be checking a fact about the item, a
+    /// global condition unrelated to the item itself, or some combination thereof.
+    ///
+    /// If parallel calls to the `predicate` race and give different results, then the
+    /// `true` results will still skip those particular items, while respecting the `false`
+    /// result from elsewhere to skip any further items.
+    ///
+    /// This is similar to [`Iterator::skip_while`] without being constrained to the original
+    /// iterator order. The remaining items will still maintain their relative order where that is
+    /// visible in `collect`, `reduce`, and similar outputs.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (0..100)
+    ///     .into_par_iter()
+    ///     .skip_any_while(|x| *x < 50)
+    ///     .collect();
+    ///
+    /// assert!(result.len() >= 50);
+    /// assert!(result.windows(2).all(|w| w[0] < w[1]));
+    /// ```
+    fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>
+    where
+        P: Fn(&Self::Item) -> bool + Sync + Send,
+    {
+        SkipAnyWhile::new(self, predicate)
+    }
+
+    /// Collects this iterator into a linked list of vectors.
+    ///
+    /// This is useful when you need to condense a parallel iterator into a collection,
+    /// but have no specific requirements for what that collection should be. If you
+    /// plan to store the collection longer-term, `Vec<T>` is, as always, likely the
+    /// best default choice, despite the overhead that comes from concatenating each
+    /// vector. Or, if this is an `IndexedParallelIterator`, you should also prefer to
+    /// just collect to a `Vec<T>`.
+    ///
+    /// Internally, most [`FromParallelIterator`]/[`ParallelExtend`] implementations
+    /// use this strategy; each job collecting their chunk of the iterator to a `Vec<T>`
+    /// and those chunks getting merged into a `LinkedList`, before then extending the
+    /// collection with each vector. This is a very efficient way to collect an
+    /// unindexed parallel iterator, without much intermediate data movement.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # use std::collections::LinkedList;
+    /// use rayon::prelude::*;
+    ///
+    /// let result: LinkedList<Vec<_>> = (0..=100)
+    ///     .into_par_iter()
+    ///     .filter(|x| x % 2 == 0)
+    ///     .flat_map(|x| 0..x)
+    ///     .collect_vec_list();
+    ///
+    /// // `par_iter.collect_vec_list().into_iter().flatten()` turns
+    /// // a parallel iterator into a serial one
+    /// let total_len = result.into_iter().flatten().count();
+    /// assert_eq!(total_len, 2550);
+    /// ```
+    fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>> {
+        match extend::fast_collect(self) {
+            Either::Left(vec) => {
+                let mut list = LinkedList::new();
+                if !vec.is_empty() {
+                    list.push_back(vec);
+                }
+                list
+            }
+            Either::Right(list) => list,
+        }
+    }
+
+    /// Internal method used to define the behavior of this parallel
+    /// iterator. You should not need to call this directly.
+    ///
+    /// This method causes the iterator `self` to start producing
+    /// items and to feed them to the consumer `consumer` one by one.
+    /// It may split the consumer before doing so to create the
+    /// opportunity to produce in parallel.
+    ///
+    /// See the [README] for more details on the internals of parallel
+    /// iterators.
+    ///
+    /// [README]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>;
+
+    /// Internal method used to define the behavior of this parallel
+    /// iterator. You should not need to call this directly.
+    ///
+    /// Returns the number of items produced by this iterator, if known
+    /// statically. This can be used by consumers to trigger special fast
+    /// paths. Therefore, if `Some(_)` is returned, this iterator must only
+    /// use the (indexed) `Consumer` methods when driving a consumer, such
+    /// as `split_at()`. Calling `UnindexedConsumer::split_off_left()` or
+    /// other `UnindexedConsumer` methods -- or returning an inaccurate
+    /// value -- may result in panics.
+    ///
+    /// This method is currently used to optimize `collect` for want
+    /// of true Rust specialization; it may be removed when
+    /// specialization is stable.
+    fn opt_len(&self) -> Option<usize> {
+        None
+    }
+}
+
+impl<T: ParallelIterator> IntoParallelIterator for T {
+    type Iter = T;
+    type Item = T::Item;
+
+    fn into_par_iter(self) -> T {
+        self
+    }
+}
+
+/// An iterator that supports "random access" to its data, meaning
+/// that you can split it at arbitrary indices and draw data from
+/// those points.
+///
+/// **Note:** Not implemented for `u64`, `i64`, `u128`, or `i128` ranges
+// Waiting for `ExactSizeIterator::is_empty` to be stabilized. See rust-lang/rust#35428
+#[allow(clippy::len_without_is_empty)]
+pub trait IndexedParallelIterator: ParallelIterator {
+    /// Divides an iterator into sequential blocks of exponentially-increasing size.
+    ///
+    /// Normally, parallel iterators are recursively divided into tasks in parallel.
+    /// This adaptor changes the default behavior by splitting the iterator into a **sequence**
+    /// of parallel iterators of increasing sizes.
+    /// Sizes grow exponentially in order to avoid creating
+    /// too many blocks. This also allows to balance the current block with all previous ones.
+    ///
+    /// This can have many applications but the most notable ones are:
+    /// - better performance with [`find_first()`][ParallelIterator::find_first]
+    /// - more predictable performance with [`find_any()`][ParallelIterator::find_any]
+    ///   or any interruptible computation
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// assert_eq!((0..10_000).into_par_iter()
+    ///                       .by_exponential_blocks()
+    ///                       .find_first(|&e| e==4_999), Some(4_999))
+    /// ```
+    ///
+    /// In this example, without blocks, rayon will split the initial range into two but all work
+    /// on the right hand side (from 5,000 onwards) is **useless** since the sequential algorithm
+    /// never goes there. This means that if two threads are used there will be **no** speedup **at
+    /// all**.
+    ///
+    /// `by_exponential_blocks` on the other hand will start with the leftmost range from 0
+    /// to `p` (threads number), continue with p to 3p, the 3p to 7p...
+    ///
+    /// Each subrange is treated in parallel, while all subranges are treated sequentially.
+    /// We therefore ensure a logarithmic number of blocks (and overhead) while guaranteeing
+    /// we stop at the first block containing the searched data.
+    fn by_exponential_blocks(self) -> ExponentialBlocks<Self> {
+        ExponentialBlocks::new(self)
+    }
+
+    /// Divides an iterator into sequential blocks of the given size.
+    ///
+    /// Normally, parallel iterators are recursively divided into tasks in parallel.
+    /// This adaptor changes the default behavior by splitting the iterator into a **sequence**
+    /// of parallel iterators of given `block_size`.
+    /// The main application is to obtain better
+    /// memory locality (especially if the reduce operation re-use folded data).
+    ///
+    /// **Panics** if `block_size` is 0.
+    ///
+    /// # Example
+    /// ```
+    /// use rayon::prelude::*;
+    /// // during most reductions v1 and v2 fit the cache
+    /// let v = (0u32..10_000_000)
+    ///     .into_par_iter()
+    ///     .by_uniform_blocks(1_000_000)
+    ///     .fold(Vec::new, |mut v, e| { v.push(e); v})
+    ///     .reduce(Vec::new, |mut v1, mut v2| { v1.append(&mut v2); v1});
+    /// assert_eq!(v, (0u32..10_000_000).collect::<Vec<u32>>());
+    /// ```
+    #[track_caller]
+    fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self> {
+        assert!(block_size != 0, "block_size must not be zero");
+        UniformBlocks::new(self, block_size)
+    }
+
+    /// Collects the results of the iterator into the specified
+    /// vector. The vector is always cleared before execution
+    /// begins. If possible, reusing the vector across calls can lead
+    /// to better performance since it reuses the same backing buffer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// // any prior data will be cleared
+    /// let mut vec = vec![-1, -2, -3];
+    ///
+    /// (0..5).into_par_iter()
+    ///     .collect_into_vec(&mut vec);
+    ///
+    /// assert_eq!(vec, [0, 1, 2, 3, 4]);
+    /// ```
+    fn collect_into_vec(self, target: &mut Vec<Self::Item>) {
+        collect::collect_into_vec(self, target);
+    }
+
+    /// Unzips the results of the iterator into the specified
+    /// vectors. The vectors are always cleared before execution
+    /// begins. If possible, reusing the vectors across calls can lead
+    /// to better performance since they reuse the same backing buffer.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// // any prior data will be cleared
+    /// let mut left = vec![42; 10];
+    /// let mut right = vec![-1; 10];
+    ///
+    /// (10..15).into_par_iter()
+    ///     .enumerate()
+    ///     .unzip_into_vecs(&mut left, &mut right);
+    ///
+    /// assert_eq!(left, [0, 1, 2, 3, 4]);
+    /// assert_eq!(right, [10, 11, 12, 13, 14]);
+    /// ```
+    fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)
+    where
+        Self: IndexedParallelIterator<Item = (A, B)>,
+        A: Send,
+        B: Send,
+    {
+        collect::unzip_into_vecs(self, left, right);
+    }
+
+    /// Iterates over tuples `(A, B)`, where the items `A` are from
+    /// this iterator and `B` are from the iterator given as argument.
+    /// Like the `zip` method on ordinary iterators, if the two
+    /// iterators are of unequal length, you only get the items they
+    /// have in common.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (1..4)
+    ///     .into_par_iter()
+    ///     .zip(vec!['a', 'b', 'c'])
+    ///     .collect();
+    ///
+    /// assert_eq!(result, [(1, 'a'), (2, 'b'), (3, 'c')]);
+    /// ```
+    fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>
+    where
+        Z: IntoParallelIterator,
+        Z::Iter: IndexedParallelIterator,
+    {
+        Zip::new(self, zip_op.into_par_iter())
+    }
+
+    /// The same as `Zip`, but requires that both iterators have the same length.
+    ///
+    /// # Panics
+    /// Will panic if `self` and `zip_op` are not the same length.
+    ///
+    /// ```should_panic
+    /// use rayon::prelude::*;
+    ///
+    /// let one = [1u8];
+    /// let two = [2u8, 2];
+    /// let one_iter = one.par_iter();
+    /// let two_iter = two.par_iter();
+    ///
+    /// // this will panic
+    /// let zipped: Vec<(&u8, &u8)> = one_iter.zip_eq(two_iter).collect();
+    ///
+    /// // we should never get here
+    /// assert_eq!(1, zipped.len());
+    /// ```
+    #[track_caller]
+    fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>
+    where
+        Z: IntoParallelIterator,
+        Z::Iter: IndexedParallelIterator,
+    {
+        let zip_op_iter = zip_op.into_par_iter();
+        assert_eq!(
+            self.len(),
+            zip_op_iter.len(),
+            "iterators must have the same length"
+        );
+        ZipEq::new(self, zip_op_iter)
+    }
+
+    /// Interleaves elements of this iterator and the other given
+    /// iterator. Alternately yields elements from this iterator and
+    /// the given iterator, until both are exhausted. If one iterator
+    /// is exhausted before the other, the last elements are provided
+    /// from the other.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let (x, y) = (vec![1, 2], vec![3, 4, 5, 6]);
+    /// let r: Vec<i32> = x.into_par_iter().interleave(y).collect();
+    /// assert_eq!(r, vec![1, 3, 2, 4, 5, 6]);
+    /// ```
+    fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>
+    where
+        I: IntoParallelIterator<Item = Self::Item>,
+        I::Iter: IndexedParallelIterator<Item = Self::Item>,
+    {
+        Interleave::new(self, other.into_par_iter())
+    }
+
+    /// Interleaves elements of this iterator and the other given
+    /// iterator, until one is exhausted.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let (x, y) = (vec![1, 2, 3, 4], vec![5, 6]);
+    /// let r: Vec<i32> = x.into_par_iter().interleave_shortest(y).collect();
+    /// assert_eq!(r, vec![1, 5, 2, 6, 3]);
+    /// ```
+    fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>
+    where
+        I: IntoParallelIterator<Item = Self::Item>,
+        I::Iter: IndexedParallelIterator<Item = Self::Item>,
+    {
+        InterleaveShortest::new(self, other.into_par_iter())
+    }
+
+    /// Splits an iterator up into fixed-size chunks.
+    ///
+    /// Returns an iterator that returns `Vec`s of the given number of elements.
+    /// If the number of elements in the iterator is not divisible by `chunk_size`,
+    /// the last chunk may be shorter than `chunk_size`.
+    ///
+    /// See also [`par_chunks()`] and [`par_chunks_mut()`] for similar behavior on
+    /// slices, without having to allocate intermediate `Vec`s for the chunks.
+    ///
+    /// [`par_chunks()`]: ../slice/trait.ParallelSlice.html#method.par_chunks
+    /// [`par_chunks_mut()`]: ../slice/trait.ParallelSliceMut.html#method.par_chunks_mut
+    ///
+    /// **Panics** if `chunk_size` is 0.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let a = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    /// let r: Vec<Vec<i32>> = a.into_par_iter().chunks(3).collect();
+    /// assert_eq!(r, vec![vec![1,2,3], vec![4,5,6], vec![7,8,9], vec![10]]);
+    /// ```
+    #[track_caller]
+    fn chunks(self, chunk_size: usize) -> Chunks<Self> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        Chunks::new(self, chunk_size)
+    }
+
+    /// Splits an iterator into fixed-size chunks, performing a sequential [`fold()`] on
+    /// each chunk.
+    ///
+    /// Returns an iterator that produces a folded result for each chunk of items
+    /// produced by this iterator.
+    ///
+    /// This works essentially like:
+    ///
+    /// ```text
+    /// iter.chunks(chunk_size)
+    ///     .map(|chunk|
+    ///         chunk.into_iter()
+    ///             .fold(identity, fold_op)
+    ///     )
+    /// ```
+    ///
+    /// except there is no per-chunk allocation overhead.
+    ///
+    /// [`fold()`]: std::iter::Iterator#method.fold
+    ///
+    /// **Panics** if `chunk_size` is 0.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let nums = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    /// let chunk_sums = nums.into_par_iter().fold_chunks(2, || 0, |a, n| a + n).collect::<Vec<_>>();
+    /// assert_eq!(chunk_sums, vec![3, 7, 11, 15, 19]);
+    /// ```
+    #[track_caller]
+    fn fold_chunks<T, ID, F>(
+        self,
+        chunk_size: usize,
+        identity: ID,
+        fold_op: F,
+    ) -> FoldChunks<Self, ID, F>
+    where
+        ID: Fn() -> T + Send + Sync,
+        F: Fn(T, Self::Item) -> T + Send + Sync,
+        T: Send,
+    {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        FoldChunks::new(self, chunk_size, identity, fold_op)
+    }
+
+    /// Splits an iterator into fixed-size chunks, performing a sequential [`fold()`] on
+    /// each chunk.
+    ///
+    /// Returns an iterator that produces a folded result for each chunk of items
+    /// produced by this iterator.
+    ///
+    /// This works essentially like `fold_chunks(chunk_size, || init.clone(), fold_op)`,
+    /// except it doesn't require the `init` type to be `Sync`, nor any other form of
+    /// added synchronization.
+    ///
+    /// [`fold()`]: std::iter::Iterator#method.fold
+    ///
+    /// **Panics** if `chunk_size` is 0.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let nums = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    /// let chunk_sums = nums.into_par_iter().fold_chunks_with(2, 0, |a, n| a + n).collect::<Vec<_>>();
+    /// assert_eq!(chunk_sums, vec![3, 7, 11, 15, 19]);
+    /// ```
+    #[track_caller]
+    fn fold_chunks_with<T, F>(
+        self,
+        chunk_size: usize,
+        init: T,
+        fold_op: F,
+    ) -> FoldChunksWith<Self, T, F>
+    where
+        T: Send + Clone,
+        F: Fn(T, Self::Item) -> T + Send + Sync,
+    {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        FoldChunksWith::new(self, chunk_size, init, fold_op)
+    }
+
+    /// Lexicographically compares the elements of this `ParallelIterator` with those of
+    /// another.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use std::cmp::Ordering::*;
+    ///
+    /// let x = vec![1, 2, 3];
+    /// assert_eq!(x.par_iter().cmp(&vec![1, 3, 0]), Less);
+    /// assert_eq!(x.par_iter().cmp(&vec![1, 2, 3]), Equal);
+    /// assert_eq!(x.par_iter().cmp(&vec![1, 2]), Greater);
+    /// ```
+    fn cmp<I>(self, other: I) -> Ordering
+    where
+        I: IntoParallelIterator<Item = Self::Item>,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: Ord,
+    {
+        #[inline]
+        fn ordering<T: Ord>((x, y): (T, T)) -> Ordering {
+            Ord::cmp(&x, &y)
+        }
+
+        #[inline]
+        fn inequal(&ord: &Ordering) -> bool {
+            ord != Ordering::Equal
+        }
+
+        let other = other.into_par_iter();
+        let ord_len = self.len().cmp(&other.len());
+        self.zip(other)
+            .map(ordering)
+            .find_first(inequal)
+            .unwrap_or(ord_len)
+    }
+
+    /// Lexicographically compares the elements of this `ParallelIterator` with those of
+    /// another.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use std::cmp::Ordering::*;
+    /// use std::f64::NAN;
+    ///
+    /// let x = vec![1.0, 2.0, 3.0];
+    /// assert_eq!(x.par_iter().partial_cmp(&vec![1.0, 3.0, 0.0]), Some(Less));
+    /// assert_eq!(x.par_iter().partial_cmp(&vec![1.0, 2.0, 3.0]), Some(Equal));
+    /// assert_eq!(x.par_iter().partial_cmp(&vec![1.0, 2.0]), Some(Greater));
+    /// assert_eq!(x.par_iter().partial_cmp(&vec![1.0, NAN]), None);
+    /// ```
+    fn partial_cmp<I>(self, other: I) -> Option<Ordering>
+    where
+        I: IntoParallelIterator,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: PartialOrd<I::Item>,
+    {
+        #[inline]
+        fn ordering<T: PartialOrd<U>, U>((x, y): (T, U)) -> Option<Ordering> {
+            PartialOrd::partial_cmp(&x, &y)
+        }
+
+        #[inline]
+        fn inequal(&ord: &Option<Ordering>) -> bool {
+            ord != Some(Ordering::Equal)
+        }
+
+        let other = other.into_par_iter();
+        let ord_len = self.len().cmp(&other.len());
+        self.zip(other)
+            .map(ordering)
+            .find_first(inequal)
+            .unwrap_or(Some(ord_len))
+    }
+
+    /// Determines if the elements of this `ParallelIterator`
+    /// are equal to those of another
+    fn eq<I>(self, other: I) -> bool
+    where
+        I: IntoParallelIterator,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: PartialEq<I::Item>,
+    {
+        #[inline]
+        fn eq<T: PartialEq<U>, U>((x, y): (T, U)) -> bool {
+            PartialEq::eq(&x, &y)
+        }
+
+        let other = other.into_par_iter();
+        self.len() == other.len() && self.zip(other).all(eq)
+    }
+
+    /// Determines if the elements of this `ParallelIterator`
+    /// are unequal to those of another
+    fn ne<I>(self, other: I) -> bool
+    where
+        I: IntoParallelIterator,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: PartialEq<I::Item>,
+    {
+        !self.eq(other)
+    }
+
+    /// Determines if the elements of this `ParallelIterator`
+    /// are lexicographically less than those of another.
+    fn lt<I>(self, other: I) -> bool
+    where
+        I: IntoParallelIterator,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: PartialOrd<I::Item>,
+    {
+        self.partial_cmp(other) == Some(Ordering::Less)
+    }
+
+    /// Determines if the elements of this `ParallelIterator`
+    /// are less or equal to those of another.
+    fn le<I>(self, other: I) -> bool
+    where
+        I: IntoParallelIterator,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: PartialOrd<I::Item>,
+    {
+        let ord = self.partial_cmp(other);
+        ord == Some(Ordering::Equal) || ord == Some(Ordering::Less)
+    }
+
+    /// Determines if the elements of this `ParallelIterator`
+    /// are lexicographically greater than those of another.
+    fn gt<I>(self, other: I) -> bool
+    where
+        I: IntoParallelIterator,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: PartialOrd<I::Item>,
+    {
+        self.partial_cmp(other) == Some(Ordering::Greater)
+    }
+
+    /// Determines if the elements of this `ParallelIterator`
+    /// are less or equal to those of another.
+    fn ge<I>(self, other: I) -> bool
+    where
+        I: IntoParallelIterator,
+        I::Iter: IndexedParallelIterator,
+        Self::Item: PartialOrd<I::Item>,
+    {
+        let ord = self.partial_cmp(other);
+        ord == Some(Ordering::Equal) || ord == Some(Ordering::Greater)
+    }
+
+    /// Yields an index along with each item.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let chars = vec!['a', 'b', 'c'];
+    /// let result: Vec<_> = chars
+    ///     .into_par_iter()
+    ///     .enumerate()
+    ///     .collect();
+    ///
+    /// assert_eq!(result, [(0, 'a'), (1, 'b'), (2, 'c')]);
+    /// ```
+    fn enumerate(self) -> Enumerate<Self> {
+        Enumerate::new(self)
+    }
+
+    /// Creates an iterator that steps by the given amount
+    ///
+    /// # Examples
+    ///
+    /// ```
+    ///use rayon::prelude::*;
+    ///
+    /// let range = (3..10);
+    /// let result: Vec<i32> = range
+    ///    .into_par_iter()
+    ///    .step_by(3)
+    ///    .collect();
+    ///
+    /// assert_eq!(result, [3, 6, 9])
+    /// ```
+    fn step_by(self, step: usize) -> StepBy<Self> {
+        StepBy::new(self, step)
+    }
+
+    /// Creates an iterator that skips the first `n` elements.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (0..100)
+    ///     .into_par_iter()
+    ///     .skip(95)
+    ///     .collect();
+    ///
+    /// assert_eq!(result, [95, 96, 97, 98, 99]);
+    /// ```
+    fn skip(self, n: usize) -> Skip<Self> {
+        Skip::new(self, n)
+    }
+
+    /// Creates an iterator that yields the first `n` elements.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (0..100)
+    ///     .into_par_iter()
+    ///     .take(5)
+    ///     .collect();
+    ///
+    /// assert_eq!(result, [0, 1, 2, 3, 4]);
+    /// ```
+    fn take(self, n: usize) -> Take<Self> {
+        Take::new(self, n)
+    }
+
+    /// Searches for **some** item in the parallel iterator that
+    /// matches the given predicate, and returns its index.  Like
+    /// `ParallelIterator::find_any`, the parallel search will not
+    /// necessarily find the **first** match, and once a match is
+    /// found we'll attempt to stop processing any more.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3, 3];
+    ///
+    /// let i = a.par_iter().position_any(|&x| x == 3).expect("found");
+    /// assert!(i == 2 || i == 3);
+    ///
+    /// assert_eq!(a.par_iter().position_any(|&x| x == 100), None);
+    /// ```
+    fn position_any<P>(self, predicate: P) -> Option<usize>
+    where
+        P: Fn(Self::Item) -> bool + Sync + Send,
+    {
+        #[inline]
+        fn check(&(_, p): &(usize, bool)) -> bool {
+            p
+        }
+
+        let (i, _) = self.map(predicate).enumerate().find_any(check)?;
+        Some(i)
+    }
+
+    /// Searches for the sequentially **first** item in the parallel iterator
+    /// that matches the given predicate, and returns its index.
+    ///
+    /// Like `ParallelIterator::find_first`, once a match is found,
+    /// all attempts to the right of the match will be stopped, while
+    /// attempts to the left must continue in case an earlier match
+    /// is found.
+    ///
+    /// Note that not all parallel iterators have a useful order, much like
+    /// sequential `HashMap` iteration, so "first" may be nebulous.  If you
+    /// just want the first match that discovered anywhere in the iterator,
+    /// `position_any` is a better choice.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3, 3];
+    ///
+    /// assert_eq!(a.par_iter().position_first(|&x| x == 3), Some(2));
+    ///
+    /// assert_eq!(a.par_iter().position_first(|&x| x == 100), None);
+    /// ```
+    fn position_first<P>(self, predicate: P) -> Option<usize>
+    where
+        P: Fn(Self::Item) -> bool + Sync + Send,
+    {
+        #[inline]
+        fn check(&(_, p): &(usize, bool)) -> bool {
+            p
+        }
+
+        let (i, _) = self.map(predicate).enumerate().find_first(check)?;
+        Some(i)
+    }
+
+    /// Searches for the sequentially **last** item in the parallel iterator
+    /// that matches the given predicate, and returns its index.
+    ///
+    /// Like `ParallelIterator::find_last`, once a match is found,
+    /// all attempts to the left of the match will be stopped, while
+    /// attempts to the right must continue in case a later match
+    /// is found.
+    ///
+    /// Note that not all parallel iterators have a useful order, much like
+    /// sequential `HashMap` iteration, so "last" may be nebulous.  When the
+    /// order doesn't actually matter to you, `position_any` is a better
+    /// choice.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let a = [1, 2, 3, 3];
+    ///
+    /// assert_eq!(a.par_iter().position_last(|&x| x == 3), Some(3));
+    ///
+    /// assert_eq!(a.par_iter().position_last(|&x| x == 100), None);
+    /// ```
+    fn position_last<P>(self, predicate: P) -> Option<usize>
+    where
+        P: Fn(Self::Item) -> bool + Sync + Send,
+    {
+        #[inline]
+        fn check(&(_, p): &(usize, bool)) -> bool {
+            p
+        }
+
+        let (i, _) = self.map(predicate).enumerate().find_last(check)?;
+        Some(i)
+    }
+
+    #[doc(hidden)]
+    #[deprecated(
+        note = "parallel `position` does not search in order -- use `position_any`, \\
+                `position_first`, or `position_last`"
+    )]
+    fn position<P>(self, predicate: P) -> Option<usize>
+    where
+        P: Fn(Self::Item) -> bool + Sync + Send,
+    {
+        self.position_any(predicate)
+    }
+
+    /// Searches for items in the parallel iterator that match the given
+    /// predicate, and returns their indices.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let primes = vec![2, 3, 5, 7, 11, 13, 17, 19, 23, 29];
+    ///
+    /// // Find the positions of primes congruent to 1 modulo 6
+    /// let p1mod6: Vec<_> = primes.par_iter().positions(|&p| p % 6 == 1).collect();
+    /// assert_eq!(p1mod6, [3, 5, 7]); // primes 7, 13, and 19
+    ///
+    /// // Find the positions of primes congruent to 5 modulo 6
+    /// let p5mod6: Vec<_> = primes.par_iter().positions(|&p| p % 6 == 5).collect();
+    /// assert_eq!(p5mod6, [2, 4, 6, 8, 9]); // primes 5, 11, 17, 23, and 29
+    /// ```
+    fn positions<P>(self, predicate: P) -> Positions<Self, P>
+    where
+        P: Fn(Self::Item) -> bool + Sync + Send,
+    {
+        Positions::new(self, predicate)
+    }
+
+    /// Produces a new iterator with the elements of this iterator in
+    /// reverse order.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let result: Vec<_> = (0..5)
+    ///     .into_par_iter()
+    ///     .rev()
+    ///     .collect();
+    ///
+    /// assert_eq!(result, [4, 3, 2, 1, 0]);
+    /// ```
+    fn rev(self) -> Rev<Self> {
+        Rev::new(self)
+    }
+
+    /// Sets the minimum length of iterators desired to process in each
+    /// rayon job.  Rayon will not split any smaller than this length, but
+    /// of course an iterator could already be smaller to begin with.
+    ///
+    /// Producers like `zip` and `interleave` will use greater of the two
+    /// minimums.
+    /// Chained iterators and iterators inside `flat_map` may each use
+    /// their own minimum length.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let min = (0..1_000_000)
+    ///     .into_par_iter()
+    ///     .with_min_len(1234)
+    ///     .fold(|| 0, |acc, _| acc + 1) // count how many are in this segment
+    ///     .min().unwrap();
+    ///
+    /// assert!(min >= 1234);
+    /// ```
+    fn with_min_len(self, min: usize) -> MinLen<Self> {
+        MinLen::new(self, min)
+    }
+
+    /// Sets the maximum length of iterators desired to process in each
+    /// rayon job.  Rayon will try to split at least below this length,
+    /// unless that would put it below the length from `with_min_len()`.
+    /// For example, given min=10 and max=15, a length of 16 will not be
+    /// split any further.
+    ///
+    /// Producers like `zip` and `interleave` will use lesser of the two
+    /// maximums.
+    /// Chained iterators and iterators inside `flat_map` may each use
+    /// their own maximum length.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let max = (0..1_000_000)
+    ///     .into_par_iter()
+    ///     .with_max_len(1234)
+    ///     .fold(|| 0, |acc, _| acc + 1) // count how many are in this segment
+    ///     .max().unwrap();
+    ///
+    /// assert!(max <= 1234);
+    /// ```
+    fn with_max_len(self, max: usize) -> MaxLen<Self> {
+        MaxLen::new(self, max)
+    }
+
+    /// Produces an exact count of how many items this iterator will
+    /// produce, presuming no panic occurs.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let par_iter = (0..100).into_par_iter().zip(vec![0; 10]);
+    /// assert_eq!(par_iter.len(), 10);
+    ///
+    /// let vec: Vec<_> = par_iter.collect();
+    /// assert_eq!(vec.len(), 10);
+    /// ```
+    fn len(&self) -> usize;
+
+    /// Internal method used to define the behavior of this parallel
+    /// iterator. You should not need to call this directly.
+    ///
+    /// This method causes the iterator `self` to start producing
+    /// items and to feed them to the consumer `consumer` one by one.
+    /// It may split the consumer before doing so to create the
+    /// opportunity to produce in parallel. If a split does happen, it
+    /// will inform the consumer of the index where the split should
+    /// occur (unlike `ParallelIterator::drive_unindexed()`).
+    ///
+    /// See the [README] for more details on the internals of parallel
+    /// iterators.
+    ///
+    /// [README]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result;
+
+    /// Internal method used to define the behavior of this parallel
+    /// iterator. You should not need to call this directly.
+    ///
+    /// This method converts the iterator into a producer P and then
+    /// invokes `callback.callback()` with P. Note that the type of
+    /// this producer is not defined as part of the API, since
+    /// `callback` must be defined generically for all producers. This
+    /// allows the producer type to contain references; it also means
+    /// that parallel iterators can adjust that type without causing a
+    /// breaking change.
+    ///
+    /// See the [README] for more details on the internals of parallel
+    /// iterators.
+    ///
+    /// [README]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md
+    fn with_producer<CB: ProducerCallback<Self::Item>>(self, callback: CB) -> CB::Output;
+}
+
+/// `FromParallelIterator` implements the creation of a collection
+/// from a [`ParallelIterator`]. By implementing
+/// `FromParallelIterator` for a given type, you define how it will be
+/// created from an iterator.
+///
+/// `FromParallelIterator` is used through [`ParallelIterator`]'s [`collect()`] method.
+///
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+/// [`collect()`]: trait.ParallelIterator.html#method.collect
+///
+/// # Examples
+///
+/// Implementing `FromParallelIterator` for your type:
+///
+/// ```
+/// use rayon::prelude::*;
+/// use std::mem;
+///
+/// struct BlackHole {
+///     mass: usize,
+/// }
+///
+/// impl<T: Send> FromParallelIterator<T> for BlackHole {
+///     fn from_par_iter<I>(par_iter: I) -> Self
+///         where I: IntoParallelIterator<Item = T>
+///     {
+///         let par_iter = par_iter.into_par_iter();
+///         BlackHole {
+///             mass: par_iter.count() * mem::size_of::<T>(),
+///         }
+///     }
+/// }
+///
+/// let bh: BlackHole = (0i32..1000).into_par_iter().collect();
+/// assert_eq!(bh.mass, 4000);
+/// ```
+pub trait FromParallelIterator<T>
+where
+    T: Send,
+{
+    /// Creates an instance of the collection from the parallel iterator `par_iter`.
+    ///
+    /// If your collection is not naturally parallel, the easiest (and
+    /// fastest) way to do this is often to collect `par_iter` into a
+    /// [`LinkedList`] (via [`collect_vec_list`]) or another intermediate
+    /// data structure and then sequentially extend your collection. However,
+    /// a more 'native' technique is to use the [`par_iter.fold`] or
+    /// [`par_iter.fold_with`] methods to create the collection.
+    /// Alternatively, if your collection is 'natively' parallel, you
+    /// can use `par_iter.for_each` to process each element in turn.
+    ///
+    /// [`LinkedList`]: https://doc.rust-lang.org/std/collections/struct.LinkedList.html
+    /// [`collect_vec_list`]: ParallelIterator::collect_vec_list
+    /// [`par_iter.fold`]: trait.ParallelIterator.html#method.fold
+    /// [`par_iter.fold_with`]: trait.ParallelIterator.html#method.fold_with
+    /// [`par_iter.for_each`]: trait.ParallelIterator.html#method.for_each
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = T>;
+}
+
+/// `ParallelExtend` extends an existing collection with items from a [`ParallelIterator`].
+///
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+///
+/// # Examples
+///
+/// Implementing `ParallelExtend` for your type:
+///
+/// ```
+/// use rayon::prelude::*;
+/// use std::mem;
+///
+/// struct BlackHole {
+///     mass: usize,
+/// }
+///
+/// impl<T: Send> ParallelExtend<T> for BlackHole {
+///     fn par_extend<I>(&mut self, par_iter: I)
+///         where I: IntoParallelIterator<Item = T>
+///     {
+///         let par_iter = par_iter.into_par_iter();
+///         self.mass += par_iter.count() * mem::size_of::<T>();
+///     }
+/// }
+///
+/// let mut bh = BlackHole { mass: 0 };
+/// bh.par_extend(0i32..1000);
+/// assert_eq!(bh.mass, 4000);
+/// bh.par_extend(0i64..10);
+/// assert_eq!(bh.mass, 4080);
+/// ```
+pub trait ParallelExtend<T>
+where
+    T: Send,
+{
+    /// Extends an instance of the collection with the elements drawn
+    /// from the parallel iterator `par_iter`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut vec = vec![];
+    /// vec.par_extend(0..5);
+    /// vec.par_extend((0..5).into_par_iter().map(|i| i * i));
+    /// assert_eq!(vec, [0, 1, 2, 3, 4, 0, 1, 4, 9, 16]);
+    /// ```
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>;
+}
+
+/// `ParallelDrainFull` creates a parallel iterator that moves all items
+/// from a collection while retaining the original capacity.
+///
+/// Types which are indexable typically implement [`ParallelDrainRange`]
+/// instead, where you can drain fully with `par_drain(..)`.
+///
+/// [`ParallelDrainRange`]: trait.ParallelDrainRange.html
+pub trait ParallelDrainFull {
+    /// The draining parallel iterator type that will be created.
+    type Iter: ParallelIterator<Item = Self::Item>;
+
+    /// The type of item that the parallel iterator will produce.
+    /// This is usually the same as `IntoParallelIterator::Item`.
+    type Item: Send;
+
+    /// Returns a draining parallel iterator over an entire collection.
+    ///
+    /// When the iterator is dropped, all items are removed, even if the
+    /// iterator was not fully consumed. If the iterator is leaked, for example
+    /// using `std::mem::forget`, it is unspecified how many items are removed.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// use std::collections::{BinaryHeap, HashSet};
+    ///
+    /// let squares: HashSet<i32> = (0..10).map(|x| x * x).collect();
+    ///
+    /// let mut heap: BinaryHeap<_> = squares.iter().copied().collect();
+    /// assert_eq!(
+    ///     // heaps are drained in arbitrary order
+    ///     heap.par_drain()
+    ///         .inspect(|x| assert!(squares.contains(x)))
+    ///         .count(),
+    ///     squares.len(),
+    /// );
+    /// assert!(heap.is_empty());
+    /// assert!(heap.capacity() >= squares.len());
+    /// ```
+    fn par_drain(self) -> Self::Iter;
+}
+
+/// `ParallelDrainRange` creates a parallel iterator that moves a range of items
+/// from a collection while retaining the original capacity.
+///
+/// Types which are not indexable may implement [`ParallelDrainFull`] instead.
+///
+/// [`ParallelDrainFull`]: trait.ParallelDrainFull.html
+pub trait ParallelDrainRange<Idx = usize> {
+    /// The draining parallel iterator type that will be created.
+    type Iter: ParallelIterator<Item = Self::Item>;
+
+    /// The type of item that the parallel iterator will produce.
+    /// This is usually the same as `IntoParallelIterator::Item`.
+    type Item: Send;
+
+    /// Returns a draining parallel iterator over a range of the collection.
+    ///
+    /// When the iterator is dropped, all items in the range are removed, even
+    /// if the iterator was not fully consumed. If the iterator is leaked, for
+    /// example using `std::mem::forget`, it is unspecified how many items are
+    /// removed.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let squares: Vec<i32> = (0..10).map(|x| x * x).collect();
+    ///
+    /// println!("RangeFull");
+    /// let mut vec = squares.clone();
+    /// assert!(vec.par_drain(..)
+    ///            .eq(squares.par_iter().copied()));
+    /// assert!(vec.is_empty());
+    /// assert!(vec.capacity() >= squares.len());
+    ///
+    /// println!("RangeFrom");
+    /// let mut vec = squares.clone();
+    /// assert!(vec.par_drain(5..)
+    ///            .eq(squares[5..].par_iter().copied()));
+    /// assert_eq!(&vec[..], &squares[..5]);
+    /// assert!(vec.capacity() >= squares.len());
+    ///
+    /// println!("RangeTo");
+    /// let mut vec = squares.clone();
+    /// assert!(vec.par_drain(..5)
+    ///            .eq(squares[..5].par_iter().copied()));
+    /// assert_eq!(&vec[..], &squares[5..]);
+    /// assert!(vec.capacity() >= squares.len());
+    ///
+    /// println!("RangeToInclusive");
+    /// let mut vec = squares.clone();
+    /// assert!(vec.par_drain(..=5)
+    ///            .eq(squares[..=5].par_iter().copied()));
+    /// assert_eq!(&vec[..], &squares[6..]);
+    /// assert!(vec.capacity() >= squares.len());
+    ///
+    /// println!("Range");
+    /// let mut vec = squares.clone();
+    /// assert!(vec.par_drain(3..7)
+    ///            .eq(squares[3..7].par_iter().copied()));
+    /// assert_eq!(&vec[..3], &squares[..3]);
+    /// assert_eq!(&vec[3..], &squares[7..]);
+    /// assert!(vec.capacity() >= squares.len());
+    ///
+    /// println!("RangeInclusive");
+    /// let mut vec = squares.clone();
+    /// assert!(vec.par_drain(3..=7)
+    ///            .eq(squares[3..=7].par_iter().copied()));
+    /// assert_eq!(&vec[..3], &squares[..3]);
+    /// assert_eq!(&vec[3..], &squares[8..]);
+    /// assert!(vec.capacity() >= squares.len());
+    /// ```
+    fn par_drain<R: RangeBounds<Idx>>(self, range: R) -> Self::Iter;
+}
+
+/// We hide the `Try` trait in a private module, as it's only meant to be a
+/// stable clone of the standard library's `Try` trait, as yet unstable.
+mod private {
+    use std::convert::Infallible;
+    use std::ops::ControlFlow::{self, Break, Continue};
+    use std::task::Poll;
+
+    /// Clone of `std::ops::Try`.
+    ///
+    /// Implementing this trait is not permitted outside of `rayon`.
+    pub trait Try {
+        private_decl! {}
+
+        type Output;
+        type Residual;
+
+        fn from_output(output: Self::Output) -> Self;
+
+        fn from_residual(residual: Self::Residual) -> Self;
+
+        fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
+    }
+
+    impl<B, C> Try for ControlFlow<B, C> {
+        private_impl! {}
+
+        type Output = C;
+        type Residual = ControlFlow<B, Infallible>;
+
+        fn from_output(output: Self::Output) -> Self {
+            Continue(output)
+        }
+
+        fn from_residual(residual: Self::Residual) -> Self {
+            match residual {
+                Break(b) => Break(b),
+                Continue(_) => unreachable!(),
+            }
+        }
+
+        fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
+            match self {
+                Continue(c) => Continue(c),
+                Break(b) => Break(Break(b)),
+            }
+        }
+    }
+
+    impl<T> Try for Option<T> {
+        private_impl! {}
+
+        type Output = T;
+        type Residual = Option<Infallible>;
+
+        fn from_output(output: Self::Output) -> Self {
+            Some(output)
+        }
+
+        fn from_residual(residual: Self::Residual) -> Self {
+            match residual {
+                None => None,
+                Some(_) => unreachable!(),
+            }
+        }
+
+        fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
+            match self {
+                Some(c) => Continue(c),
+                None => Break(None),
+            }
+        }
+    }
+
+    impl<T, E> Try for Result<T, E> {
+        private_impl! {}
+
+        type Output = T;
+        type Residual = Result<Infallible, E>;
+
+        fn from_output(output: Self::Output) -> Self {
+            Ok(output)
+        }
+
+        fn from_residual(residual: Self::Residual) -> Self {
+            match residual {
+                Err(e) => Err(e),
+                Ok(_) => unreachable!(),
+            }
+        }
+
+        fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
+            match self {
+                Ok(c) => Continue(c),
+                Err(e) => Break(Err(e)),
+            }
+        }
+    }
+
+    impl<T, E> Try for Poll<Result<T, E>> {
+        private_impl! {}
+
+        type Output = Poll<T>;
+        type Residual = Result<Infallible, E>;
+
+        fn from_output(output: Self::Output) -> Self {
+            output.map(Ok)
+        }
+
+        fn from_residual(residual: Self::Residual) -> Self {
+            match residual {
+                Err(e) => Poll::Ready(Err(e)),
+                Ok(_) => unreachable!(),
+            }
+        }
+
+        fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
+            match self {
+                Poll::Pending => Continue(Poll::Pending),
+                Poll::Ready(Ok(c)) => Continue(Poll::Ready(c)),
+                Poll::Ready(Err(e)) => Break(Err(e)),
+            }
+        }
+    }
+
+    impl<T, E> Try for Poll<Option<Result<T, E>>> {
+        private_impl! {}
+
+        type Output = Poll<Option<T>>;
+        type Residual = Result<Infallible, E>;
+
+        fn from_output(output: Self::Output) -> Self {
+            match output {
+                Poll::Ready(o) => Poll::Ready(o.map(Ok)),
+                Poll::Pending => Poll::Pending,
+            }
+        }
+
+        fn from_residual(residual: Self::Residual) -> Self {
+            match residual {
+                Err(e) => Poll::Ready(Some(Err(e))),
+                Ok(_) => unreachable!(),
+            }
+        }
+
+        fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
+            match self {
+                Poll::Pending => Continue(Poll::Pending),
+                Poll::Ready(None) => Continue(Poll::Ready(None)),
+                Poll::Ready(Some(Ok(c))) => Continue(Poll::Ready(Some(c))),
+                Poll::Ready(Some(Err(e))) => Break(Err(e)),
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/multizip.rs.html b/src/rayon/iter/multizip.rs.html new file mode 100644 index 0000000000..dc16d1b393 --- /dev/null +++ b/src/rayon/iter/multizip.rs.html @@ -0,0 +1,679 @@ +multizip.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+
use super::plumbing::*;
+use super::*;
+
+/// `MultiZip` is an iterator that zips up a tuple of parallel iterators to
+/// produce tuples of their items.
+///
+/// It is created by calling `into_par_iter()` on a tuple of types that
+/// implement `IntoParallelIterator`, or `par_iter()`/`par_iter_mut()` with
+/// types that are iterable by reference.
+///
+/// The implementation currently support tuples up to length 12.
+///
+/// # Examples
+///
+/// ```
+/// use rayon::prelude::*;
+///
+/// // This will iterate `r` by mutable reference, like `par_iter_mut()`, while
+/// // ranges are all iterated by value like `into_par_iter()`.
+/// // Note that the zipped iterator is only as long as the shortest input.
+/// let mut r = vec![0; 3];
+/// (&mut r, 1..10, 10..100, 100..1000).into_par_iter()
+///     .for_each(|(r, x, y, z)| *r = x * y + z);
+///
+/// assert_eq!(&r, &[1 * 10 + 100, 2 * 11 + 101, 3 * 12 + 102]);
+/// ```
+///
+/// For a group that should all be iterated by reference, you can use a tuple reference.
+///
+/// ```
+/// use rayon::prelude::*;
+///
+/// let xs: Vec<_> = (1..10).collect();
+/// let ys: Vec<_> = (10..100).collect();
+/// let zs: Vec<_> = (100..1000).collect();
+///
+/// // Reference each input separately with `IntoParallelIterator`:
+/// let r1: Vec<_> = (&xs, &ys, &zs).into_par_iter()
+///     .map(|(x, y, z)| x * y + z)
+///     .collect();
+///
+/// // Reference them all together with `IntoParallelRefIterator`:
+/// let r2: Vec<_> = (xs, ys, zs).par_iter()
+///     .map(|(x, y, z)| x * y + z)
+///     .collect();
+///
+/// assert_eq!(r1, r2);
+/// ```
+///
+/// Mutable references to a tuple will work similarly.
+///
+/// ```
+/// use rayon::prelude::*;
+///
+/// let mut xs: Vec<_> = (1..4).collect();
+/// let mut ys: Vec<_> = (-4..-1).collect();
+/// let mut zs = vec![0; 3];
+///
+/// // Mutably reference each input separately with `IntoParallelIterator`:
+/// (&mut xs, &mut ys, &mut zs).into_par_iter().for_each(|(x, y, z)| {
+///     *z += *x + *y;
+///     std::mem::swap(x, y);
+/// });
+///
+/// assert_eq!(xs, (vec![-4, -3, -2]));
+/// assert_eq!(ys, (vec![1, 2, 3]));
+/// assert_eq!(zs, (vec![-3, -1, 1]));
+///
+/// // Mutably reference them all together with `IntoParallelRefMutIterator`:
+/// let mut tuple = (xs, ys, zs);
+/// tuple.par_iter_mut().for_each(|(x, y, z)| {
+///     *z += *x + *y;
+///     std::mem::swap(x, y);
+/// });
+///
+/// assert_eq!(tuple, (vec![1, 2, 3], vec![-4, -3, -2], vec![-6, -2, 2]));
+/// ```
+#[derive(Debug, Clone)]
+pub struct MultiZip<T> {
+    tuple: T,
+}
+
+// These macros greedily consume 4 or 2 items first to achieve log2 nesting depth.
+// For example, 5 => 4,1 => (2,2),1.
+//
+// The tuples go up to 12, so we might want to greedily consume 8 too, but
+// the depth works out the same if we let that expand on the right:
+//      9 => 4,5 => (2,2),(4,1) => (2,2),((2,2),1)
+//     12 => 4,8 => (2,2),(4,4) => (2,2),((2,2),(2,2))
+//
+// But if we ever increase to 13, we would want to split 8,5 rather than 4,9.
+
+macro_rules! reduce {
+    ($a:expr, $b:expr, $c:expr, $d:expr, $( $x:expr ),+ => $fn:path) => {
+        reduce!(reduce!($a, $b, $c, $d => $fn),
+                reduce!($( $x ),+ => $fn)
+                => $fn)
+    };
+    ($a:expr, $b:expr, $( $x:expr ),+ => $fn:path) => {
+        reduce!(reduce!($a, $b => $fn),
+                reduce!($( $x ),+ => $fn)
+                => $fn)
+    };
+    ($a:expr, $b:expr => $fn:path) => { $fn($a, $b) };
+    ($a:expr => $fn:path) => { $a };
+}
+
+macro_rules! nest {
+    ($A:tt, $B:tt, $C:tt, $D:tt, $( $X:tt ),+) => {
+        (nest!($A, $B, $C, $D), nest!($( $X ),+))
+    };
+    ($A:tt, $B:tt, $( $X:tt ),+) => {
+        (($A, $B), nest!($( $X ),+))
+    };
+    ($A:tt, $B:tt) => { ($A, $B) };
+    ($A:tt) => { $A };
+}
+
+macro_rules! flatten {
+    ($( $T:ident ),+) => {{
+        #[allow(non_snake_case)]
+        fn flatten<$( $T ),+>(nest!($( $T ),+) : nest!($( $T ),+)) -> ($( $T, )+) {
+            ($( $T, )+)
+        }
+        flatten
+    }};
+}
+
+macro_rules! multizip_impls {
+    ($(
+        $Tuple:ident {
+            $(($idx:tt) -> $T:ident)+
+        }
+    )+) => {
+        $(
+            impl<$( $T, )+> IntoParallelIterator for ($( $T, )+)
+            where
+                $(
+                    $T: IntoParallelIterator,
+                    $T::Iter: IndexedParallelIterator,
+                )+
+            {
+                type Item = ($( $T::Item, )+);
+                type Iter = MultiZip<($( $T::Iter, )+)>;
+
+                fn into_par_iter(self) -> Self::Iter {
+                    MultiZip {
+                        tuple: ( $( self.$idx.into_par_iter(), )+ ),
+                    }
+                }
+            }
+
+            impl<'a, $( $T, )+> IntoParallelIterator for &'a ($( $T, )+)
+            where
+                $(
+                    $T: IntoParallelRefIterator<'a>,
+                    $T::Iter: IndexedParallelIterator,
+                )+
+            {
+                type Item = ($( $T::Item, )+);
+                type Iter = MultiZip<($( $T::Iter, )+)>;
+
+                fn into_par_iter(self) -> Self::Iter {
+                    MultiZip {
+                        tuple: ( $( self.$idx.par_iter(), )+ ),
+                    }
+                }
+            }
+
+            impl<'a, $( $T, )+> IntoParallelIterator for &'a mut ($( $T, )+)
+            where
+                $(
+                    $T: IntoParallelRefMutIterator<'a>,
+                    $T::Iter: IndexedParallelIterator,
+                )+
+            {
+                type Item = ($( $T::Item, )+);
+                type Iter = MultiZip<($( $T::Iter, )+)>;
+
+                fn into_par_iter(self) -> Self::Iter {
+                    MultiZip {
+                        tuple: ( $( self.$idx.par_iter_mut(), )+ ),
+                    }
+                }
+            }
+
+            impl<$( $T, )+> ParallelIterator for MultiZip<($( $T, )+)>
+            where
+                $( $T: IndexedParallelIterator, )+
+            {
+                type Item = ($( $T::Item, )+);
+
+                fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
+                where
+                    CONSUMER: UnindexedConsumer<Self::Item>,
+                {
+                    self.drive(consumer)
+                }
+
+                fn opt_len(&self) -> Option<usize> {
+                    Some(self.len())
+                }
+            }
+
+            impl<$( $T, )+> IndexedParallelIterator for MultiZip<($( $T, )+)>
+            where
+                $( $T: IndexedParallelIterator, )+
+            {
+                fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Result
+                where
+                    CONSUMER: Consumer<Self::Item>,
+                {
+                    reduce!($( self.tuple.$idx ),+ => IndexedParallelIterator::zip)
+                        .map(flatten!($( $T ),+))
+                        .drive(consumer)
+                }
+
+                fn len(&self) -> usize {
+                    reduce!($( self.tuple.$idx.len() ),+ => Ord::min)
+                }
+
+                fn with_producer<CB>(self, callback: CB) -> CB::Output
+                where
+                    CB: ProducerCallback<Self::Item>,
+                {
+                    reduce!($( self.tuple.$idx ),+ => IndexedParallelIterator::zip)
+                        .map(flatten!($( $T ),+))
+                        .with_producer(callback)
+                }
+            }
+        )+
+    }
+}
+
+multizip_impls! {
+    Tuple1 {
+        (0) -> A
+    }
+    Tuple2 {
+        (0) -> A
+        (1) -> B
+    }
+    Tuple3 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+    }
+    Tuple4 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+    }
+    Tuple5 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+    }
+    Tuple6 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+        (5) -> F
+    }
+    Tuple7 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+        (5) -> F
+        (6) -> G
+    }
+    Tuple8 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+        (5) -> F
+        (6) -> G
+        (7) -> H
+    }
+    Tuple9 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+        (5) -> F
+        (6) -> G
+        (7) -> H
+        (8) -> I
+    }
+    Tuple10 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+        (5) -> F
+        (6) -> G
+        (7) -> H
+        (8) -> I
+        (9) -> J
+    }
+    Tuple11 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+        (5) -> F
+        (6) -> G
+        (7) -> H
+        (8) -> I
+        (9) -> J
+        (10) -> K
+    }
+    Tuple12 {
+        (0) -> A
+        (1) -> B
+        (2) -> C
+        (3) -> D
+        (4) -> E
+        (5) -> F
+        (6) -> G
+        (7) -> H
+        (8) -> I
+        (9) -> J
+        (10) -> K
+        (11) -> L
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/noop.rs.html b/src/rayon/iter/noop.rs.html new file mode 100644 index 0000000000..27ad1e9330 --- /dev/null +++ b/src/rayon/iter/noop.rs.html @@ -0,0 +1,121 @@ +noop.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+
use super::plumbing::*;
+
+pub(super) struct NoopConsumer;
+
+impl<T> Consumer<T> for NoopConsumer {
+    type Folder = NoopConsumer;
+    type Reducer = NoopReducer;
+    type Result = ();
+
+    fn split_at(self, _index: usize) -> (Self, Self, NoopReducer) {
+        (NoopConsumer, NoopConsumer, NoopReducer)
+    }
+
+    fn into_folder(self) -> Self {
+        self
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<T> Folder<T> for NoopConsumer {
+    type Result = ();
+
+    fn consume(self, _item: T) -> Self {
+        self
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        iter.into_iter().for_each(drop);
+        self
+    }
+
+    fn complete(self) {}
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<T> UnindexedConsumer<T> for NoopConsumer {
+    fn split_off_left(&self) -> Self {
+        NoopConsumer
+    }
+
+    fn to_reducer(&self) -> NoopReducer {
+        NoopReducer
+    }
+}
+
+pub(super) struct NoopReducer;
+
+impl Reducer<()> for NoopReducer {
+    fn reduce(self, _left: (), _right: ()) {}
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/once.rs.html b/src/rayon/iter/once.rs.html new file mode 100644 index 0000000000..78a414aa60 --- /dev/null +++ b/src/rayon/iter/once.rs.html @@ -0,0 +1,139 @@ +once.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+
use crate::iter::plumbing::*;
+use crate::iter::*;
+
+/// Creates a parallel iterator that produces an element exactly once.
+///
+/// This admits no parallelism on its own, but it could be chained to existing
+/// parallel iterators to extend their contents, or otherwise used for any code
+/// that deals with generic parallel iterators.
+///
+/// # Examples
+///
+/// ```
+/// use rayon::prelude::*;
+/// use rayon::iter::once;
+///
+/// let pi = (0..1234).into_par_iter()
+///     .chain(once(-1))
+///     .chain(1234..10_000);
+///
+/// assert_eq!(pi.clone().count(), 10_001);
+/// assert_eq!(pi.clone().filter(|&x| x < 0).count(), 1);
+/// assert_eq!(pi.position_any(|x| x < 0), Some(1234));
+/// ```
+pub fn once<T: Send>(item: T) -> Once<T> {
+    Once { item }
+}
+
+/// Iterator adaptor for [the `once()` function](fn.once.html).
+#[derive(Clone, Debug)]
+pub struct Once<T: Send> {
+    item: T,
+}
+
+impl<T: Send> ParallelIterator for Once<T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.drive(consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(1)
+    }
+}
+
+impl<T: Send> IndexedParallelIterator for Once<T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        consumer.into_folder().consume(self.item).complete()
+    }
+
+    fn len(&self) -> usize {
+        1
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        // Let `OptionProducer` handle it.
+        Some(self.item).into_par_iter().with_producer(callback)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/panic_fuse.rs.html b/src/rayon/iter/panic_fuse.rs.html new file mode 100644 index 0000000000..7d6c5bfbb9 --- /dev/null +++ b/src/rayon/iter/panic_fuse.rs.html @@ -0,0 +1,687 @@ +panic_fuse.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+
use super::plumbing::*;
+use super::*;
+use std::sync::atomic::{AtomicBool, Ordering};
+use std::thread;
+
+/// `PanicFuse` is an adaptor that wraps an iterator with a fuse in case
+/// of panics, to halt all threads as soon as possible.
+///
+/// This struct is created by the [`panic_fuse()`] method on [`ParallelIterator`]
+///
+/// [`panic_fuse()`]: trait.ParallelIterator.html#method.panic_fuse
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct PanicFuse<I: ParallelIterator> {
+    base: I,
+}
+
+/// Helper that sets a bool to `true` if dropped while unwinding.
+#[derive(Clone)]
+struct Fuse<'a>(&'a AtomicBool);
+
+impl<'a> Drop for Fuse<'a> {
+    #[inline]
+    fn drop(&mut self) {
+        if thread::panicking() {
+            self.0.store(true, Ordering::Relaxed);
+        }
+    }
+}
+
+impl<'a> Fuse<'a> {
+    #[inline]
+    fn panicked(&self) -> bool {
+        self.0.load(Ordering::Relaxed)
+    }
+}
+
+impl<I> PanicFuse<I>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `PanicFuse` iterator.
+    pub(super) fn new(base: I) -> PanicFuse<I> {
+        PanicFuse { base }
+    }
+}
+
+impl<I> ParallelIterator for PanicFuse<I>
+where
+    I: ParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let panicked = AtomicBool::new(false);
+        let consumer1 = PanicFuseConsumer {
+            base: consumer,
+            fuse: Fuse(&panicked),
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<I> IndexedParallelIterator for PanicFuse<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let panicked = AtomicBool::new(false);
+        let consumer1 = PanicFuseConsumer {
+            base: consumer,
+            fuse: Fuse(&panicked),
+        };
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback { callback });
+
+        struct Callback<CB> {
+            callback: CB,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let panicked = AtomicBool::new(false);
+                let producer = PanicFuseProducer {
+                    base,
+                    fuse: Fuse(&panicked),
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Producer implementation
+
+struct PanicFuseProducer<'a, P> {
+    base: P,
+    fuse: Fuse<'a>,
+}
+
+impl<'a, P> Producer for PanicFuseProducer<'a, P>
+where
+    P: Producer,
+{
+    type Item = P::Item;
+    type IntoIter = PanicFuseIter<'a, P::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        PanicFuseIter {
+            base: self.base.into_iter(),
+            fuse: self.fuse,
+        }
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            PanicFuseProducer {
+                base: left,
+                fuse: self.fuse.clone(),
+            },
+            PanicFuseProducer {
+                base: right,
+                fuse: self.fuse,
+            },
+        )
+    }
+
+    fn fold_with<G>(self, folder: G) -> G
+    where
+        G: Folder<Self::Item>,
+    {
+        let folder1 = PanicFuseFolder {
+            base: folder,
+            fuse: self.fuse,
+        };
+        self.base.fold_with(folder1).base
+    }
+}
+
+struct PanicFuseIter<'a, I> {
+    base: I,
+    fuse: Fuse<'a>,
+}
+
+impl<'a, I> Iterator for PanicFuseIter<'a, I>
+where
+    I: Iterator,
+{
+    type Item = I::Item;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        if self.fuse.panicked() {
+            None
+        } else {
+            self.base.next()
+        }
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.base.size_hint()
+    }
+}
+
+impl<'a, I> DoubleEndedIterator for PanicFuseIter<'a, I>
+where
+    I: DoubleEndedIterator,
+{
+    fn next_back(&mut self) -> Option<Self::Item> {
+        if self.fuse.panicked() {
+            None
+        } else {
+            self.base.next_back()
+        }
+    }
+}
+
+impl<'a, I> ExactSizeIterator for PanicFuseIter<'a, I>
+where
+    I: ExactSizeIterator,
+{
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct PanicFuseConsumer<'a, C> {
+    base: C,
+    fuse: Fuse<'a>,
+}
+
+impl<'a, T, C> Consumer<T> for PanicFuseConsumer<'a, C>
+where
+    C: Consumer<T>,
+{
+    type Folder = PanicFuseFolder<'a, C::Folder>;
+    type Reducer = PanicFuseReducer<'a, C::Reducer>;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            PanicFuseConsumer {
+                base: left,
+                fuse: self.fuse.clone(),
+            },
+            PanicFuseConsumer {
+                base: right,
+                fuse: self.fuse.clone(),
+            },
+            PanicFuseReducer {
+                base: reducer,
+                _fuse: self.fuse,
+            },
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        PanicFuseFolder {
+            base: self.base.into_folder(),
+            fuse: self.fuse,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.fuse.panicked() || self.base.full()
+    }
+}
+
+impl<'a, T, C> UnindexedConsumer<T> for PanicFuseConsumer<'a, C>
+where
+    C: UnindexedConsumer<T>,
+{
+    fn split_off_left(&self) -> Self {
+        PanicFuseConsumer {
+            base: self.base.split_off_left(),
+            fuse: self.fuse.clone(),
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        PanicFuseReducer {
+            base: self.base.to_reducer(),
+            _fuse: self.fuse.clone(),
+        }
+    }
+}
+
+struct PanicFuseFolder<'a, C> {
+    base: C,
+    fuse: Fuse<'a>,
+}
+
+impl<'a, T, C> Folder<T> for PanicFuseFolder<'a, C>
+where
+    C: Folder<T>,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        self.base = self.base.consume(item);
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        fn cool<'a, T>(fuse: &'a Fuse<'_>) -> impl Fn(&T) -> bool + 'a {
+            move |_| !fuse.panicked()
+        }
+
+        self.base = {
+            let fuse = &self.fuse;
+            let iter = iter.into_iter().take_while(cool(fuse));
+            self.base.consume_iter(iter)
+        };
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.fuse.panicked() || self.base.full()
+    }
+}
+
+struct PanicFuseReducer<'a, C> {
+    base: C,
+    _fuse: Fuse<'a>,
+}
+
+impl<'a, T, C> Reducer<T> for PanicFuseReducer<'a, C>
+where
+    C: Reducer<T>,
+{
+    fn reduce(self, left: T, right: T) -> T {
+        self.base.reduce(left, right)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/par_bridge.rs.html b/src/rayon/iter/par_bridge.rs.html new file mode 100644 index 0000000000..d829826fb8 --- /dev/null +++ b/src/rayon/iter/par_bridge.rs.html @@ -0,0 +1,321 @@ +par_bridge.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+
#[cfg(not(feature = "web_spin_lock"))]
+use std::sync::Mutex;
+
+#[cfg(feature = "web_spin_lock")]
+use wasm_sync::Mutex;
+
+use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
+
+use crate::iter::plumbing::{bridge_unindexed, Folder, UnindexedConsumer, UnindexedProducer};
+use crate::iter::ParallelIterator;
+use crate::{current_num_threads, current_thread_index};
+
+/// Conversion trait to convert an `Iterator` to a `ParallelIterator`.
+///
+/// This creates a "bridge" from a sequential iterator to a parallel one, by distributing its items
+/// across the Rayon thread pool. This has the advantage of being able to parallelize just about
+/// anything, but the resulting `ParallelIterator` can be less efficient than if you started with
+/// `par_iter` instead. However, it can still be useful for iterators that are difficult to
+/// parallelize by other means, like channels or file or network I/O.
+///
+/// Iterator items are pulled by `next()` one at a time, synchronized from each thread that is
+/// ready for work, so this may become a bottleneck if the serial iterator can't keep up with the
+/// parallel demand. The items are not buffered by `IterBridge`, so it's fine to use this with
+/// large or even unbounded iterators.
+///
+/// The resulting iterator is not guaranteed to keep the order of the original iterator.
+///
+/// # Examples
+///
+/// To use this trait, take an existing `Iterator` and call `par_bridge` on it. After that, you can
+/// use any of the `ParallelIterator` methods:
+///
+/// ```
+/// use rayon::iter::ParallelBridge;
+/// use rayon::prelude::ParallelIterator;
+/// use std::sync::mpsc::channel;
+///
+/// let rx = {
+///     let (tx, rx) = channel();
+///
+///     tx.send("one!");
+///     tx.send("two!");
+///     tx.send("three!");
+///
+///     rx
+/// };
+///
+/// let mut output: Vec<&'static str> = rx.into_iter().par_bridge().collect();
+/// output.sort_unstable();
+///
+/// assert_eq!(&*output, &["one!", "three!", "two!"]);
+/// ```
+pub trait ParallelBridge: Sized {
+    /// Creates a bridge from this type to a `ParallelIterator`.
+    fn par_bridge(self) -> IterBridge<Self>;
+}
+
+impl<T: Iterator + Send> ParallelBridge for T
+where
+    T::Item: Send,
+{
+    fn par_bridge(self) -> IterBridge<Self> {
+        IterBridge { iter: self }
+    }
+}
+
+/// `IterBridge` is a parallel iterator that wraps a sequential iterator.
+///
+/// This type is created when using the `par_bridge` method on `ParallelBridge`. See the
+/// [`ParallelBridge`] documentation for details.
+///
+/// [`ParallelBridge`]: trait.ParallelBridge.html
+#[derive(Debug, Clone)]
+pub struct IterBridge<Iter> {
+    iter: Iter,
+}
+
+impl<Iter: Iterator + Send> ParallelIterator for IterBridge<Iter>
+where
+    Iter::Item: Send,
+{
+    type Item = Iter::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let num_threads = current_num_threads();
+        let threads_started: Vec<_> = (0..num_threads).map(|_| AtomicBool::new(false)).collect();
+
+        bridge_unindexed(
+            &IterParallelProducer {
+                split_count: AtomicUsize::new(num_threads),
+                iter: Mutex::new(self.iter.fuse()),
+                threads_started: &threads_started,
+            },
+            consumer,
+        )
+    }
+}
+
+struct IterParallelProducer<'a, Iter> {
+    split_count: AtomicUsize,
+    iter: Mutex<std::iter::Fuse<Iter>>,
+    threads_started: &'a [AtomicBool],
+}
+
+impl<Iter: Iterator + Send> UnindexedProducer for &IterParallelProducer<'_, Iter> {
+    type Item = Iter::Item;
+
+    fn split(self) -> (Self, Option<Self>) {
+        // Check if the iterator is exhausted
+        let update = self
+            .split_count
+            .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |c| c.checked_sub(1));
+        (self, update.is_ok().then_some(self))
+    }
+
+    fn fold_with<F>(self, mut folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        // Guard against work-stealing-induced recursion, in case `Iter::next()`
+        // calls rayon internally, so we don't deadlock our mutex. We might also
+        // be recursing via `folder` methods, which doesn't present a mutex hazard,
+        // but it's lower overhead for us to just check this once, rather than
+        // updating additional shared state on every mutex lock/unlock.
+        // (If this isn't a rayon thread, then there's no work-stealing anyway...)
+        if let Some(i) = current_thread_index() {
+            // Note: If the number of threads in the pool ever grows dynamically, then
+            // we'll end up sharing flags and may falsely detect recursion -- that's
+            // still fine for overall correctness, just not optimal for parallelism.
+            let thread_started = &self.threads_started[i % self.threads_started.len()];
+            if thread_started.swap(true, Ordering::Relaxed) {
+                // We can't make progress with a nested mutex, so just return and let
+                // the outermost loop continue with the rest of the iterator items.
+                return folder;
+            }
+        }
+
+        loop {
+            if let Ok(mut iter) = self.iter.lock() {
+                if let Some(it) = iter.next() {
+                    drop(iter);
+                    folder = folder.consume(it);
+                    if folder.full() {
+                        return folder;
+                    }
+                } else {
+                    return folder;
+                }
+            } else {
+                // any panics from other threads will have been caught by the pool,
+                // and will be re-thrown when joined - just exit
+                return folder;
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/plumbing/mod.rs.html b/src/rayon/iter/plumbing/mod.rs.html new file mode 100644 index 0000000000..49d2380871 --- /dev/null +++ b/src/rayon/iter/plumbing/mod.rs.html @@ -0,0 +1,969 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+
//! Traits and functions used to implement parallel iteration.  These are
+//! low-level details -- users of parallel iterators should not need to
+//! interact with them directly.  See [the `plumbing` README][r] for a general overview.
+//!
+//! [r]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md
+
+use crate::join_context;
+
+use super::IndexedParallelIterator;
+
+use std::usize;
+
+/// The `ProducerCallback` trait is a kind of generic closure,
+/// [analogous to `FnOnce`][FnOnce]. See [the corresponding section in
+/// the plumbing README][r] for more details.
+///
+/// [r]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md#producer-callback
+/// [FnOnce]: https://doc.rust-lang.org/std/ops/trait.FnOnce.html
+pub trait ProducerCallback<T> {
+    /// The type of value returned by this callback. Analogous to
+    /// [`Output` from the `FnOnce` trait][Output].
+    ///
+    /// [Output]: https://doc.rust-lang.org/std/ops/trait.FnOnce.html#associatedtype.Output
+    type Output;
+
+    /// Invokes the callback with the given producer as argument. The
+    /// key point of this trait is that this method is generic over
+    /// `P`, and hence implementors must be defined for any producer.
+    fn callback<P>(self, producer: P) -> Self::Output
+    where
+        P: Producer<Item = T>;
+}
+
+/// A `Producer` is effectively a "splittable `IntoIterator`". That
+/// is, a producer is a value which can be converted into an iterator
+/// at any time: at that point, it simply produces items on demand,
+/// like any iterator. But what makes a `Producer` special is that,
+/// *before* we convert to an iterator, we can also **split** it at a
+/// particular point using the `split_at` method. This will yield up
+/// two producers, one producing the items before that point, and one
+/// producing the items after that point (these two producers can then
+/// independently be split further, or be converted into iterators).
+/// In Rayon, this splitting is used to divide between threads.
+/// See [the `plumbing` README][r] for further details.
+///
+/// Note that each producer will always produce a fixed number of
+/// items N. However, this number N is not queryable through the API;
+/// the consumer is expected to track it.
+///
+/// NB. You might expect `Producer` to extend the `IntoIterator`
+/// trait.  However, [rust-lang/rust#20671][20671] prevents us from
+/// declaring the DoubleEndedIterator and ExactSizeIterator
+/// constraints on a required IntoIterator trait, so we inline
+/// IntoIterator here until that issue is fixed.
+///
+/// [r]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md
+/// [20671]: https://github.com/rust-lang/rust/issues/20671
+pub trait Producer: Send + Sized {
+    /// The type of item that will be produced by this producer once
+    /// it is converted into an iterator.
+    type Item;
+
+    /// The type of iterator we will become.
+    type IntoIter: Iterator<Item = Self::Item> + DoubleEndedIterator + ExactSizeIterator;
+
+    /// Convert `self` into an iterator; at this point, no more parallel splits
+    /// are possible.
+    fn into_iter(self) -> Self::IntoIter;
+
+    /// The minimum number of items that we will process
+    /// sequentially. Defaults to 1, which means that we will split
+    /// all the way down to a single item. This can be raised higher
+    /// using the [`with_min_len`] method, which will force us to
+    /// create sequential tasks at a larger granularity. Note that
+    /// Rayon automatically normally attempts to adjust the size of
+    /// parallel splits to reduce overhead, so this should not be
+    /// needed.
+    ///
+    /// [`with_min_len`]: ../trait.IndexedParallelIterator.html#method.with_min_len
+    fn min_len(&self) -> usize {
+        1
+    }
+
+    /// The maximum number of items that we will process
+    /// sequentially. Defaults to MAX, which means that we can choose
+    /// not to split at all. This can be lowered using the
+    /// [`with_max_len`] method, which will force us to create more
+    /// parallel tasks. Note that Rayon automatically normally
+    /// attempts to adjust the size of parallel splits to reduce
+    /// overhead, so this should not be needed.
+    ///
+    /// [`with_max_len`]: ../trait.IndexedParallelIterator.html#method.with_max_len
+    fn max_len(&self) -> usize {
+        usize::MAX
+    }
+
+    /// Split into two producers; one produces items `0..index`, the
+    /// other `index..N`. Index must be less than or equal to `N`.
+    fn split_at(self, index: usize) -> (Self, Self);
+
+    /// Iterate the producer, feeding each element to `folder`, and
+    /// stop when the folder is full (or all elements have been consumed).
+    ///
+    /// The provided implementation is sufficient for most iterables.
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        folder.consume_iter(self.into_iter())
+    }
+}
+
+/// A consumer is effectively a [generalized "fold" operation][fold],
+/// and in fact each consumer will eventually be converted into a
+/// [`Folder`]. What makes a consumer special is that, like a
+/// [`Producer`], it can be **split** into multiple consumers using
+/// the `split_at` method. When a consumer is split, it produces two
+/// consumers, as well as a **reducer**. The two consumers can be fed
+/// items independently, and when they are done the reducer is used to
+/// combine their two results into one. See [the `plumbing`
+/// README][r] for further details.
+///
+/// [r]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md
+/// [fold]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.fold
+/// [`Folder`]: trait.Folder.html
+/// [`Producer`]: trait.Producer.html
+pub trait Consumer<Item>: Send + Sized {
+    /// The type of folder that this consumer can be converted into.
+    type Folder: Folder<Item, Result = Self::Result>;
+
+    /// The type of reducer that is produced if this consumer is split.
+    type Reducer: Reducer<Self::Result>;
+
+    /// The type of result that this consumer will ultimately produce.
+    type Result: Send;
+
+    /// Divide the consumer into two consumers, one processing items
+    /// `0..index` and one processing items from `index..`. Also
+    /// produces a reducer that can be used to reduce the results at
+    /// the end.
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer);
+
+    /// Convert the consumer into a folder that can consume items
+    /// sequentially, eventually producing a final result.
+    fn into_folder(self) -> Self::Folder;
+
+    /// Hint whether this `Consumer` would like to stop processing
+    /// further items, e.g. if a search has been completed.
+    fn full(&self) -> bool;
+}
+
+/// The `Folder` trait encapsulates [the standard fold
+/// operation][fold].  It can be fed many items using the `consume`
+/// method. At the end, once all items have been consumed, it can then
+/// be converted (using `complete`) into a final value.
+///
+/// [fold]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.fold
+pub trait Folder<Item>: Sized {
+    /// The type of result that will ultimately be produced by the folder.
+    type Result;
+
+    /// Consume next item and return new sequential state.
+    fn consume(self, item: Item) -> Self;
+
+    /// Consume items from the iterator until full, and return new sequential state.
+    ///
+    /// This method is **optional**. The default simply iterates over
+    /// `iter`, invoking `consume` and checking after each iteration
+    /// whether `full` returns false.
+    ///
+    /// The main reason to override it is if you can provide a more
+    /// specialized, efficient implementation.
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = Item>,
+    {
+        for item in iter {
+            self = self.consume(item);
+            if self.full() {
+                break;
+            }
+        }
+        self
+    }
+
+    /// Finish consuming items, produce final result.
+    fn complete(self) -> Self::Result;
+
+    /// Hint whether this `Folder` would like to stop processing
+    /// further items, e.g. if a search has been completed.
+    fn full(&self) -> bool;
+}
+
+/// The reducer is the final step of a `Consumer` -- after a consumer
+/// has been split into two parts, and each of those parts has been
+/// fully processed, we are left with two results. The reducer is then
+/// used to combine those two results into one. See [the `plumbing`
+/// README][r] for further details.
+///
+/// [r]: https://github.com/rayon-rs/rayon/blob/main/src/iter/plumbing/README.md
+pub trait Reducer<Result> {
+    /// Reduce two final results into one; this is executed after a
+    /// split.
+    fn reduce(self, left: Result, right: Result) -> Result;
+}
+
+/// A stateless consumer can be freely copied. These consumers can be
+/// used like regular consumers, but they also support a
+/// `split_off_left` method that does not take an index to split, but
+/// simply splits at some arbitrary point (`for_each`, for example,
+/// produces an unindexed consumer).
+pub trait UnindexedConsumer<I>: Consumer<I> {
+    /// Splits off a "left" consumer and returns it. The `self`
+    /// consumer should then be used to consume the "right" portion of
+    /// the data. (The ordering matters for methods like find_first --
+    /// values produced by the returned value are given precedence
+    /// over values produced by `self`.) Once the left and right
+    /// halves have been fully consumed, you should reduce the results
+    /// with the result of `to_reducer`.
+    fn split_off_left(&self) -> Self;
+
+    /// Creates a reducer that can be used to combine the results from
+    /// a split consumer.
+    fn to_reducer(&self) -> Self::Reducer;
+}
+
+/// A variant on `Producer` which does not know its exact length or
+/// cannot represent it in a `usize`. These producers act like
+/// ordinary producers except that they cannot be told to split at a
+/// particular point. Instead, you just ask them to split 'somewhere'.
+///
+/// (In principle, `Producer` could extend this trait; however, it
+/// does not because to do so would require producers to carry their
+/// own length with them.)
+pub trait UnindexedProducer: Send + Sized {
+    /// The type of item returned by this producer.
+    type Item;
+
+    /// Split midway into a new producer if possible, otherwise return `None`.
+    fn split(self) -> (Self, Option<Self>);
+
+    /// Iterate the producer, feeding each element to `folder`, and
+    /// stop when the folder is full (or all elements have been consumed).
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>;
+}
+
+/// A splitter controls the policy for splitting into smaller work items.
+///
+/// Thief-splitting is an adaptive policy that starts by splitting into
+/// enough jobs for every worker thread, and then resets itself whenever a
+/// job is actually stolen into a different thread.
+#[derive(Clone, Copy)]
+struct Splitter {
+    /// The `splits` tell us approximately how many remaining times we'd
+    /// like to split this job.  We always just divide it by two though, so
+    /// the effective number of pieces will be `next_power_of_two()`.
+    splits: usize,
+}
+
+impl Splitter {
+    #[inline]
+    fn new() -> Splitter {
+        Splitter {
+            splits: crate::current_num_threads(),
+        }
+    }
+
+    #[inline]
+    fn try_split(&mut self, stolen: bool) -> bool {
+        let Splitter { splits } = *self;
+
+        if stolen {
+            // This job was stolen!  Reset the number of desired splits to the
+            // thread count, if that's more than we had remaining anyway.
+            self.splits = Ord::max(crate::current_num_threads(), self.splits / 2);
+            true
+        } else if splits > 0 {
+            // We have splits remaining, make it so.
+            self.splits /= 2;
+            true
+        } else {
+            // Not stolen, and no more splits -- we're done!
+            false
+        }
+    }
+}
+
+/// The length splitter is built on thief-splitting, but additionally takes
+/// into account the remaining length of the iterator.
+#[derive(Clone, Copy)]
+struct LengthSplitter {
+    inner: Splitter,
+
+    /// The smallest we're willing to divide into.  Usually this is just 1,
+    /// but you can choose a larger working size with `with_min_len()`.
+    min: usize,
+}
+
+impl LengthSplitter {
+    /// Creates a new splitter based on lengths.
+    ///
+    /// The `min` is a hard lower bound.  We'll never split below that, but
+    /// of course an iterator might start out smaller already.
+    ///
+    /// The `max` is an upper bound on the working size, used to determine
+    /// the minimum number of times we need to split to get under that limit.
+    /// The adaptive algorithm may very well split even further, but never
+    /// smaller than the `min`.
+    #[inline]
+    fn new(min: usize, max: usize, len: usize) -> LengthSplitter {
+        let mut splitter = LengthSplitter {
+            inner: Splitter::new(),
+            min: Ord::max(min, 1),
+        };
+
+        // Divide the given length by the max working length to get the minimum
+        // number of splits we need to get under that max.  This rounds down,
+        // but the splitter actually gives `next_power_of_two()` pieces anyway.
+        // e.g. len 12345 / max 100 = 123 min_splits -> 128 pieces.
+        let min_splits = len / Ord::max(max, 1);
+
+        // Only update the value if it's not splitting enough already.
+        if min_splits > splitter.inner.splits {
+            splitter.inner.splits = min_splits;
+        }
+
+        splitter
+    }
+
+    #[inline]
+    fn try_split(&mut self, len: usize, stolen: bool) -> bool {
+        // If splitting wouldn't make us too small, try the inner splitter.
+        len / 2 >= self.min && self.inner.try_split(stolen)
+    }
+}
+
+/// This helper function is used to "connect" a parallel iterator to a
+/// consumer. It will convert the `par_iter` into a producer P and
+/// then pull items from P and feed them to `consumer`, splitting and
+/// creating parallel threads as needed.
+///
+/// This is useful when you are implementing your own parallel
+/// iterators: it is often used as the definition of the
+/// [`drive_unindexed`] or [`drive`] methods.
+///
+/// [`drive_unindexed`]: ../trait.ParallelIterator.html#tymethod.drive_unindexed
+/// [`drive`]: ../trait.IndexedParallelIterator.html#tymethod.drive
+pub fn bridge<I, C>(par_iter: I, consumer: C) -> C::Result
+where
+    I: IndexedParallelIterator,
+    C: Consumer<I::Item>,
+{
+    let len = par_iter.len();
+    return par_iter.with_producer(Callback { len, consumer });
+
+    struct Callback<C> {
+        len: usize,
+        consumer: C,
+    }
+
+    impl<C, I> ProducerCallback<I> for Callback<C>
+    where
+        C: Consumer<I>,
+    {
+        type Output = C::Result;
+        fn callback<P>(self, producer: P) -> C::Result
+        where
+            P: Producer<Item = I>,
+        {
+            bridge_producer_consumer(self.len, producer, self.consumer)
+        }
+    }
+}
+
+/// This helper function is used to "connect" a producer and a
+/// consumer. You may prefer to call [`bridge`], which wraps this
+/// function. This function will draw items from `producer` and feed
+/// them to `consumer`, splitting and creating parallel tasks when
+/// needed.
+///
+/// This is useful when you are implementing your own parallel
+/// iterators: it is often used as the definition of the
+/// [`drive_unindexed`] or [`drive`] methods.
+///
+/// [`bridge`]: fn.bridge.html
+/// [`drive_unindexed`]: ../trait.ParallelIterator.html#tymethod.drive_unindexed
+/// [`drive`]: ../trait.IndexedParallelIterator.html#tymethod.drive
+pub fn bridge_producer_consumer<P, C>(len: usize, producer: P, consumer: C) -> C::Result
+where
+    P: Producer,
+    C: Consumer<P::Item>,
+{
+    let splitter = LengthSplitter::new(producer.min_len(), producer.max_len(), len);
+    return helper(len, false, splitter, producer, consumer);
+
+    fn helper<P, C>(
+        len: usize,
+        migrated: bool,
+        mut splitter: LengthSplitter,
+        producer: P,
+        consumer: C,
+    ) -> C::Result
+    where
+        P: Producer,
+        C: Consumer<P::Item>,
+    {
+        if consumer.full() {
+            consumer.into_folder().complete()
+        } else if splitter.try_split(len, migrated) {
+            let mid = len / 2;
+            let (left_producer, right_producer) = producer.split_at(mid);
+            let (left_consumer, right_consumer, reducer) = consumer.split_at(mid);
+            let (left_result, right_result) = join_context(
+                |context| {
+                    helper(
+                        mid,
+                        context.migrated(),
+                        splitter,
+                        left_producer,
+                        left_consumer,
+                    )
+                },
+                |context| {
+                    helper(
+                        len - mid,
+                        context.migrated(),
+                        splitter,
+                        right_producer,
+                        right_consumer,
+                    )
+                },
+            );
+            reducer.reduce(left_result, right_result)
+        } else {
+            producer.fold_with(consumer.into_folder()).complete()
+        }
+    }
+}
+
+/// A variant of [`bridge_producer_consumer`] where the producer is an unindexed producer.
+///
+/// [`bridge_producer_consumer`]: fn.bridge_producer_consumer.html
+pub fn bridge_unindexed<P, C>(producer: P, consumer: C) -> C::Result
+where
+    P: UnindexedProducer,
+    C: UnindexedConsumer<P::Item>,
+{
+    let splitter = Splitter::new();
+    bridge_unindexed_producer_consumer(false, splitter, producer, consumer)
+}
+
+fn bridge_unindexed_producer_consumer<P, C>(
+    migrated: bool,
+    mut splitter: Splitter,
+    producer: P,
+    consumer: C,
+) -> C::Result
+where
+    P: UnindexedProducer,
+    C: UnindexedConsumer<P::Item>,
+{
+    if consumer.full() {
+        consumer.into_folder().complete()
+    } else if splitter.try_split(migrated) {
+        match producer.split() {
+            (left_producer, Some(right_producer)) => {
+                let (reducer, left_consumer, right_consumer) =
+                    (consumer.to_reducer(), consumer.split_off_left(), consumer);
+                let bridge = bridge_unindexed_producer_consumer;
+                let (left_result, right_result) = join_context(
+                    |context| bridge(context.migrated(), splitter, left_producer, left_consumer),
+                    |context| bridge(context.migrated(), splitter, right_producer, right_consumer),
+                );
+                reducer.reduce(left_result, right_result)
+            }
+            (producer, None) => producer.fold_with(consumer.into_folder()).complete(),
+        }
+    } else {
+        producer.fold_with(consumer.into_folder()).complete()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/positions.rs.html b/src/rayon/iter/positions.rs.html new file mode 100644 index 0000000000..2b5932973b --- /dev/null +++ b/src/rayon/iter/positions.rs.html @@ -0,0 +1,277 @@ +positions.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// `Positions` takes a predicate `predicate` and filters out elements that match,
+/// yielding their indices.
+///
+/// This struct is created by the [`positions()`] method on [`IndexedParallelIterator`]
+///
+/// [`positions()`]: trait.IndexedParallelIterator.html#method.positions
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct Positions<I: IndexedParallelIterator, P> {
+    base: I,
+    predicate: P,
+}
+
+impl<I: IndexedParallelIterator + Debug, P> Debug for Positions<I, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Positions")
+            .field("base", &self.base)
+            .finish()
+    }
+}
+
+impl<I, P> Positions<I, P>
+where
+    I: IndexedParallelIterator,
+{
+    /// Create a new `Positions` iterator.
+    pub(super) fn new(base: I, predicate: P) -> Self {
+        Positions { base, predicate }
+    }
+}
+
+impl<I, P> ParallelIterator for Positions<I, P>
+where
+    I: IndexedParallelIterator,
+    P: Fn(I::Item) -> bool + Sync + Send,
+{
+    type Item = usize;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = PositionsConsumer::new(consumer, &self.predicate, 0);
+        self.base.drive(consumer1)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct PositionsConsumer<'p, C, P> {
+    base: C,
+    predicate: &'p P,
+    offset: usize,
+}
+
+impl<'p, C, P> PositionsConsumer<'p, C, P> {
+    fn new(base: C, predicate: &'p P, offset: usize) -> Self {
+        PositionsConsumer {
+            base,
+            predicate,
+            offset,
+        }
+    }
+}
+
+impl<'p, T, C, P> Consumer<T> for PositionsConsumer<'p, C, P>
+where
+    C: Consumer<usize>,
+    P: Fn(T) -> bool + Sync,
+{
+    type Folder = PositionsFolder<'p, C::Folder, P>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, C::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            PositionsConsumer::new(left, self.predicate, self.offset),
+            PositionsConsumer::new(right, self.predicate, self.offset + index),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        PositionsFolder {
+            base: self.base.into_folder(),
+            predicate: self.predicate,
+            offset: self.offset,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+struct PositionsFolder<'p, F, P> {
+    base: F,
+    predicate: &'p P,
+    offset: usize,
+}
+
+impl<F, P, T> Folder<T> for PositionsFolder<'_, F, P>
+where
+    F: Folder<usize>,
+    P: Fn(T) -> bool,
+{
+    type Result = F::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        let index = self.offset;
+        self.offset += 1;
+        if (self.predicate)(item) {
+            self.base = self.base.consume(index);
+        }
+        self
+    }
+
+    // This cannot easily specialize `consume_iter` to be better than
+    // the default, because that requires checking `self.base.full()`
+    // during a call to `self.base.consume_iter()`. (#632)
+
+    fn complete(self) -> Self::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/product.rs.html b/src/rayon/iter/product.rs.html new file mode 100644 index 0000000000..6fdb8c5505 --- /dev/null +++ b/src/rayon/iter/product.rs.html @@ -0,0 +1,231 @@ +product.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+
use super::plumbing::*;
+use super::ParallelIterator;
+
+use std::iter::{self, Product};
+use std::marker::PhantomData;
+
+pub(super) fn product<PI, P>(pi: PI) -> P
+where
+    PI: ParallelIterator,
+    P: Send + Product<PI::Item> + Product,
+{
+    pi.drive_unindexed(ProductConsumer::new())
+}
+
+fn mul<T: Product>(left: T, right: T) -> T {
+    [left, right].into_iter().product()
+}
+
+struct ProductConsumer<P: Send> {
+    _marker: PhantomData<*const P>,
+}
+
+unsafe impl<P: Send> Send for ProductConsumer<P> {}
+
+impl<P: Send> ProductConsumer<P> {
+    fn new() -> ProductConsumer<P> {
+        ProductConsumer {
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl<P, T> Consumer<T> for ProductConsumer<P>
+where
+    P: Send + Product<T> + Product,
+{
+    type Folder = ProductFolder<P>;
+    type Reducer = Self;
+    type Result = P;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self) {
+        (
+            ProductConsumer::new(),
+            ProductConsumer::new(),
+            ProductConsumer::new(),
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        ProductFolder {
+            product: iter::empty::<T>().product(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<P, T> UnindexedConsumer<T> for ProductConsumer<P>
+where
+    P: Send + Product<T> + Product,
+{
+    fn split_off_left(&self) -> Self {
+        ProductConsumer::new()
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        ProductConsumer::new()
+    }
+}
+
+impl<P> Reducer<P> for ProductConsumer<P>
+where
+    P: Send + Product,
+{
+    fn reduce(self, left: P, right: P) -> P {
+        mul(left, right)
+    }
+}
+
+struct ProductFolder<P> {
+    product: P,
+}
+
+impl<P, T> Folder<T> for ProductFolder<P>
+where
+    P: Product<T> + Product,
+{
+    type Result = P;
+
+    fn consume(self, item: T) -> Self {
+        ProductFolder {
+            product: mul(self.product, iter::once(item).product()),
+        }
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        ProductFolder {
+            product: mul(self.product, iter.into_iter().product()),
+        }
+    }
+
+    fn complete(self) -> P {
+        self.product
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/reduce.rs.html b/src/rayon/iter/reduce.rs.html new file mode 100644 index 0000000000..525c248297 --- /dev/null +++ b/src/rayon/iter/reduce.rs.html @@ -0,0 +1,235 @@ +reduce.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+
use super::plumbing::*;
+use super::ParallelIterator;
+
+pub(super) fn reduce<PI, R, ID, T>(pi: PI, identity: ID, reduce_op: R) -> T
+where
+    PI: ParallelIterator<Item = T>,
+    R: Fn(T, T) -> T + Sync,
+    ID: Fn() -> T + Sync,
+    T: Send,
+{
+    let consumer = ReduceConsumer {
+        identity: &identity,
+        reduce_op: &reduce_op,
+    };
+    pi.drive_unindexed(consumer)
+}
+
+struct ReduceConsumer<'r, R, ID> {
+    identity: &'r ID,
+    reduce_op: &'r R,
+}
+
+impl<'r, R, ID> Copy for ReduceConsumer<'r, R, ID> {}
+
+impl<'r, R, ID> Clone for ReduceConsumer<'r, R, ID> {
+    fn clone(&self) -> Self {
+        *self
+    }
+}
+
+impl<'r, R, ID, T> Consumer<T> for ReduceConsumer<'r, R, ID>
+where
+    R: Fn(T, T) -> T + Sync,
+    ID: Fn() -> T + Sync,
+    T: Send,
+{
+    type Folder = ReduceFolder<'r, R, T>;
+    type Reducer = Self;
+    type Result = T;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self) {
+        (self, self, self)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        ReduceFolder {
+            reduce_op: self.reduce_op,
+            item: (self.identity)(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<'r, R, ID, T> UnindexedConsumer<T> for ReduceConsumer<'r, R, ID>
+where
+    R: Fn(T, T) -> T + Sync,
+    ID: Fn() -> T + Sync,
+    T: Send,
+{
+    fn split_off_left(&self) -> Self {
+        *self
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        *self
+    }
+}
+
+impl<'r, R, ID, T> Reducer<T> for ReduceConsumer<'r, R, ID>
+where
+    R: Fn(T, T) -> T + Sync,
+{
+    fn reduce(self, left: T, right: T) -> T {
+        (self.reduce_op)(left, right)
+    }
+}
+
+struct ReduceFolder<'r, R, T> {
+    reduce_op: &'r R,
+    item: T,
+}
+
+impl<'r, R, T> Folder<T> for ReduceFolder<'r, R, T>
+where
+    R: Fn(T, T) -> T,
+{
+    type Result = T;
+
+    fn consume(self, item: T) -> Self {
+        ReduceFolder {
+            reduce_op: self.reduce_op,
+            item: (self.reduce_op)(self.item, item),
+        }
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        ReduceFolder {
+            reduce_op: self.reduce_op,
+            item: iter.into_iter().fold(self.item, self.reduce_op),
+        }
+    }
+
+    fn complete(self) -> T {
+        self.item
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/repeat.rs.html b/src/rayon/iter/repeat.rs.html new file mode 100644 index 0000000000..c9f933fd88 --- /dev/null +++ b/src/rayon/iter/repeat.rs.html @@ -0,0 +1,485 @@ +repeat.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+
use super::plumbing::*;
+use super::*;
+use std::iter;
+use std::usize;
+
+/// Iterator adaptor for [the `repeat()` function](fn.repeat.html).
+#[derive(Debug, Clone)]
+pub struct Repeat<T: Clone + Send> {
+    element: T,
+}
+
+/// Creates a parallel iterator that endlessly repeats `elt` (by
+/// cloning it). Note that this iterator has "infinite" length, so
+/// typically you would want to use `zip` or `take` or some other
+/// means to shorten it, or consider using
+/// [the `repeatn()` function](fn.repeatn.html) instead.
+///
+/// # Examples
+///
+/// ```
+/// use rayon::prelude::*;
+/// use rayon::iter::repeat;
+/// let x: Vec<(i32, i32)> = repeat(22).zip(0..3).collect();
+/// assert_eq!(x, vec![(22, 0), (22, 1), (22, 2)]);
+/// ```
+pub fn repeat<T: Clone + Send>(elt: T) -> Repeat<T> {
+    Repeat { element: elt }
+}
+
+impl<T> Repeat<T>
+where
+    T: Clone + Send,
+{
+    /// Takes only `n` repeats of the element, similar to the general
+    /// [`take()`](trait.IndexedParallelIterator.html#method.take).
+    ///
+    /// The resulting `RepeatN` is an `IndexedParallelIterator`, allowing
+    /// more functionality than `Repeat` alone.
+    pub fn take(self, n: usize) -> RepeatN<T> {
+        repeatn(self.element, n)
+    }
+
+    /// Iterates tuples, repeating the element with items from another
+    /// iterator, similar to the general
+    /// [`zip()`](trait.IndexedParallelIterator.html#method.zip).
+    pub fn zip<Z>(self, zip_op: Z) -> Zip<RepeatN<T>, Z::Iter>
+    where
+        Z: IntoParallelIterator,
+        Z::Iter: IndexedParallelIterator,
+    {
+        let z = zip_op.into_par_iter();
+        let n = z.len();
+        self.take(n).zip(z)
+    }
+}
+
+impl<T> ParallelIterator for Repeat<T>
+where
+    T: Clone + Send,
+{
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = RepeatProducer {
+            element: self.element,
+        };
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Unindexed producer for `Repeat`.
+struct RepeatProducer<T: Clone + Send> {
+    element: T,
+}
+
+impl<T: Clone + Send> UnindexedProducer for RepeatProducer<T> {
+    type Item = T;
+
+    fn split(self) -> (Self, Option<Self>) {
+        (
+            RepeatProducer {
+                element: self.element.clone(),
+            },
+            Some(RepeatProducer {
+                element: self.element,
+            }),
+        )
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<T>,
+    {
+        folder.consume_iter(iter::repeat(self.element))
+    }
+}
+
+/// Iterator adaptor for [the `repeatn()` function](fn.repeatn.html).
+#[derive(Debug, Clone)]
+pub struct RepeatN<T: Clone + Send> {
+    element: T,
+    count: usize,
+}
+
+/// Creates a parallel iterator that produces `n` repeats of `elt`
+/// (by cloning it).
+///
+/// # Examples
+///
+/// ```
+/// use rayon::prelude::*;
+/// use rayon::iter::repeatn;
+/// let x: Vec<(i32, i32)> = repeatn(22, 3).zip(0..3).collect();
+/// assert_eq!(x, vec![(22, 0), (22, 1), (22, 2)]);
+/// ```
+pub fn repeatn<T: Clone + Send>(elt: T, n: usize) -> RepeatN<T> {
+    RepeatN {
+        element: elt,
+        count: n,
+    }
+}
+
+impl<T> ParallelIterator for RepeatN<T>
+where
+    T: Clone + Send,
+{
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.count)
+    }
+}
+
+impl<T> IndexedParallelIterator for RepeatN<T>
+where
+    T: Clone + Send,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(RepeatNProducer {
+            element: self.element,
+            count: self.count,
+        })
+    }
+
+    fn len(&self) -> usize {
+        self.count
+    }
+}
+
+/// Producer for `RepeatN`.
+struct RepeatNProducer<T: Clone + Send> {
+    element: T,
+    count: usize,
+}
+
+impl<T: Clone + Send> Producer for RepeatNProducer<T> {
+    type Item = T;
+    type IntoIter = Iter<T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        Iter {
+            element: self.element,
+            count: self.count,
+        }
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        (
+            RepeatNProducer {
+                element: self.element.clone(),
+                count: index,
+            },
+            RepeatNProducer {
+                element: self.element,
+                count: self.count - index,
+            },
+        )
+    }
+}
+
+/// Iterator for `RepeatN`.
+///
+/// This is conceptually like `std::iter::Take<std::iter::Repeat<T>>`, but
+/// we need `DoubleEndedIterator` and unconditional `ExactSizeIterator`.
+struct Iter<T: Clone> {
+    element: T,
+    count: usize,
+}
+
+impl<T: Clone> Iterator for Iter<T> {
+    type Item = T;
+
+    #[inline]
+    fn next(&mut self) -> Option<T> {
+        if self.count > 0 {
+            self.count -= 1;
+            Some(self.element.clone())
+        } else {
+            None
+        }
+    }
+
+    #[inline]
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        (self.count, Some(self.count))
+    }
+}
+
+impl<T: Clone> DoubleEndedIterator for Iter<T> {
+    #[inline]
+    fn next_back(&mut self) -> Option<T> {
+        self.next()
+    }
+}
+
+impl<T: Clone> ExactSizeIterator for Iter<T> {
+    #[inline]
+    fn len(&self) -> usize {
+        self.count
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/rev.rs.html b/src/rayon/iter/rev.rs.html new file mode 100644 index 0000000000..54ea3de677 --- /dev/null +++ b/src/rayon/iter/rev.rs.html @@ -0,0 +1,249 @@ +rev.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
use super::plumbing::*;
+use super::*;
+use std::iter;
+
+/// `Rev` is an iterator that produces elements in reverse order. This struct
+/// is created by the [`rev()`] method on [`IndexedParallelIterator`]
+///
+/// [`rev()`]: trait.IndexedParallelIterator.html#method.rev
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Rev<I: IndexedParallelIterator> {
+    base: I,
+}
+
+impl<I> Rev<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `Rev` iterator.
+    pub(super) fn new(base: I) -> Self {
+        Rev { base }
+    }
+}
+
+impl<I> ParallelIterator for Rev<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for Rev<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let len = self.base.len();
+        return self.base.with_producer(Callback { callback, len });
+
+        struct Callback<CB> {
+            callback: CB,
+            len: usize,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+        {
+            type Output = CB::Output;
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = RevProducer {
+                    base,
+                    len: self.len,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+struct RevProducer<P> {
+    base: P,
+    len: usize,
+}
+
+impl<P> Producer for RevProducer<P>
+where
+    P: Producer,
+{
+    type Item = P::Item;
+    type IntoIter = iter::Rev<P::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter().rev()
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(self.len - index);
+        (
+            RevProducer {
+                base: right,
+                len: index,
+            },
+            RevProducer {
+                base: left,
+                len: self.len - index,
+            },
+        )
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/skip.rs.html b/src/rayon/iter/skip.rs.html new file mode 100644 index 0000000000..c6394f547f --- /dev/null +++ b/src/rayon/iter/skip.rs.html @@ -0,0 +1,191 @@ +skip.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+
use super::noop::NoopConsumer;
+use super::plumbing::*;
+use super::*;
+
+/// `Skip` is an iterator that skips over the first `n` elements.
+/// This struct is created by the [`skip()`] method on [`IndexedParallelIterator`]
+///
+/// [`skip()`]: trait.IndexedParallelIterator.html#method.skip
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Skip<I> {
+    base: I,
+    n: usize,
+}
+
+impl<I> Skip<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `Skip` iterator.
+    pub(super) fn new(base: I, n: usize) -> Self {
+        let n = Ord::min(base.len(), n);
+        Skip { base, n }
+    }
+}
+
+impl<I> ParallelIterator for Skip<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for Skip<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn len(&self) -> usize {
+        self.base.len() - self.n
+    }
+
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result {
+        bridge(self, consumer)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            n: self.n,
+        });
+
+        struct Callback<CB> {
+            callback: CB,
+            n: usize,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+        {
+            type Output = CB::Output;
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                crate::in_place_scope(|scope| {
+                    let Self { callback, n } = self;
+                    let (before_skip, after_skip) = base.split_at(n);
+
+                    // Run the skipped part separately for side effects.
+                    // We'll still get any panics propagated back by the scope.
+                    scope.spawn(move |_| bridge_producer_consumer(n, before_skip, NoopConsumer));
+
+                    callback.callback(after_skip)
+                })
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/skip_any.rs.html b/src/rayon/iter/skip_any.rs.html new file mode 100644 index 0000000000..fcf9c92948 --- /dev/null +++ b/src/rayon/iter/skip_any.rs.html @@ -0,0 +1,291 @@ +skip_any.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+
use super::plumbing::*;
+use super::*;
+use std::sync::atomic::{AtomicUsize, Ordering};
+
+/// `SkipAny` is an iterator that skips over `n` elements from anywhere in `I`.
+/// This struct is created by the [`skip_any()`] method on [`ParallelIterator`]
+///
+/// [`skip_any()`]: trait.ParallelIterator.html#method.skip_any
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone, Debug)]
+pub struct SkipAny<I: ParallelIterator> {
+    base: I,
+    count: usize,
+}
+
+impl<I> SkipAny<I>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `SkipAny` iterator.
+    pub(super) fn new(base: I, count: usize) -> Self {
+        SkipAny { base, count }
+    }
+}
+
+impl<I> ParallelIterator for SkipAny<I>
+where
+    I: ParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = SkipAnyConsumer {
+            base: consumer,
+            count: &AtomicUsize::new(self.count),
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct SkipAnyConsumer<'f, C> {
+    base: C,
+    count: &'f AtomicUsize,
+}
+
+impl<'f, T, C> Consumer<T> for SkipAnyConsumer<'f, C>
+where
+    C: Consumer<T>,
+    T: Send,
+{
+    type Folder = SkipAnyFolder<'f, C::Folder>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            SkipAnyConsumer { base: left, ..self },
+            SkipAnyConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        SkipAnyFolder {
+            base: self.base.into_folder(),
+            count: self.count,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, C> UnindexedConsumer<T> for SkipAnyConsumer<'f, C>
+where
+    C: UnindexedConsumer<T>,
+    T: Send,
+{
+    fn split_off_left(&self) -> Self {
+        SkipAnyConsumer {
+            base: self.base.split_off_left(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct SkipAnyFolder<'f, C> {
+    base: C,
+    count: &'f AtomicUsize,
+}
+
+fn checked_decrement(u: &AtomicUsize) -> bool {
+    u.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |u| u.checked_sub(1))
+        .is_ok()
+}
+
+impl<'f, T, C> Folder<T> for SkipAnyFolder<'f, C>
+where
+    C: Folder<T>,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        if !checked_decrement(self.count) {
+            self.base = self.base.consume(item);
+        }
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.base = self.base.consume_iter(
+            iter.into_iter()
+                .skip_while(move |_| checked_decrement(self.count)),
+        );
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/skip_any_while.rs.html b/src/rayon/iter/skip_any_while.rs.html new file mode 100644 index 0000000000..12fbcee7b1 --- /dev/null +++ b/src/rayon/iter/skip_any_while.rs.html @@ -0,0 +1,335 @@ +skip_any_while.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+
use super::plumbing::*;
+use super::*;
+use std::fmt;
+use std::sync::atomic::{AtomicBool, Ordering};
+
+/// `SkipAnyWhile` is an iterator that skips over elements from anywhere in `I`
+/// until the callback returns `false`.
+/// This struct is created by the [`skip_any_while()`] method on [`ParallelIterator`]
+///
+/// [`skip_any_while()`]: trait.ParallelIterator.html#method.skip_any_while
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct SkipAnyWhile<I: ParallelIterator, P> {
+    base: I,
+    predicate: P,
+}
+
+impl<I: ParallelIterator + fmt::Debug, P> fmt::Debug for SkipAnyWhile<I, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("SkipAnyWhile")
+            .field("base", &self.base)
+            .finish()
+    }
+}
+
+impl<I, P> SkipAnyWhile<I, P>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `SkipAnyWhile` iterator.
+    pub(super) fn new(base: I, predicate: P) -> Self {
+        SkipAnyWhile { base, predicate }
+    }
+}
+
+impl<I, P> ParallelIterator for SkipAnyWhile<I, P>
+where
+    I: ParallelIterator,
+    P: Fn(&I::Item) -> bool + Sync + Send,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = SkipAnyWhileConsumer {
+            base: consumer,
+            predicate: &self.predicate,
+            skipping: &AtomicBool::new(true),
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct SkipAnyWhileConsumer<'p, C, P> {
+    base: C,
+    predicate: &'p P,
+    skipping: &'p AtomicBool,
+}
+
+impl<'p, T, C, P> Consumer<T> for SkipAnyWhileConsumer<'p, C, P>
+where
+    C: Consumer<T>,
+    P: Fn(&T) -> bool + Sync,
+{
+    type Folder = SkipAnyWhileFolder<'p, C::Folder, P>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            SkipAnyWhileConsumer { base: left, ..self },
+            SkipAnyWhileConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        SkipAnyWhileFolder {
+            base: self.base.into_folder(),
+            predicate: self.predicate,
+            skipping: self.skipping,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'p, T, C, P> UnindexedConsumer<T> for SkipAnyWhileConsumer<'p, C, P>
+where
+    C: UnindexedConsumer<T>,
+    P: Fn(&T) -> bool + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        SkipAnyWhileConsumer {
+            base: self.base.split_off_left(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct SkipAnyWhileFolder<'p, C, P> {
+    base: C,
+    predicate: &'p P,
+    skipping: &'p AtomicBool,
+}
+
+fn skip<T>(item: &T, skipping: &AtomicBool, predicate: &impl Fn(&T) -> bool) -> bool {
+    if !skipping.load(Ordering::Relaxed) {
+        return false;
+    }
+    if predicate(item) {
+        return true;
+    }
+    skipping.store(false, Ordering::Relaxed);
+    false
+}
+
+impl<'p, T, C, P> Folder<T> for SkipAnyWhileFolder<'p, C, P>
+where
+    C: Folder<T>,
+    P: Fn(&T) -> bool + 'p,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        if !skip(&item, self.skipping, self.predicate) {
+            self.base = self.base.consume(item);
+        }
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.base = self.base.consume_iter(
+            iter.into_iter()
+                .skip_while(move |x| skip(x, self.skipping, self.predicate)),
+        );
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/splitter.rs.html b/src/rayon/iter/splitter.rs.html new file mode 100644 index 0000000000..59f4e4d805 --- /dev/null +++ b/src/rayon/iter/splitter.rs.html @@ -0,0 +1,351 @@ +splitter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// The `split` function takes arbitrary data and a closure that knows how to
+/// split it, and turns this into a `ParallelIterator`.
+///
+/// # Examples
+///
+/// As a simple example, Rayon can recursively split ranges of indices
+///
+/// ```
+/// use rayon::iter;
+/// use rayon::prelude::*;
+/// use std::ops::Range;
+///
+///
+/// // We define a range of indices as follows
+/// type Range1D = Range<usize>;
+///
+/// // Splitting it in two can be done like this
+/// fn split_range1(r: Range1D) -> (Range1D, Option<Range1D>) {
+///     // We are mathematically unable to split the range if there is only
+///     // one point inside of it, but we could stop splitting before that.
+///     if r.end - r.start <= 1 { return (r, None); }
+///
+///     // Here, our range is considered large enough to be splittable
+///     let midpoint = r.start + (r.end - r.start) / 2;
+///     (r.start..midpoint, Some(midpoint..r.end))
+/// }
+///
+/// // By using iter::split, Rayon will split the range until it has enough work
+/// // to feed the CPU cores, then give us the resulting sub-ranges
+/// iter::split(0..4096, split_range1).for_each(|sub_range| {
+///     // As our initial range had a power-of-two size, the final sub-ranges
+///     // should have power-of-two sizes too
+///     assert!((sub_range.end - sub_range.start).is_power_of_two());
+/// });
+/// ```
+///
+/// This recursive splitting can be extended to two or three dimensions,
+/// to reproduce a classic "block-wise" parallelization scheme of graphics and
+/// numerical simulations:
+///
+/// ```
+/// # use rayon::iter;
+/// # use rayon::prelude::*;
+/// # use std::ops::Range;
+/// # type Range1D = Range<usize>;
+/// # fn split_range1(r: Range1D) -> (Range1D, Option<Range1D>) {
+/// #     if r.end - r.start <= 1 { return (r, None); }
+/// #     let midpoint = r.start + (r.end - r.start) / 2;
+/// #     (r.start..midpoint, Some(midpoint..r.end))
+/// # }
+/// #
+/// // A two-dimensional range of indices can be built out of two 1D ones
+/// struct Range2D {
+///     // Range of horizontal indices
+///     pub rx: Range1D,
+///
+///     // Range of vertical indices
+///     pub ry: Range1D,
+/// }
+///
+/// // We want to recursively split them by the largest dimension until we have
+/// // enough sub-ranges to feed our mighty multi-core CPU. This function
+/// // carries out one such split.
+/// fn split_range2(r2: Range2D) -> (Range2D, Option<Range2D>) {
+///     // Decide on which axis (horizontal/vertical) the range should be split
+///     let width = r2.rx.end - r2.rx.start;
+///     let height = r2.ry.end - r2.ry.start;
+///     if width >= height {
+///         // This is a wide range, split it on the horizontal axis
+///         let (split_rx, ry) = (split_range1(r2.rx), r2.ry);
+///         let out1 = Range2D {
+///             rx: split_rx.0,
+///             ry: ry.clone(),
+///         };
+///         let out2 = split_rx.1.map(|rx| Range2D { rx, ry });
+///         (out1, out2)
+///     } else {
+///         // This is a tall range, split it on the vertical axis
+///         let (rx, split_ry) = (r2.rx, split_range1(r2.ry));
+///         let out1 = Range2D {
+///             rx: rx.clone(),
+///             ry: split_ry.0,
+///         };
+///         let out2 = split_ry.1.map(|ry| Range2D { rx, ry, });
+///         (out1, out2)
+///     }
+/// }
+///
+/// // Again, rayon can handle the recursive splitting for us
+/// let range = Range2D { rx: 0..800, ry: 0..600 };
+/// iter::split(range, split_range2).for_each(|sub_range| {
+///     // If the sub-ranges were indeed split by the largest dimension, then
+///     // if no dimension was twice larger than the other initially, this
+///     // property will remain true in the final sub-ranges.
+///     let width = sub_range.rx.end - sub_range.rx.start;
+///     let height = sub_range.ry.end - sub_range.ry.start;
+///     assert!((width / 2 <= height) && (height / 2 <= width));
+/// });
+/// ```
+///
+pub fn split<D, S>(data: D, splitter: S) -> Split<D, S>
+where
+    D: Send,
+    S: Fn(D) -> (D, Option<D>) + Sync,
+{
+    Split { data, splitter }
+}
+
+/// `Split` is a parallel iterator using arbitrary data and a splitting function.
+/// This struct is created by the [`split()`] function.
+///
+/// [`split()`]: fn.split.html
+#[derive(Clone)]
+pub struct Split<D, S> {
+    data: D,
+    splitter: S,
+}
+
+impl<D: Debug, S> Debug for Split<D, S> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Split").field("data", &self.data).finish()
+    }
+}
+
+impl<D, S> ParallelIterator for Split<D, S>
+where
+    D: Send,
+    S: Fn(D) -> (D, Option<D>) + Sync + Send,
+{
+    type Item = D;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitProducer {
+            data: self.data,
+            splitter: &self.splitter,
+        };
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+struct SplitProducer<'a, D, S> {
+    data: D,
+    splitter: &'a S,
+}
+
+impl<'a, D, S> UnindexedProducer for SplitProducer<'a, D, S>
+where
+    D: Send,
+    S: Fn(D) -> (D, Option<D>) + Sync,
+{
+    type Item = D;
+
+    fn split(mut self) -> (Self, Option<Self>) {
+        let splitter = self.splitter;
+        let (left, right) = splitter(self.data);
+        self.data = left;
+        (self, right.map(|data| SplitProducer { data, splitter }))
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        folder.consume(self.data)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/step_by.rs.html b/src/rayon/iter/step_by.rs.html new file mode 100644 index 0000000000..832189a71b --- /dev/null +++ b/src/rayon/iter/step_by.rs.html @@ -0,0 +1,285 @@ +step_by.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+
use super::plumbing::*;
+use super::*;
+use crate::math::div_round_up;
+use std::iter;
+use std::usize;
+
+/// `StepBy` is an iterator that skips `n` elements between each yield, where `n` is the given step.
+/// This struct is created by the [`step_by()`] method on [`IndexedParallelIterator`]
+///
+/// [`step_by()`]: trait.IndexedParallelIterator.html#method.step_by
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct StepBy<I: IndexedParallelIterator> {
+    base: I,
+    step: usize,
+}
+
+impl<I> StepBy<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `StepBy` iterator.
+    pub(super) fn new(base: I, step: usize) -> Self {
+        StepBy { base, step }
+    }
+}
+
+impl<I> ParallelIterator for StepBy<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for StepBy<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        div_round_up(self.base.len(), self.step)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        let len = self.base.len();
+        return self.base.with_producer(Callback {
+            callback,
+            step: self.step,
+            len,
+        });
+
+        struct Callback<CB> {
+            callback: CB,
+            step: usize,
+            len: usize,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+        {
+            type Output = CB::Output;
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = StepByProducer {
+                    base,
+                    step: self.step,
+                    len: self.len,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Producer implementation
+
+struct StepByProducer<P> {
+    base: P,
+    step: usize,
+    len: usize,
+}
+
+impl<P> Producer for StepByProducer<P>
+where
+    P: Producer,
+{
+    type Item = P::Item;
+    type IntoIter = iter::StepBy<P::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.base.into_iter().step_by(self.step)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = Ord::min(index * self.step, self.len);
+
+        let (left, right) = self.base.split_at(elem_index);
+        (
+            StepByProducer {
+                base: left,
+                step: self.step,
+                len: elem_index,
+            },
+            StepByProducer {
+                base: right,
+                step: self.step,
+                len: self.len - elem_index,
+            },
+        )
+    }
+
+    fn min_len(&self) -> usize {
+        div_round_up(self.base.min_len(), self.step)
+    }
+
+    fn max_len(&self) -> usize {
+        self.base.max_len() / self.step
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/sum.rs.html b/src/rayon/iter/sum.rs.html new file mode 100644 index 0000000000..933fd7645e --- /dev/null +++ b/src/rayon/iter/sum.rs.html @@ -0,0 +1,223 @@ +sum.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+
use super::plumbing::*;
+use super::ParallelIterator;
+
+use std::iter::{self, Sum};
+use std::marker::PhantomData;
+
+pub(super) fn sum<PI, S>(pi: PI) -> S
+where
+    PI: ParallelIterator,
+    S: Send + Sum<PI::Item> + Sum,
+{
+    pi.drive_unindexed(SumConsumer::new())
+}
+
+fn add<T: Sum>(left: T, right: T) -> T {
+    [left, right].into_iter().sum()
+}
+
+struct SumConsumer<S: Send> {
+    _marker: PhantomData<*const S>,
+}
+
+unsafe impl<S: Send> Send for SumConsumer<S> {}
+
+impl<S: Send> SumConsumer<S> {
+    fn new() -> SumConsumer<S> {
+        SumConsumer {
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl<S, T> Consumer<T> for SumConsumer<S>
+where
+    S: Send + Sum<T> + Sum,
+{
+    type Folder = SumFolder<S>;
+    type Reducer = Self;
+    type Result = S;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self) {
+        (SumConsumer::new(), SumConsumer::new(), SumConsumer::new())
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        SumFolder {
+            sum: iter::empty::<T>().sum(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
+impl<S, T> UnindexedConsumer<T> for SumConsumer<S>
+where
+    S: Send + Sum<T> + Sum,
+{
+    fn split_off_left(&self) -> Self {
+        SumConsumer::new()
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        SumConsumer::new()
+    }
+}
+
+impl<S> Reducer<S> for SumConsumer<S>
+where
+    S: Send + Sum,
+{
+    fn reduce(self, left: S, right: S) -> S {
+        add(left, right)
+    }
+}
+
+struct SumFolder<S> {
+    sum: S,
+}
+
+impl<S, T> Folder<T> for SumFolder<S>
+where
+    S: Sum<T> + Sum,
+{
+    type Result = S;
+
+    fn consume(self, item: T) -> Self {
+        SumFolder {
+            sum: add(self.sum, iter::once(item).sum()),
+        }
+    }
+
+    fn consume_iter<I>(self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        SumFolder {
+            sum: add(self.sum, iter.into_iter().sum()),
+        }
+    }
+
+    fn complete(self) -> S {
+        self.sum
+    }
+
+    fn full(&self) -> bool {
+        false
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/take.rs.html b/src/rayon/iter/take.rs.html new file mode 100644 index 0000000000..2aefc21c2e --- /dev/null +++ b/src/rayon/iter/take.rs.html @@ -0,0 +1,173 @@ +take.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+
use super::plumbing::*;
+use super::*;
+
+/// `Take` is an iterator that iterates over the first `n` elements.
+/// This struct is created by the [`take()`] method on [`IndexedParallelIterator`]
+///
+/// [`take()`]: trait.IndexedParallelIterator.html#method.take
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Take<I> {
+    base: I,
+    n: usize,
+}
+
+impl<I> Take<I>
+where
+    I: IndexedParallelIterator,
+{
+    /// Creates a new `Take` iterator.
+    pub(super) fn new(base: I, n: usize) -> Self {
+        let n = Ord::min(base.len(), n);
+        Take { base, n }
+    }
+}
+
+impl<I> ParallelIterator for Take<I>
+where
+    I: IndexedParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<I> IndexedParallelIterator for Take<I>
+where
+    I: IndexedParallelIterator,
+{
+    fn len(&self) -> usize {
+        self.n
+    }
+
+    fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Result {
+        bridge(self, consumer)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            n: self.n,
+        });
+
+        struct Callback<CB> {
+            callback: CB,
+            n: usize,
+        }
+
+        impl<T, CB> ProducerCallback<T> for Callback<CB>
+        where
+            CB: ProducerCallback<T>,
+        {
+            type Output = CB::Output;
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let (producer, _) = base.split_at(self.n);
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/take_any.rs.html b/src/rayon/iter/take_any.rs.html new file mode 100644 index 0000000000..f53d315f6a --- /dev/null +++ b/src/rayon/iter/take_any.rs.html @@ -0,0 +1,291 @@ +take_any.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+
use super::plumbing::*;
+use super::*;
+use std::sync::atomic::{AtomicUsize, Ordering};
+
+/// `TakeAny` is an iterator that iterates over `n` elements from anywhere in `I`.
+/// This struct is created by the [`take_any()`] method on [`ParallelIterator`]
+///
+/// [`take_any()`]: trait.ParallelIterator.html#method.take_any
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone, Debug)]
+pub struct TakeAny<I: ParallelIterator> {
+    base: I,
+    count: usize,
+}
+
+impl<I> TakeAny<I>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `TakeAny` iterator.
+    pub(super) fn new(base: I, count: usize) -> Self {
+        TakeAny { base, count }
+    }
+}
+
+impl<I> ParallelIterator for TakeAny<I>
+where
+    I: ParallelIterator,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = TakeAnyConsumer {
+            base: consumer,
+            count: &AtomicUsize::new(self.count),
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct TakeAnyConsumer<'f, C> {
+    base: C,
+    count: &'f AtomicUsize,
+}
+
+impl<'f, T, C> Consumer<T> for TakeAnyConsumer<'f, C>
+where
+    C: Consumer<T>,
+    T: Send,
+{
+    type Folder = TakeAnyFolder<'f, C::Folder>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            TakeAnyConsumer { base: left, ..self },
+            TakeAnyConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        TakeAnyFolder {
+            base: self.base.into_folder(),
+            count: self.count,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.count.load(Ordering::Relaxed) == 0 || self.base.full()
+    }
+}
+
+impl<'f, T, C> UnindexedConsumer<T> for TakeAnyConsumer<'f, C>
+where
+    C: UnindexedConsumer<T>,
+    T: Send,
+{
+    fn split_off_left(&self) -> Self {
+        TakeAnyConsumer {
+            base: self.base.split_off_left(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct TakeAnyFolder<'f, C> {
+    base: C,
+    count: &'f AtomicUsize,
+}
+
+fn checked_decrement(u: &AtomicUsize) -> bool {
+    u.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |u| u.checked_sub(1))
+        .is_ok()
+}
+
+impl<'f, T, C> Folder<T> for TakeAnyFolder<'f, C>
+where
+    C: Folder<T>,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        if checked_decrement(self.count) {
+            self.base = self.base.consume(item);
+        }
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.base = self.base.consume_iter(
+            iter.into_iter()
+                .take_while(move |_| checked_decrement(self.count)),
+        );
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.count.load(Ordering::Relaxed) == 0 || self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/take_any_while.rs.html b/src/rayon/iter/take_any_while.rs.html new file mode 100644 index 0000000000..face487a2d --- /dev/null +++ b/src/rayon/iter/take_any_while.rs.html @@ -0,0 +1,335 @@ +take_any_while.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+
use super::plumbing::*;
+use super::*;
+use std::fmt;
+use std::sync::atomic::{AtomicBool, Ordering};
+
+/// `TakeAnyWhile` is an iterator that iterates over elements from anywhere in `I`
+/// until the callback returns `false`.
+/// This struct is created by the [`take_any_while()`] method on [`ParallelIterator`]
+///
+/// [`take_any_while()`]: trait.ParallelIterator.html#method.take_any_while
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct TakeAnyWhile<I: ParallelIterator, P> {
+    base: I,
+    predicate: P,
+}
+
+impl<I: ParallelIterator + fmt::Debug, P> fmt::Debug for TakeAnyWhile<I, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("TakeAnyWhile")
+            .field("base", &self.base)
+            .finish()
+    }
+}
+
+impl<I, P> TakeAnyWhile<I, P>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `TakeAnyWhile` iterator.
+    pub(super) fn new(base: I, predicate: P) -> Self {
+        TakeAnyWhile { base, predicate }
+    }
+}
+
+impl<I, P> ParallelIterator for TakeAnyWhile<I, P>
+where
+    I: ParallelIterator,
+    P: Fn(&I::Item) -> bool + Sync + Send,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = TakeAnyWhileConsumer {
+            base: consumer,
+            predicate: &self.predicate,
+            taking: &AtomicBool::new(true),
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct TakeAnyWhileConsumer<'p, C, P> {
+    base: C,
+    predicate: &'p P,
+    taking: &'p AtomicBool,
+}
+
+impl<'p, T, C, P> Consumer<T> for TakeAnyWhileConsumer<'p, C, P>
+where
+    C: Consumer<T>,
+    P: Fn(&T) -> bool + Sync,
+{
+    type Folder = TakeAnyWhileFolder<'p, C::Folder, P>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            TakeAnyWhileConsumer { base: left, ..self },
+            TakeAnyWhileConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        TakeAnyWhileFolder {
+            base: self.base.into_folder(),
+            predicate: self.predicate,
+            taking: self.taking,
+        }
+    }
+
+    fn full(&self) -> bool {
+        !self.taking.load(Ordering::Relaxed) || self.base.full()
+    }
+}
+
+impl<'p, T, C, P> UnindexedConsumer<T> for TakeAnyWhileConsumer<'p, C, P>
+where
+    C: UnindexedConsumer<T>,
+    P: Fn(&T) -> bool + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        TakeAnyWhileConsumer {
+            base: self.base.split_off_left(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct TakeAnyWhileFolder<'p, C, P> {
+    base: C,
+    predicate: &'p P,
+    taking: &'p AtomicBool,
+}
+
+fn take<T>(item: &T, taking: &AtomicBool, predicate: &impl Fn(&T) -> bool) -> bool {
+    if !taking.load(Ordering::Relaxed) {
+        return false;
+    }
+    if predicate(item) {
+        return true;
+    }
+    taking.store(false, Ordering::Relaxed);
+    false
+}
+
+impl<'p, T, C, P> Folder<T> for TakeAnyWhileFolder<'p, C, P>
+where
+    C: Folder<T>,
+    P: Fn(&T) -> bool + 'p,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        if take(&item, self.taking, self.predicate) {
+            self.base = self.base.consume(item);
+        }
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        self.base = self.base.consume_iter(
+            iter.into_iter()
+                .take_while(move |x| take(x, self.taking, self.predicate)),
+        );
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        !self.taking.load(Ordering::Relaxed) || self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/try_fold.rs.html b/src/rayon/iter/try_fold.rs.html new file mode 100644 index 0000000000..3dee3e2b04 --- /dev/null +++ b/src/rayon/iter/try_fold.rs.html @@ -0,0 +1,599 @@ +try_fold.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+
use super::plumbing::*;
+use super::ParallelIterator;
+use super::Try;
+
+use std::fmt::{self, Debug};
+use std::marker::PhantomData;
+use std::ops::ControlFlow::{self, Break, Continue};
+
+impl<U, I, ID, F> TryFold<I, U, ID, F>
+where
+    I: ParallelIterator,
+    F: Fn(U::Output, I::Item) -> U + Sync + Send,
+    ID: Fn() -> U::Output + Sync + Send,
+    U: Try + Send,
+{
+    pub(super) fn new(base: I, identity: ID, fold_op: F) -> Self {
+        TryFold {
+            base,
+            identity,
+            fold_op,
+            marker: PhantomData,
+        }
+    }
+}
+
+/// `TryFold` is an iterator that applies a function over an iterator producing a single value.
+/// This struct is created by the [`try_fold()`] method on [`ParallelIterator`]
+///
+/// [`try_fold()`]: trait.ParallelIterator.html#method.try_fold
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct TryFold<I, U, ID, F> {
+    base: I,
+    identity: ID,
+    fold_op: F,
+    marker: PhantomData<U>,
+}
+
+impl<U, I: ParallelIterator + Debug, ID, F> Debug for TryFold<I, U, ID, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("TryFold").field("base", &self.base).finish()
+    }
+}
+
+impl<U, I, ID, F> ParallelIterator for TryFold<I, U, ID, F>
+where
+    I: ParallelIterator,
+    F: Fn(U::Output, I::Item) -> U + Sync + Send,
+    ID: Fn() -> U::Output + Sync + Send,
+    U: Try + Send,
+{
+    type Item = U;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = TryFoldConsumer {
+            base: consumer,
+            identity: &self.identity,
+            fold_op: &self.fold_op,
+            marker: PhantomData,
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+struct TryFoldConsumer<'c, U, C, ID, F> {
+    base: C,
+    identity: &'c ID,
+    fold_op: &'c F,
+    marker: PhantomData<U>,
+}
+
+impl<'r, U, T, C, ID, F> Consumer<T> for TryFoldConsumer<'r, U, C, ID, F>
+where
+    C: Consumer<U>,
+    F: Fn(U::Output, T) -> U + Sync,
+    ID: Fn() -> U::Output + Sync,
+    U: Try + Send,
+{
+    type Folder = TryFoldFolder<'r, C::Folder, U, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            TryFoldConsumer { base: left, ..self },
+            TryFoldConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        TryFoldFolder {
+            base: self.base.into_folder(),
+            control: Continue((self.identity)()),
+            fold_op: self.fold_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'r, U, T, C, ID, F> UnindexedConsumer<T> for TryFoldConsumer<'r, U, C, ID, F>
+where
+    C: UnindexedConsumer<U>,
+    F: Fn(U::Output, T) -> U + Sync,
+    ID: Fn() -> U::Output + Sync,
+    U: Try + Send,
+{
+    fn split_off_left(&self) -> Self {
+        TryFoldConsumer {
+            base: self.base.split_off_left(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct TryFoldFolder<'r, C, U: Try, F> {
+    base: C,
+    fold_op: &'r F,
+    control: ControlFlow<U::Residual, U::Output>,
+}
+
+impl<'r, C, U, F, T> Folder<T> for TryFoldFolder<'r, C, U, F>
+where
+    C: Folder<U>,
+    F: Fn(U::Output, T) -> U + Sync,
+    U: Try,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: T) -> Self {
+        let fold_op = self.fold_op;
+        if let Continue(acc) = self.control {
+            self.control = fold_op(acc, item).branch();
+        }
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        let item = match self.control {
+            Continue(c) => U::from_output(c),
+            Break(r) => U::from_residual(r),
+        };
+        self.base.consume(item).complete()
+    }
+
+    fn full(&self) -> bool {
+        match self.control {
+            Break(_) => true,
+            _ => self.base.full(),
+        }
+    }
+}
+
+// ///////////////////////////////////////////////////////////////////////////
+
+impl<U, I, F> TryFoldWith<I, U, F>
+where
+    I: ParallelIterator,
+    F: Fn(U::Output, I::Item) -> U + Sync,
+    U: Try + Send,
+    U::Output: Clone + Send,
+{
+    pub(super) fn new(base: I, item: U::Output, fold_op: F) -> Self {
+        TryFoldWith {
+            base,
+            item,
+            fold_op,
+        }
+    }
+}
+
+/// `TryFoldWith` is an iterator that applies a function over an iterator producing a single value.
+/// This struct is created by the [`try_fold_with()`] method on [`ParallelIterator`]
+///
+/// [`try_fold_with()`]: trait.ParallelIterator.html#method.try_fold_with
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct TryFoldWith<I, U: Try, F> {
+    base: I,
+    item: U::Output,
+    fold_op: F,
+}
+
+impl<I: ParallelIterator + Debug, U: Try, F> Debug for TryFoldWith<I, U, F>
+where
+    U::Output: Debug,
+{
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("TryFoldWith")
+            .field("base", &self.base)
+            .field("item", &self.item)
+            .finish()
+    }
+}
+
+impl<U, I, F> ParallelIterator for TryFoldWith<I, U, F>
+where
+    I: ParallelIterator,
+    F: Fn(U::Output, I::Item) -> U + Sync + Send,
+    U: Try + Send,
+    U::Output: Clone + Send,
+{
+    type Item = U;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = TryFoldWithConsumer {
+            base: consumer,
+            item: self.item,
+            fold_op: &self.fold_op,
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+struct TryFoldWithConsumer<'c, C, U: Try, F> {
+    base: C,
+    item: U::Output,
+    fold_op: &'c F,
+}
+
+impl<'r, U, T, C, F> Consumer<T> for TryFoldWithConsumer<'r, C, U, F>
+where
+    C: Consumer<U>,
+    F: Fn(U::Output, T) -> U + Sync,
+    U: Try + Send,
+    U::Output: Clone + Send,
+{
+    type Folder = TryFoldFolder<'r, C::Folder, U, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            TryFoldWithConsumer {
+                base: left,
+                item: self.item.clone(),
+                ..self
+            },
+            TryFoldWithConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        TryFoldFolder {
+            base: self.base.into_folder(),
+            control: Continue(self.item),
+            fold_op: self.fold_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'r, U, T, C, F> UnindexedConsumer<T> for TryFoldWithConsumer<'r, C, U, F>
+where
+    C: UnindexedConsumer<U>,
+    F: Fn(U::Output, T) -> U + Sync,
+    U: Try + Send,
+    U::Output: Clone + Send,
+{
+    fn split_off_left(&self) -> Self {
+        TryFoldWithConsumer {
+            base: self.base.split_off_left(),
+            item: self.item.clone(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/try_reduce.rs.html b/src/rayon/iter/try_reduce.rs.html new file mode 100644 index 0000000000..cbdb7b0846 --- /dev/null +++ b/src/rayon/iter/try_reduce.rs.html @@ -0,0 +1,265 @@ +try_reduce.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+
use super::plumbing::*;
+use super::ParallelIterator;
+use super::Try;
+
+use std::ops::ControlFlow::{self, Break, Continue};
+use std::sync::atomic::{AtomicBool, Ordering};
+
+pub(super) fn try_reduce<PI, R, ID, T>(pi: PI, identity: ID, reduce_op: R) -> T
+where
+    PI: ParallelIterator<Item = T>,
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    ID: Fn() -> T::Output + Sync,
+    T: Try + Send,
+{
+    let full = AtomicBool::new(false);
+    let consumer = TryReduceConsumer {
+        identity: &identity,
+        reduce_op: &reduce_op,
+        full: &full,
+    };
+    pi.drive_unindexed(consumer)
+}
+
+struct TryReduceConsumer<'r, R, ID> {
+    identity: &'r ID,
+    reduce_op: &'r R,
+    full: &'r AtomicBool,
+}
+
+impl<'r, R, ID> Copy for TryReduceConsumer<'r, R, ID> {}
+
+impl<'r, R, ID> Clone for TryReduceConsumer<'r, R, ID> {
+    fn clone(&self) -> Self {
+        *self
+    }
+}
+
+impl<'r, R, ID, T> Consumer<T> for TryReduceConsumer<'r, R, ID>
+where
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    ID: Fn() -> T::Output + Sync,
+    T: Try + Send,
+{
+    type Folder = TryReduceFolder<'r, R, T>;
+    type Reducer = Self;
+    type Result = T;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self) {
+        (self, self, self)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        TryReduceFolder {
+            reduce_op: self.reduce_op,
+            control: Continue((self.identity)()),
+            full: self.full,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.full.load(Ordering::Relaxed)
+    }
+}
+
+impl<'r, R, ID, T> UnindexedConsumer<T> for TryReduceConsumer<'r, R, ID>
+where
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    ID: Fn() -> T::Output + Sync,
+    T: Try + Send,
+{
+    fn split_off_left(&self) -> Self {
+        *self
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        *self
+    }
+}
+
+impl<'r, R, ID, T> Reducer<T> for TryReduceConsumer<'r, R, ID>
+where
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    T: Try,
+{
+    fn reduce(self, left: T, right: T) -> T {
+        match (left.branch(), right.branch()) {
+            (Continue(left), Continue(right)) => (self.reduce_op)(left, right),
+            (Break(r), _) | (_, Break(r)) => T::from_residual(r),
+        }
+    }
+}
+
+struct TryReduceFolder<'r, R, T: Try> {
+    reduce_op: &'r R,
+    control: ControlFlow<T::Residual, T::Output>,
+    full: &'r AtomicBool,
+}
+
+impl<'r, R, T> Folder<T> for TryReduceFolder<'r, R, T>
+where
+    R: Fn(T::Output, T::Output) -> T,
+    T: Try,
+{
+    type Result = T;
+
+    fn consume(mut self, item: T) -> Self {
+        let reduce_op = self.reduce_op;
+        self.control = match (self.control, item.branch()) {
+            (Continue(left), Continue(right)) => reduce_op(left, right).branch(),
+            (control @ Break(_), _) | (_, control @ Break(_)) => control,
+        };
+        if let Break(_) = self.control {
+            self.full.store(true, Ordering::Relaxed);
+        }
+        self
+    }
+
+    fn complete(self) -> T {
+        match self.control {
+            Continue(c) => T::from_output(c),
+            Break(r) => T::from_residual(r),
+        }
+    }
+
+    fn full(&self) -> bool {
+        match self.control {
+            Break(_) => true,
+            _ => self.full.load(Ordering::Relaxed),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/try_reduce_with.rs.html b/src/rayon/iter/try_reduce_with.rs.html new file mode 100644 index 0000000000..4edb50e6a9 --- /dev/null +++ b/src/rayon/iter/try_reduce_with.rs.html @@ -0,0 +1,267 @@ +try_reduce_with.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+
use super::plumbing::*;
+use super::ParallelIterator;
+use super::Try;
+
+use std::ops::ControlFlow::{self, Break, Continue};
+use std::sync::atomic::{AtomicBool, Ordering};
+
+pub(super) fn try_reduce_with<PI, R, T>(pi: PI, reduce_op: R) -> Option<T>
+where
+    PI: ParallelIterator<Item = T>,
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    T: Try + Send,
+{
+    let full = AtomicBool::new(false);
+    let consumer = TryReduceWithConsumer {
+        reduce_op: &reduce_op,
+        full: &full,
+    };
+    pi.drive_unindexed(consumer)
+}
+
+struct TryReduceWithConsumer<'r, R> {
+    reduce_op: &'r R,
+    full: &'r AtomicBool,
+}
+
+impl<'r, R> Copy for TryReduceWithConsumer<'r, R> {}
+
+impl<'r, R> Clone for TryReduceWithConsumer<'r, R> {
+    fn clone(&self) -> Self {
+        *self
+    }
+}
+
+impl<'r, R, T> Consumer<T> for TryReduceWithConsumer<'r, R>
+where
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    T: Try + Send,
+{
+    type Folder = TryReduceWithFolder<'r, R, T>;
+    type Reducer = Self;
+    type Result = Option<T>;
+
+    fn split_at(self, _index: usize) -> (Self, Self, Self) {
+        (self, self, self)
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        TryReduceWithFolder {
+            reduce_op: self.reduce_op,
+            opt_control: None,
+            full: self.full,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.full.load(Ordering::Relaxed)
+    }
+}
+
+impl<'r, R, T> UnindexedConsumer<T> for TryReduceWithConsumer<'r, R>
+where
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    T: Try + Send,
+{
+    fn split_off_left(&self) -> Self {
+        *self
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        *self
+    }
+}
+
+impl<'r, R, T> Reducer<Option<T>> for TryReduceWithConsumer<'r, R>
+where
+    R: Fn(T::Output, T::Output) -> T + Sync,
+    T: Try,
+{
+    fn reduce(self, left: Option<T>, right: Option<T>) -> Option<T> {
+        let reduce_op = self.reduce_op;
+        match (left, right) {
+            (Some(left), Some(right)) => match (left.branch(), right.branch()) {
+                (Continue(left), Continue(right)) => Some(reduce_op(left, right)),
+                (Break(r), _) | (_, Break(r)) => Some(T::from_residual(r)),
+            },
+            (None, x) | (x, None) => x,
+        }
+    }
+}
+
+struct TryReduceWithFolder<'r, R, T: Try> {
+    reduce_op: &'r R,
+    opt_control: Option<ControlFlow<T::Residual, T::Output>>,
+    full: &'r AtomicBool,
+}
+
+impl<'r, R, T> Folder<T> for TryReduceWithFolder<'r, R, T>
+where
+    R: Fn(T::Output, T::Output) -> T,
+    T: Try,
+{
+    type Result = Option<T>;
+
+    fn consume(mut self, item: T) -> Self {
+        let reduce_op = self.reduce_op;
+        let control = match (self.opt_control, item.branch()) {
+            (Some(Continue(left)), Continue(right)) => reduce_op(left, right).branch(),
+            (Some(control @ Break(_)), _) | (_, control) => control,
+        };
+        if let Break(_) = control {
+            self.full.store(true, Ordering::Relaxed)
+        }
+        self.opt_control = Some(control);
+        self
+    }
+
+    fn complete(self) -> Option<T> {
+        match self.opt_control {
+            Some(Continue(c)) => Some(T::from_output(c)),
+            Some(Break(r)) => Some(T::from_residual(r)),
+            None => None,
+        }
+    }
+
+    fn full(&self) -> bool {
+        match self.opt_control {
+            Some(Break(_)) => true,
+            _ => self.full.load(Ordering::Relaxed),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/unzip.rs.html b/src/rayon/iter/unzip.rs.html new file mode 100644 index 0000000000..96cefe0c20 --- /dev/null +++ b/src/rayon/iter/unzip.rs.html @@ -0,0 +1,1053 @@ +unzip.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+
use super::plumbing::*;
+use super::*;
+
+/// This trait abstracts the different ways we can "unzip" one parallel
+/// iterator into two distinct consumers, which we can handle almost
+/// identically apart from how to process the individual items.
+trait UnzipOp<T>: Sync + Send {
+    /// The type of item expected by the left consumer.
+    type Left: Send;
+
+    /// The type of item expected by the right consumer.
+    type Right: Send;
+
+    /// Consumes one item and feeds it to one or both of the underlying folders.
+    fn consume<FA, FB>(&self, item: T, left: FA, right: FB) -> (FA, FB)
+    where
+        FA: Folder<Self::Left>,
+        FB: Folder<Self::Right>;
+
+    /// Reports whether this op may support indexed consumers.
+    /// - e.g. true for `unzip` where the item count passed through directly.
+    /// - e.g. false for `partition` where the sorting is not yet known.
+    fn indexable() -> bool {
+        false
+    }
+}
+
+/// Runs an unzip-like operation into default `ParallelExtend` collections.
+fn execute<I, OP, FromA, FromB>(pi: I, op: OP) -> (FromA, FromB)
+where
+    I: ParallelIterator,
+    OP: UnzipOp<I::Item>,
+    FromA: Default + Send + ParallelExtend<OP::Left>,
+    FromB: Default + Send + ParallelExtend<OP::Right>,
+{
+    let mut a = FromA::default();
+    let mut b = FromB::default();
+    execute_into(&mut a, &mut b, pi, op);
+    (a, b)
+}
+
+/// Runs an unzip-like operation into `ParallelExtend` collections.
+fn execute_into<I, OP, FromA, FromB>(a: &mut FromA, b: &mut FromB, pi: I, op: OP)
+where
+    I: ParallelIterator,
+    OP: UnzipOp<I::Item>,
+    FromA: Send + ParallelExtend<OP::Left>,
+    FromB: Send + ParallelExtend<OP::Right>,
+{
+    // We have no idea what the consumers will look like for these
+    // collections' `par_extend`, but we can intercept them in our own
+    // `drive_unindexed`.  Start with the left side, type `A`:
+    let iter = UnzipA { base: pi, op, b };
+    a.par_extend(iter);
+}
+
+/// Unzips the items of a parallel iterator into a pair of arbitrary
+/// `ParallelExtend` containers.
+///
+/// This is called by `ParallelIterator::unzip`.
+pub(super) fn unzip<I, A, B, FromA, FromB>(pi: I) -> (FromA, FromB)
+where
+    I: ParallelIterator<Item = (A, B)>,
+    FromA: Default + Send + ParallelExtend<A>,
+    FromB: Default + Send + ParallelExtend<B>,
+    A: Send,
+    B: Send,
+{
+    execute(pi, Unzip)
+}
+
+/// Unzips an `IndexedParallelIterator` into two arbitrary `Consumer`s.
+///
+/// This is called by `super::collect::unzip_into_vecs`.
+pub(super) fn unzip_indexed<I, A, B, CA, CB>(pi: I, left: CA, right: CB) -> (CA::Result, CB::Result)
+where
+    I: IndexedParallelIterator<Item = (A, B)>,
+    CA: Consumer<A>,
+    CB: Consumer<B>,
+    A: Send,
+    B: Send,
+{
+    let consumer = UnzipConsumer {
+        op: &Unzip,
+        left,
+        right,
+    };
+    pi.drive(consumer)
+}
+
+/// An `UnzipOp` that splits a tuple directly into the two consumers.
+struct Unzip;
+
+impl<A: Send, B: Send> UnzipOp<(A, B)> for Unzip {
+    type Left = A;
+    type Right = B;
+
+    fn consume<FA, FB>(&self, item: (A, B), left: FA, right: FB) -> (FA, FB)
+    where
+        FA: Folder<A>,
+        FB: Folder<B>,
+    {
+        (left.consume(item.0), right.consume(item.1))
+    }
+
+    fn indexable() -> bool {
+        true
+    }
+}
+
+/// Partitions the items of a parallel iterator into a pair of arbitrary
+/// `ParallelExtend` containers.
+///
+/// This is called by `ParallelIterator::partition`.
+pub(super) fn partition<I, A, B, P>(pi: I, predicate: P) -> (A, B)
+where
+    I: ParallelIterator,
+    A: Default + Send + ParallelExtend<I::Item>,
+    B: Default + Send + ParallelExtend<I::Item>,
+    P: Fn(&I::Item) -> bool + Sync + Send,
+{
+    execute(pi, Partition { predicate })
+}
+
+/// An `UnzipOp` that routes items depending on a predicate function.
+struct Partition<P> {
+    predicate: P,
+}
+
+impl<P, T> UnzipOp<T> for Partition<P>
+where
+    P: Fn(&T) -> bool + Sync + Send,
+    T: Send,
+{
+    type Left = T;
+    type Right = T;
+
+    fn consume<FA, FB>(&self, item: T, left: FA, right: FB) -> (FA, FB)
+    where
+        FA: Folder<T>,
+        FB: Folder<T>,
+    {
+        if (self.predicate)(&item) {
+            (left.consume(item), right)
+        } else {
+            (left, right.consume(item))
+        }
+    }
+}
+
+/// Partitions and maps the items of a parallel iterator into a pair of
+/// arbitrary `ParallelExtend` containers.
+///
+/// This called by `ParallelIterator::partition_map`.
+pub(super) fn partition_map<I, A, B, P, L, R>(pi: I, predicate: P) -> (A, B)
+where
+    I: ParallelIterator,
+    A: Default + Send + ParallelExtend<L>,
+    B: Default + Send + ParallelExtend<R>,
+    P: Fn(I::Item) -> Either<L, R> + Sync + Send,
+    L: Send,
+    R: Send,
+{
+    execute(pi, PartitionMap { predicate })
+}
+
+/// An `UnzipOp` that routes items depending on how they are mapped `Either`.
+struct PartitionMap<P> {
+    predicate: P,
+}
+
+impl<P, L, R, T> UnzipOp<T> for PartitionMap<P>
+where
+    P: Fn(T) -> Either<L, R> + Sync + Send,
+    L: Send,
+    R: Send,
+{
+    type Left = L;
+    type Right = R;
+
+    fn consume<FA, FB>(&self, item: T, left: FA, right: FB) -> (FA, FB)
+    where
+        FA: Folder<L>,
+        FB: Folder<R>,
+    {
+        match (self.predicate)(item) {
+            Either::Left(item) => (left.consume(item), right),
+            Either::Right(item) => (left, right.consume(item)),
+        }
+    }
+}
+
+/// A fake iterator to intercept the `Consumer` for type `A`.
+struct UnzipA<'b, I, OP, FromB> {
+    base: I,
+    op: OP,
+    b: &'b mut FromB,
+}
+
+impl<'b, I, OP, FromB> ParallelIterator for UnzipA<'b, I, OP, FromB>
+where
+    I: ParallelIterator,
+    OP: UnzipOp<I::Item>,
+    FromB: Send + ParallelExtend<OP::Right>,
+{
+    type Item = OP::Left;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let mut result = None;
+        {
+            // Now it's time to find the consumer for type `B`
+            let iter = UnzipB {
+                base: self.base,
+                op: self.op,
+                left_consumer: consumer,
+                left_result: &mut result,
+            };
+            self.b.par_extend(iter);
+        }
+        // NB: If for some reason `b.par_extend` doesn't actually drive the
+        // iterator, then we won't have a result for the left side to return
+        // at all.  We can't fake an arbitrary consumer's result, so panic.
+        result.expect("unzip consumers didn't execute!")
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        if OP::indexable() {
+            self.base.opt_len()
+        } else {
+            None
+        }
+    }
+}
+
+/// A fake iterator to intercept the `Consumer` for type `B`.
+struct UnzipB<'r, I, OP, CA>
+where
+    I: ParallelIterator,
+    OP: UnzipOp<I::Item>,
+    CA: UnindexedConsumer<OP::Left>,
+    CA::Result: 'r,
+{
+    base: I,
+    op: OP,
+    left_consumer: CA,
+    left_result: &'r mut Option<CA::Result>,
+}
+
+impl<'r, I, OP, CA> ParallelIterator for UnzipB<'r, I, OP, CA>
+where
+    I: ParallelIterator,
+    OP: UnzipOp<I::Item>,
+    CA: UnindexedConsumer<OP::Left>,
+{
+    type Item = OP::Right;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        // Now that we have two consumers, we can unzip the real iterator.
+        let consumer = UnzipConsumer {
+            op: &self.op,
+            left: self.left_consumer,
+            right: consumer,
+        };
+
+        let result = self.base.drive_unindexed(consumer);
+        *self.left_result = Some(result.0);
+        result.1
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        if OP::indexable() {
+            self.base.opt_len()
+        } else {
+            None
+        }
+    }
+}
+
+/// `Consumer` that unzips into two other `Consumer`s
+struct UnzipConsumer<'a, OP, CA, CB> {
+    op: &'a OP,
+    left: CA,
+    right: CB,
+}
+
+impl<'a, T, OP, CA, CB> Consumer<T> for UnzipConsumer<'a, OP, CA, CB>
+where
+    OP: UnzipOp<T>,
+    CA: Consumer<OP::Left>,
+    CB: Consumer<OP::Right>,
+{
+    type Folder = UnzipFolder<'a, OP, CA::Folder, CB::Folder>;
+    type Reducer = UnzipReducer<CA::Reducer, CB::Reducer>;
+    type Result = (CA::Result, CB::Result);
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left1, left2, left_reducer) = self.left.split_at(index);
+        let (right1, right2, right_reducer) = self.right.split_at(index);
+
+        (
+            UnzipConsumer {
+                op: self.op,
+                left: left1,
+                right: right1,
+            },
+            UnzipConsumer {
+                op: self.op,
+                left: left2,
+                right: right2,
+            },
+            UnzipReducer {
+                left: left_reducer,
+                right: right_reducer,
+            },
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        UnzipFolder {
+            op: self.op,
+            left: self.left.into_folder(),
+            right: self.right.into_folder(),
+        }
+    }
+
+    fn full(&self) -> bool {
+        // don't stop until everyone is full
+        self.left.full() && self.right.full()
+    }
+}
+
+impl<'a, T, OP, CA, CB> UnindexedConsumer<T> for UnzipConsumer<'a, OP, CA, CB>
+where
+    OP: UnzipOp<T>,
+    CA: UnindexedConsumer<OP::Left>,
+    CB: UnindexedConsumer<OP::Right>,
+{
+    fn split_off_left(&self) -> Self {
+        UnzipConsumer {
+            op: self.op,
+            left: self.left.split_off_left(),
+            right: self.right.split_off_left(),
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        UnzipReducer {
+            left: self.left.to_reducer(),
+            right: self.right.to_reducer(),
+        }
+    }
+}
+
+/// `Folder` that unzips into two other `Folder`s
+struct UnzipFolder<'a, OP, FA, FB> {
+    op: &'a OP,
+    left: FA,
+    right: FB,
+}
+
+impl<'a, T, OP, FA, FB> Folder<T> for UnzipFolder<'a, OP, FA, FB>
+where
+    OP: UnzipOp<T>,
+    FA: Folder<OP::Left>,
+    FB: Folder<OP::Right>,
+{
+    type Result = (FA::Result, FB::Result);
+
+    fn consume(self, item: T) -> Self {
+        let (left, right) = self.op.consume(item, self.left, self.right);
+        UnzipFolder {
+            op: self.op,
+            left,
+            right,
+        }
+    }
+
+    fn complete(self) -> Self::Result {
+        (self.left.complete(), self.right.complete())
+    }
+
+    fn full(&self) -> bool {
+        // don't stop until everyone is full
+        self.left.full() && self.right.full()
+    }
+}
+
+/// `Reducer` that unzips into two other `Reducer`s
+struct UnzipReducer<RA, RB> {
+    left: RA,
+    right: RB,
+}
+
+impl<A, B, RA, RB> Reducer<(A, B)> for UnzipReducer<RA, RB>
+where
+    RA: Reducer<A>,
+    RB: Reducer<B>,
+{
+    fn reduce(self, left: (A, B), right: (A, B)) -> (A, B) {
+        (
+            self.left.reduce(left.0, right.0),
+            self.right.reduce(left.1, right.1),
+        )
+    }
+}
+
+impl<A, B, FromA, FromB> ParallelExtend<(A, B)> for (FromA, FromB)
+where
+    A: Send,
+    B: Send,
+    FromA: Send + ParallelExtend<A>,
+    FromB: Send + ParallelExtend<B>,
+{
+    fn par_extend<I>(&mut self, pi: I)
+    where
+        I: IntoParallelIterator<Item = (A, B)>,
+    {
+        execute_into(&mut self.0, &mut self.1, pi.into_par_iter(), Unzip);
+    }
+}
+
+impl<L, R, A, B> ParallelExtend<Either<L, R>> for (A, B)
+where
+    L: Send,
+    R: Send,
+    A: Send + ParallelExtend<L>,
+    B: Send + ParallelExtend<R>,
+{
+    fn par_extend<I>(&mut self, pi: I)
+    where
+        I: IntoParallelIterator<Item = Either<L, R>>,
+    {
+        execute_into(&mut self.0, &mut self.1, pi.into_par_iter(), UnEither);
+    }
+}
+
+/// An `UnzipOp` that routes items depending on their `Either` variant.
+struct UnEither;
+
+impl<L, R> UnzipOp<Either<L, R>> for UnEither
+where
+    L: Send,
+    R: Send,
+{
+    type Left = L;
+    type Right = R;
+
+    fn consume<FL, FR>(&self, item: Either<L, R>, left: FL, right: FR) -> (FL, FR)
+    where
+        FL: Folder<L>,
+        FR: Folder<R>,
+    {
+        match item {
+            Either::Left(item) => (left.consume(item), right),
+            Either::Right(item) => (left, right.consume(item)),
+        }
+    }
+}
+
+impl<A, B, FromA, FromB> FromParallelIterator<(A, B)> for (FromA, FromB)
+where
+    A: Send,
+    B: Send,
+    FromA: Send + FromParallelIterator<A>,
+    FromB: Send + FromParallelIterator<B>,
+{
+    fn from_par_iter<I>(pi: I) -> Self
+    where
+        I: IntoParallelIterator<Item = (A, B)>,
+    {
+        let (a, b): (Collector<FromA>, Collector<FromB>) = pi.into_par_iter().unzip();
+        (a.result.unwrap(), b.result.unwrap())
+    }
+}
+
+impl<L, R, A, B> FromParallelIterator<Either<L, R>> for (A, B)
+where
+    L: Send,
+    R: Send,
+    A: Send + FromParallelIterator<L>,
+    B: Send + FromParallelIterator<R>,
+{
+    fn from_par_iter<I>(pi: I) -> Self
+    where
+        I: IntoParallelIterator<Item = Either<L, R>>,
+    {
+        fn identity<T>(x: T) -> T {
+            x
+        }
+
+        let (a, b): (Collector<A>, Collector<B>) = pi.into_par_iter().partition_map(identity);
+        (a.result.unwrap(), b.result.unwrap())
+    }
+}
+
+/// Shim to implement a one-time `ParallelExtend` using `FromParallelIterator`.
+struct Collector<FromT> {
+    result: Option<FromT>,
+}
+
+impl<FromT> Default for Collector<FromT> {
+    fn default() -> Self {
+        Collector { result: None }
+    }
+}
+
+impl<T, FromT> ParallelExtend<T> for Collector<FromT>
+where
+    T: Send,
+    FromT: Send + FromParallelIterator<T>,
+{
+    fn par_extend<I>(&mut self, pi: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        debug_assert!(self.result.is_none());
+        self.result = Some(pi.into_par_iter().collect());
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/update.rs.html b/src/rayon/iter/update.rs.html new file mode 100644 index 0000000000..1461afba0c --- /dev/null +++ b/src/rayon/iter/update.rs.html @@ -0,0 +1,657 @@ +update.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+
use super::plumbing::*;
+use super::*;
+
+use std::fmt::{self, Debug};
+
+/// `Update` is an iterator that mutates the elements of an
+/// underlying iterator before they are yielded.
+///
+/// This struct is created by the [`update()`] method on [`ParallelIterator`]
+///
+/// [`update()`]: trait.ParallelIterator.html#method.update
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Clone)]
+pub struct Update<I: ParallelIterator, F> {
+    base: I,
+    update_op: F,
+}
+
+impl<I: ParallelIterator + Debug, F> Debug for Update<I, F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Update").field("base", &self.base).finish()
+    }
+}
+
+impl<I, F> Update<I, F>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `Update` iterator.
+    pub(super) fn new(base: I, update_op: F) -> Self {
+        Update { base, update_op }
+    }
+}
+
+impl<I, F> ParallelIterator for Update<I, F>
+where
+    I: ParallelIterator,
+    F: Fn(&mut I::Item) + Send + Sync,
+{
+    type Item = I::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let consumer1 = UpdateConsumer::new(consumer, &self.update_op);
+        self.base.drive_unindexed(consumer1)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.base.opt_len()
+    }
+}
+
+impl<I, F> IndexedParallelIterator for Update<I, F>
+where
+    I: IndexedParallelIterator,
+    F: Fn(&mut I::Item) + Send + Sync,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let consumer1 = UpdateConsumer::new(consumer, &self.update_op);
+        self.base.drive(consumer1)
+    }
+
+    fn len(&self) -> usize {
+        self.base.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.base.with_producer(Callback {
+            callback,
+            update_op: self.update_op,
+        });
+
+        struct Callback<CB, F> {
+            callback: CB,
+            update_op: F,
+        }
+
+        impl<T, F, CB> ProducerCallback<T> for Callback<CB, F>
+        where
+            CB: ProducerCallback<T>,
+            F: Fn(&mut T) + Send + Sync,
+        {
+            type Output = CB::Output;
+
+            fn callback<P>(self, base: P) -> CB::Output
+            where
+                P: Producer<Item = T>,
+            {
+                let producer = UpdateProducer {
+                    base,
+                    update_op: &self.update_op,
+                };
+                self.callback.callback(producer)
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct UpdateProducer<'f, P, F> {
+    base: P,
+    update_op: &'f F,
+}
+
+impl<'f, P, F> Producer for UpdateProducer<'f, P, F>
+where
+    P: Producer,
+    F: Fn(&mut P::Item) + Send + Sync,
+{
+    type Item = P::Item;
+    type IntoIter = UpdateSeq<P::IntoIter, &'f F>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        UpdateSeq {
+            base: self.base.into_iter(),
+            update_op: self.update_op,
+        }
+    }
+
+    fn min_len(&self) -> usize {
+        self.base.min_len()
+    }
+    fn max_len(&self) -> usize {
+        self.base.max_len()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.base.split_at(index);
+        (
+            UpdateProducer {
+                base: left,
+                update_op: self.update_op,
+            },
+            UpdateProducer {
+                base: right,
+                update_op: self.update_op,
+            },
+        )
+    }
+
+    fn fold_with<G>(self, folder: G) -> G
+    where
+        G: Folder<Self::Item>,
+    {
+        let folder1 = UpdateFolder {
+            base: folder,
+            update_op: self.update_op,
+        };
+        self.base.fold_with(folder1).base
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct UpdateConsumer<'f, C, F> {
+    base: C,
+    update_op: &'f F,
+}
+
+impl<'f, C, F> UpdateConsumer<'f, C, F> {
+    fn new(base: C, update_op: &'f F) -> Self {
+        UpdateConsumer { base, update_op }
+    }
+}
+
+impl<'f, T, C, F> Consumer<T> for UpdateConsumer<'f, C, F>
+where
+    C: Consumer<T>,
+    F: Fn(&mut T) + Send + Sync,
+{
+    type Folder = UpdateFolder<'f, C::Folder, F>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            UpdateConsumer::new(left, self.update_op),
+            UpdateConsumer::new(right, self.update_op),
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        UpdateFolder {
+            base: self.base.into_folder(),
+            update_op: self.update_op,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+impl<'f, T, C, F> UnindexedConsumer<T> for UpdateConsumer<'f, C, F>
+where
+    C: UnindexedConsumer<T>,
+    F: Fn(&mut T) + Send + Sync,
+{
+    fn split_off_left(&self) -> Self {
+        UpdateConsumer::new(self.base.split_off_left(), self.update_op)
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct UpdateFolder<'f, C, F> {
+    base: C,
+    update_op: &'f F,
+}
+
+fn apply<T>(update_op: impl Fn(&mut T)) -> impl Fn(T) -> T {
+    move |mut item| {
+        update_op(&mut item);
+        item
+    }
+}
+
+impl<'f, T, C, F> Folder<T> for UpdateFolder<'f, C, F>
+where
+    C: Folder<T>,
+    F: Fn(&mut T),
+{
+    type Result = C::Result;
+
+    fn consume(self, mut item: T) -> Self {
+        (self.update_op)(&mut item);
+
+        UpdateFolder {
+            base: self.base.consume(item),
+            update_op: self.update_op,
+        }
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = T>,
+    {
+        let update_op = self.update_op;
+        self.base = self
+            .base
+            .consume_iter(iter.into_iter().map(apply(update_op)));
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.base.full()
+    }
+}
+
+/// Standard Update adaptor, based on `itertools::adaptors::Update`
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+struct UpdateSeq<I, F> {
+    base: I,
+    update_op: F,
+}
+
+impl<I, F> Iterator for UpdateSeq<I, F>
+where
+    I: Iterator,
+    F: Fn(&mut I::Item),
+{
+    type Item = I::Item;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        let mut v = self.base.next()?;
+        (self.update_op)(&mut v);
+        Some(v)
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.base.size_hint()
+    }
+
+    fn fold<Acc, G>(self, init: Acc, g: G) -> Acc
+    where
+        G: FnMut(Acc, Self::Item) -> Acc,
+    {
+        self.base.map(apply(self.update_op)).fold(init, g)
+    }
+
+    // if possible, re-use inner iterator specializations in collect
+    fn collect<C>(self) -> C
+    where
+        C: ::std::iter::FromIterator<Self::Item>,
+    {
+        self.base.map(apply(self.update_op)).collect()
+    }
+}
+
+impl<I, F> ExactSizeIterator for UpdateSeq<I, F>
+where
+    I: ExactSizeIterator,
+    F: Fn(&mut I::Item),
+{
+}
+
+impl<I, F> DoubleEndedIterator for UpdateSeq<I, F>
+where
+    I: DoubleEndedIterator,
+    F: Fn(&mut I::Item),
+{
+    fn next_back(&mut self) -> Option<Self::Item> {
+        let mut v = self.base.next_back()?;
+        (self.update_op)(&mut v);
+        Some(v)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/walk_tree.rs.html b/src/rayon/iter/walk_tree.rs.html new file mode 100644 index 0000000000..4521f1f389 --- /dev/null +++ b/src/rayon/iter/walk_tree.rs.html @@ -0,0 +1,1061 @@ +walk_tree.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+
use crate::iter::plumbing::{bridge_unindexed, Folder, UnindexedConsumer, UnindexedProducer};
+use crate::prelude::*;
+use std::iter::once;
+
+#[derive(Debug)]
+struct WalkTreePrefixProducer<'b, S, B> {
+    to_explore: Vec<S>, // nodes (and subtrees) we have to process
+    seen: Vec<S>,       // nodes which have already been explored
+    children_of: &'b B, // function generating children
+}
+
+impl<S, B, I> UnindexedProducer for WalkTreePrefixProducer<'_, S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S>,
+    I::IntoIter: DoubleEndedIterator,
+{
+    type Item = S;
+
+    fn split(mut self) -> (Self, Option<Self>) {
+        // explore while front is of size one.
+        while self.to_explore.len() == 1 {
+            let front_node = self.to_explore.pop().unwrap();
+            self.to_explore
+                .extend((self.children_of)(&front_node).into_iter().rev());
+            self.seen.push(front_node);
+        }
+        // now take half of the front.
+        let right_children = split_vec(&mut self.to_explore);
+        let right = right_children
+            .map(|mut c| {
+                std::mem::swap(&mut c, &mut self.to_explore);
+                WalkTreePrefixProducer {
+                    to_explore: c,
+                    seen: Vec::new(),
+                    children_of: self.children_of,
+                }
+            })
+            .or_else(|| {
+                // we can still try to divide 'seen'
+                let right_seen = split_vec(&mut self.seen);
+                right_seen.map(|s| WalkTreePrefixProducer {
+                    to_explore: Default::default(),
+                    seen: s,
+                    children_of: self.children_of,
+                })
+            });
+        (self, right)
+    }
+
+    fn fold_with<F>(mut self, mut folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        // start by consuming everything seen
+        folder = folder.consume_iter(self.seen);
+        if folder.full() {
+            return folder;
+        }
+        // now do all remaining explorations
+        while let Some(e) = self.to_explore.pop() {
+            self.to_explore
+                .extend((self.children_of)(&e).into_iter().rev());
+            folder = folder.consume(e);
+            if folder.full() {
+                return folder;
+            }
+        }
+        folder
+    }
+}
+
+/// ParallelIterator for arbitrary tree-shaped patterns.
+/// Returned by the [`walk_tree_prefix()`] function.
+#[derive(Debug)]
+pub struct WalkTreePrefix<S, B> {
+    initial_state: S,
+    children_of: B,
+}
+
+impl<S, B, I> ParallelIterator for WalkTreePrefix<S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S>,
+    I::IntoIter: DoubleEndedIterator,
+{
+    type Item = S;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = WalkTreePrefixProducer {
+            to_explore: once(self.initial_state).collect(),
+            seen: Vec::new(),
+            children_of: &self.children_of,
+        };
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Create a tree-like prefix parallel iterator from an initial root node.
+/// The `children_of` function should take a node and return an iterator over its child nodes.
+/// The best parallelization is obtained when the tree is balanced
+/// but we should also be able to handle harder cases.
+///
+/// # Ordering
+///
+/// This function guarantees a prefix ordering. See also [`walk_tree_postfix`],
+/// which guarantees a postfix order.
+/// If you don't care about ordering, you should use [`walk_tree`],
+/// which will use whatever is believed to be fastest.
+/// For example a perfect binary tree of 7 nodes will reduced in the following order:
+///
+/// ```text
+///      a
+///     / \
+///    /   \
+///   b     c
+///  / \   / \
+/// d   e f   g
+///
+/// reduced as a,b,d,e,c,f,g
+///
+/// ```
+///
+/// # Example
+///
+/// ```text
+///      4
+///     / \
+///    /   \
+///   2     3
+///        / \
+///       1   2
+/// ```
+///
+/// ```
+/// use rayon::iter::walk_tree_prefix;
+/// use rayon::prelude::*;
+///
+/// let par_iter = walk_tree_prefix(4, |&e| {
+///     if e <= 2 {
+///         Vec::new()
+///     } else {
+///         vec![e / 2, e / 2 + 1]
+///     }
+/// });
+/// assert_eq!(par_iter.sum::<u32>(), 12);
+/// ```
+///
+/// # Example
+///
+/// ```
+/// use rayon::prelude::*;
+/// use rayon::iter::walk_tree_prefix;
+///
+/// struct Node {
+///     content: u32,
+///     left: Option<Box<Node>>,
+///     right: Option<Box<Node>>,
+/// }
+///
+/// // Here we loop on the following tree:
+/// //
+/// //       10
+/// //      /  \
+/// //     /    \
+/// //    3     14
+/// //            \
+/// //             \
+/// //              18
+///
+/// let root = Node {
+///     content: 10,
+///     left: Some(Box::new(Node {
+///         content: 3,
+///         left: None,
+///         right: None,
+///     })),
+///     right: Some(Box::new(Node {
+///         content: 14,
+///         left: None,
+///         right: Some(Box::new(Node {
+///             content: 18,
+///             left: None,
+///             right: None,
+///         })),
+///     })),
+/// };
+///
+/// let mut v: Vec<u32> = walk_tree_prefix(&root, |r| {
+///     r.left
+///         .as_ref()
+///         .into_iter()
+///         .chain(r.right.as_ref())
+///         .map(|n| &**n)
+/// })
+/// .map(|node| node.content)
+/// .collect();
+/// assert_eq!(v, vec![10, 3, 14, 18]);
+/// ```
+///
+pub fn walk_tree_prefix<S, B, I>(root: S, children_of: B) -> WalkTreePrefix<S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S>,
+    I::IntoIter: DoubleEndedIterator,
+{
+    WalkTreePrefix {
+        initial_state: root,
+        children_of,
+    }
+}
+
+// post fix
+
+#[derive(Debug)]
+struct WalkTreePostfixProducer<'b, S, B> {
+    to_explore: Vec<S>, // nodes (and subtrees) we have to process
+    seen: Vec<S>,       // nodes which have already been explored
+    children_of: &'b B, // function generating children
+}
+
+impl<S, B, I> UnindexedProducer for WalkTreePostfixProducer<'_, S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S>,
+{
+    type Item = S;
+
+    fn split(mut self) -> (Self, Option<Self>) {
+        // explore while front is of size one.
+        while self.to_explore.len() == 1 {
+            let front_node = self.to_explore.pop().unwrap();
+            self.to_explore
+                .extend((self.children_of)(&front_node).into_iter());
+            self.seen.push(front_node);
+        }
+        // now take half of the front.
+        let right_children = split_vec(&mut self.to_explore);
+        let right = right_children
+            .map(|c| {
+                let right_seen = std::mem::take(&mut self.seen); // postfix -> upper nodes are processed last
+                WalkTreePostfixProducer {
+                    to_explore: c,
+                    seen: right_seen,
+                    children_of: self.children_of,
+                }
+            })
+            .or_else(|| {
+                // we can still try to divide 'seen'
+                let right_seen = split_vec(&mut self.seen);
+                right_seen.map(|mut s| {
+                    std::mem::swap(&mut self.seen, &mut s);
+                    WalkTreePostfixProducer {
+                        to_explore: Default::default(),
+                        seen: s,
+                        children_of: self.children_of,
+                    }
+                })
+            });
+        (self, right)
+    }
+
+    fn fold_with<F>(self, mut folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        // now do all remaining explorations
+        for e in self.to_explore {
+            folder = consume_rec_postfix(&self.children_of, e, folder);
+            if folder.full() {
+                return folder;
+            }
+        }
+        // end by consuming everything seen
+        folder.consume_iter(self.seen.into_iter().rev())
+    }
+}
+
+fn consume_rec_postfix<F, S, B, I>(children_of: &B, s: S, mut folder: F) -> F
+where
+    F: Folder<S>,
+    B: Fn(&S) -> I,
+    I: IntoIterator<Item = S>,
+{
+    let children = (children_of)(&s).into_iter();
+    for child in children {
+        folder = consume_rec_postfix(children_of, child, folder);
+        if folder.full() {
+            return folder;
+        }
+    }
+    folder.consume(s)
+}
+
+/// ParallelIterator for arbitrary tree-shaped patterns.
+/// Returned by the [`walk_tree_postfix()`] function.
+#[derive(Debug)]
+pub struct WalkTreePostfix<S, B> {
+    initial_state: S,
+    children_of: B,
+}
+
+impl<S, B, I> ParallelIterator for WalkTreePostfix<S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S>,
+{
+    type Item = S;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = WalkTreePostfixProducer {
+            to_explore: once(self.initial_state).collect(),
+            seen: Vec::new(),
+            children_of: &self.children_of,
+        };
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Divide given vector in two equally sized vectors.
+/// Return `None` if initial size is <=1.
+/// We return the first half and keep the last half in `v`.
+fn split_vec<T>(v: &mut Vec<T>) -> Option<Vec<T>> {
+    if v.len() <= 1 {
+        None
+    } else {
+        let n = v.len() / 2;
+        Some(v.split_off(n))
+    }
+}
+
+/// Create a tree like postfix parallel iterator from an initial root node.
+/// The `children_of` function should take a node and iterate on all of its child nodes.
+/// The best parallelization is obtained when the tree is balanced
+/// but we should also be able to handle harder cases.
+///
+/// # Ordering
+///
+/// This function guarantees a postfix ordering. See also [`walk_tree_prefix`] which guarantees a
+/// prefix order. If you don't care about ordering, you should use [`walk_tree`], which will use
+/// whatever is believed to be fastest.
+///
+/// Between siblings, children are reduced in order -- that is first children are reduced first.
+///
+/// For example a perfect binary tree of 7 nodes will reduced in the following order:
+///
+/// ```text
+///      a
+///     / \
+///    /   \
+///   b     c
+///  / \   / \
+/// d   e f   g
+///
+/// reduced as d,e,b,f,g,c,a
+///
+/// ```
+///
+/// # Example
+///
+/// ```text
+///      4
+///     / \
+///    /   \
+///   2     3
+///        / \
+///       1   2
+/// ```
+///
+/// ```
+/// use rayon::iter::walk_tree_postfix;
+/// use rayon::prelude::*;
+///
+/// let par_iter = walk_tree_postfix(4, |&e| {
+///     if e <= 2 {
+///         Vec::new()
+///     } else {
+///         vec![e / 2, e / 2 + 1]
+///     }
+/// });
+/// assert_eq!(par_iter.sum::<u32>(), 12);
+/// ```
+///
+/// # Example
+///
+/// ```
+/// use rayon::prelude::*;
+/// use rayon::iter::walk_tree_postfix;
+///
+/// struct Node {
+///     content: u32,
+///     left: Option<Box<Node>>,
+///     right: Option<Box<Node>>,
+/// }
+///
+/// // Here we loop on the following tree:
+/// //
+/// //       10
+/// //      /  \
+/// //     /    \
+/// //    3     14
+/// //            \
+/// //             \
+/// //              18
+///
+/// let root = Node {
+///     content: 10,
+///     left: Some(Box::new(Node {
+///         content: 3,
+///         left: None,
+///         right: None,
+///     })),
+///     right: Some(Box::new(Node {
+///         content: 14,
+///         left: None,
+///         right: Some(Box::new(Node {
+///             content: 18,
+///             left: None,
+///             right: None,
+///         })),
+///     })),
+/// };
+///
+/// let mut v: Vec<u32> = walk_tree_postfix(&root, |r| {
+///     r.left
+///         .as_ref()
+///         .into_iter()
+///         .chain(r.right.as_ref())
+///         .map(|n| &**n)
+/// })
+/// .map(|node| node.content)
+/// .collect();
+/// assert_eq!(v, vec![3, 18, 14, 10]);
+/// ```
+///
+pub fn walk_tree_postfix<S, B, I>(root: S, children_of: B) -> WalkTreePostfix<S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S>,
+{
+    WalkTreePostfix {
+        initial_state: root,
+        children_of,
+    }
+}
+
+/// ParallelIterator for arbitrary tree-shaped patterns.
+/// Returned by the [`walk_tree()`] function.
+#[derive(Debug)]
+pub struct WalkTree<S, B>(WalkTreePostfix<S, B>);
+
+/// Create a tree like parallel iterator from an initial root node.
+/// The `children_of` function should take a node and iterate on all of its child nodes.
+/// The best parallelization is obtained when the tree is balanced
+/// but we should also be able to handle harder cases.
+///
+/// # Ordering
+///
+/// This function does not guarantee any ordering but will
+/// use whatever algorithm is thought to achieve the fastest traversal.
+/// See also [`walk_tree_prefix`] which guarantees a
+/// prefix order and [`walk_tree_postfix`] which guarantees a postfix order.
+///
+/// # Example
+///
+/// ```text
+///      4
+///     / \
+///    /   \
+///   2     3
+///        / \
+///       1   2
+/// ```
+///
+/// ```
+/// use rayon::iter::walk_tree;
+/// use rayon::prelude::*;
+///
+/// let par_iter = walk_tree(4, |&e| {
+///     if e <= 2 {
+///         Vec::new()
+///     } else {
+///         vec![e / 2, e / 2 + 1]
+///     }
+/// });
+/// assert_eq!(par_iter.sum::<u32>(), 12);
+/// ```
+pub fn walk_tree<S, B, I>(root: S, children_of: B) -> WalkTree<S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S>,
+    I::IntoIter: DoubleEndedIterator,
+{
+    let walker = WalkTreePostfix {
+        initial_state: root,
+        children_of,
+    };
+    WalkTree(walker)
+}
+
+impl<S, B, I> ParallelIterator for WalkTree<S, B>
+where
+    S: Send,
+    B: Fn(&S) -> I + Send + Sync,
+    I: IntoIterator<Item = S> + Send,
+    I::IntoIter: DoubleEndedIterator,
+{
+    type Item = S;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.0.drive_unindexed(consumer)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/while_some.rs.html b/src/rayon/iter/while_some.rs.html new file mode 100644 index 0000000000..60fa4b8ceb --- /dev/null +++ b/src/rayon/iter/while_some.rs.html @@ -0,0 +1,311 @@ +while_some.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+
use super::plumbing::*;
+use super::*;
+use std::sync::atomic::{AtomicBool, Ordering};
+
+/// `WhileSome` is an iterator that yields the `Some` elements of an iterator,
+/// halting as soon as any `None` is produced.
+///
+/// This struct is created by the [`while_some()`] method on [`ParallelIterator`]
+///
+/// [`while_some()`]: trait.ParallelIterator.html#method.while_some
+/// [`ParallelIterator`]: trait.ParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct WhileSome<I: ParallelIterator> {
+    base: I,
+}
+
+impl<I> WhileSome<I>
+where
+    I: ParallelIterator,
+{
+    /// Creates a new `WhileSome` iterator.
+    pub(super) fn new(base: I) -> Self {
+        WhileSome { base }
+    }
+}
+
+impl<I, T> ParallelIterator for WhileSome<I>
+where
+    I: ParallelIterator<Item = Option<T>>,
+    T: Send,
+{
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let full = AtomicBool::new(false);
+        let consumer1 = WhileSomeConsumer {
+            base: consumer,
+            full: &full,
+        };
+        self.base.drive_unindexed(consumer1)
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Consumer implementation
+
+struct WhileSomeConsumer<'f, C> {
+    base: C,
+    full: &'f AtomicBool,
+}
+
+impl<'f, T, C> Consumer<Option<T>> for WhileSomeConsumer<'f, C>
+where
+    C: Consumer<T>,
+    T: Send,
+{
+    type Folder = WhileSomeFolder<'f, C::Folder>;
+    type Reducer = C::Reducer;
+    type Result = C::Result;
+
+    fn split_at(self, index: usize) -> (Self, Self, Self::Reducer) {
+        let (left, right, reducer) = self.base.split_at(index);
+        (
+            WhileSomeConsumer { base: left, ..self },
+            WhileSomeConsumer {
+                base: right,
+                ..self
+            },
+            reducer,
+        )
+    }
+
+    fn into_folder(self) -> Self::Folder {
+        WhileSomeFolder {
+            base: self.base.into_folder(),
+            full: self.full,
+        }
+    }
+
+    fn full(&self) -> bool {
+        self.full.load(Ordering::Relaxed) || self.base.full()
+    }
+}
+
+impl<'f, T, C> UnindexedConsumer<Option<T>> for WhileSomeConsumer<'f, C>
+where
+    C: UnindexedConsumer<T>,
+    T: Send,
+{
+    fn split_off_left(&self) -> Self {
+        WhileSomeConsumer {
+            base: self.base.split_off_left(),
+            ..*self
+        }
+    }
+
+    fn to_reducer(&self) -> Self::Reducer {
+        self.base.to_reducer()
+    }
+}
+
+struct WhileSomeFolder<'f, C> {
+    base: C,
+    full: &'f AtomicBool,
+}
+
+impl<'f, T, C> Folder<Option<T>> for WhileSomeFolder<'f, C>
+where
+    C: Folder<T>,
+{
+    type Result = C::Result;
+
+    fn consume(mut self, item: Option<T>) -> Self {
+        match item {
+            Some(item) => self.base = self.base.consume(item),
+            None => self.full.store(true, Ordering::Relaxed),
+        }
+        self
+    }
+
+    fn consume_iter<I>(mut self, iter: I) -> Self
+    where
+        I: IntoIterator<Item = Option<T>>,
+    {
+        fn some<T>(full: &AtomicBool) -> impl Fn(&Option<T>) -> bool + '_ {
+            move |x| match *x {
+                Some(_) => !full.load(Ordering::Relaxed),
+                None => {
+                    full.store(true, Ordering::Relaxed);
+                    false
+                }
+            }
+        }
+
+        self.base = self.base.consume_iter(
+            iter.into_iter()
+                .take_while(some(self.full))
+                .map(Option::unwrap),
+        );
+        self
+    }
+
+    fn complete(self) -> C::Result {
+        self.base.complete()
+    }
+
+    fn full(&self) -> bool {
+        self.full.load(Ordering::Relaxed) || self.base.full()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/zip.rs.html b/src/rayon/iter/zip.rs.html new file mode 100644 index 0000000000..c99dd72534 --- /dev/null +++ b/src/rayon/iter/zip.rs.html @@ -0,0 +1,319 @@ +zip.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+
use super::plumbing::*;
+use super::*;
+use std::iter;
+
+/// `Zip` is an iterator that zips up `a` and `b` into a single iterator
+/// of pairs. This struct is created by the [`zip()`] method on
+/// [`IndexedParallelIterator`]
+///
+/// [`zip()`]: trait.IndexedParallelIterator.html#method.zip
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct Zip<A: IndexedParallelIterator, B: IndexedParallelIterator> {
+    a: A,
+    b: B,
+}
+
+impl<A, B> Zip<A, B>
+where
+    A: IndexedParallelIterator,
+    B: IndexedParallelIterator,
+{
+    /// Creates a new `Zip` iterator.
+    pub(super) fn new(a: A, b: B) -> Self {
+        Zip { a, b }
+    }
+}
+
+impl<A, B> ParallelIterator for Zip<A, B>
+where
+    A: IndexedParallelIterator,
+    B: IndexedParallelIterator,
+{
+    type Item = (A::Item, B::Item);
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<A, B> IndexedParallelIterator for Zip<A, B>
+where
+    A: IndexedParallelIterator,
+    B: IndexedParallelIterator,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        Ord::min(self.a.len(), self.b.len())
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        return self.a.with_producer(CallbackA {
+            callback,
+            b: self.b,
+        });
+
+        struct CallbackA<CB, B> {
+            callback: CB,
+            b: B,
+        }
+
+        impl<CB, ITEM, B> ProducerCallback<ITEM> for CallbackA<CB, B>
+        where
+            B: IndexedParallelIterator,
+            CB: ProducerCallback<(ITEM, B::Item)>,
+        {
+            type Output = CB::Output;
+
+            fn callback<A>(self, a_producer: A) -> Self::Output
+            where
+                A: Producer<Item = ITEM>,
+            {
+                self.b.with_producer(CallbackB {
+                    a_producer,
+                    callback: self.callback,
+                })
+            }
+        }
+
+        struct CallbackB<CB, A> {
+            a_producer: A,
+            callback: CB,
+        }
+
+        impl<CB, A, ITEM> ProducerCallback<ITEM> for CallbackB<CB, A>
+        where
+            A: Producer,
+            CB: ProducerCallback<(A::Item, ITEM)>,
+        {
+            type Output = CB::Output;
+
+            fn callback<B>(self, b_producer: B) -> Self::Output
+            where
+                B: Producer<Item = ITEM>,
+            {
+                self.callback.callback(ZipProducer {
+                    a: self.a_producer,
+                    b: b_producer,
+                })
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+struct ZipProducer<A: Producer, B: Producer> {
+    a: A,
+    b: B,
+}
+
+impl<A: Producer, B: Producer> Producer for ZipProducer<A, B> {
+    type Item = (A::Item, B::Item);
+    type IntoIter = iter::Zip<A::IntoIter, B::IntoIter>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.a.into_iter().zip(self.b.into_iter())
+    }
+
+    fn min_len(&self) -> usize {
+        Ord::max(self.a.min_len(), self.b.min_len())
+    }
+
+    fn max_len(&self) -> usize {
+        Ord::min(self.a.max_len(), self.b.max_len())
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (a_left, a_right) = self.a.split_at(index);
+        let (b_left, b_right) = self.b.split_at(index);
+        (
+            ZipProducer {
+                a: a_left,
+                b: b_left,
+            },
+            ZipProducer {
+                a: a_right,
+                b: b_right,
+            },
+        )
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/iter/zip_eq.rs.html b/src/rayon/iter/zip_eq.rs.html new file mode 100644 index 0000000000..171bc8ac17 --- /dev/null +++ b/src/rayon/iter/zip_eq.rs.html @@ -0,0 +1,147 @@ +zip_eq.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+
use super::plumbing::*;
+use super::*;
+
+/// An [`IndexedParallelIterator`] that iterates over two parallel iterators of equal
+/// length simultaneously.
+///
+/// This struct is created by the [`zip_eq`] method on [`IndexedParallelIterator`],
+/// see its documentation for more information.
+///
+/// [`zip_eq`]: trait.IndexedParallelIterator.html#method.zip_eq
+/// [`IndexedParallelIterator`]: trait.IndexedParallelIterator.html
+#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
+#[derive(Debug, Clone)]
+pub struct ZipEq<A: IndexedParallelIterator, B: IndexedParallelIterator> {
+    zip: Zip<A, B>,
+}
+
+impl<A, B> ZipEq<A, B>
+where
+    A: IndexedParallelIterator,
+    B: IndexedParallelIterator,
+{
+    /// Creates a new `ZipEq` iterator.
+    pub(super) fn new(a: A, b: B) -> Self {
+        ZipEq {
+            zip: super::Zip::new(a, b),
+        }
+    }
+}
+
+impl<A, B> ParallelIterator for ZipEq<A, B>
+where
+    A: IndexedParallelIterator,
+    B: IndexedParallelIterator,
+{
+    type Item = (A::Item, B::Item);
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self.zip, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.zip.len())
+    }
+}
+
+impl<A, B> IndexedParallelIterator for ZipEq<A, B>
+where
+    A: IndexedParallelIterator,
+    B: IndexedParallelIterator,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self.zip, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.zip.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        self.zip.with_producer(callback)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/lib.rs.html b/src/rayon/lib.rs.html new file mode 100644 index 0000000000..895fdc1fd7 --- /dev/null +++ b/src/rayon/lib.rs.html @@ -0,0 +1,323 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+
#![deny(missing_debug_implementations)]
+#![deny(missing_docs)]
+#![deny(unreachable_pub)]
+#![warn(rust_2018_idioms)]
+
+//! Rayon is a data-parallelism library that makes it easy to convert sequential
+//! computations into parallel.
+//!
+//! It is lightweight and convenient for introducing parallelism into existing
+//! code. It guarantees data-race free executions and takes advantage of
+//! parallelism when sensible, based on work-load at runtime.
+//!
+//! # How to use Rayon
+//!
+//! There are two ways to use Rayon:
+//!
+//! - **High-level parallel constructs** are the simplest way to use Rayon and also
+//!   typically the most efficient.
+//!   - [Parallel iterators][iter module] make it easy to convert a sequential iterator to
+//!     execute in parallel.
+//!     - The [`ParallelIterator`] trait defines general methods for all parallel iterators.
+//!     - The [`IndexedParallelIterator`] trait adds methods for iterators that support random
+//!       access.
+//!   - The [`par_sort`] method sorts `&mut [T]` slices (or vectors) in parallel.
+//!   - [`par_extend`] can be used to efficiently grow collections with items produced
+//!     by a parallel iterator.
+//! - **Custom tasks** let you divide your work into parallel tasks yourself.
+//!   - [`join`] is used to subdivide a task into two pieces.
+//!   - [`scope`] creates a scope within which you can create any number of parallel tasks.
+//!   - [`ThreadPoolBuilder`] can be used to create your own thread pools or customize
+//!     the global one.
+//!
+//! [iter module]: iter/index.html
+//! [`join`]: fn.join.html
+//! [`scope`]: fn.scope.html
+//! [`par_sort`]: slice/trait.ParallelSliceMut.html#method.par_sort
+//! [`par_extend`]: iter/trait.ParallelExtend.html#tymethod.par_extend
+//! [`ThreadPoolBuilder`]: struct.ThreadPoolBuilder.html
+//!
+//! # Basic usage and the Rayon prelude
+//!
+//! First, you will need to add `rayon` to your `Cargo.toml`.
+//!
+//! Next, to use parallel iterators or the other high-level methods,
+//! you need to import several traits. Those traits are bundled into
+//! the module [`rayon::prelude`]. It is recommended that you import
+//! all of these traits at once by adding `use rayon::prelude::*` at
+//! the top of each module that uses Rayon methods.
+//!
+//! These traits give you access to the `par_iter` method which provides
+//! parallel implementations of many iterative functions such as [`map`],
+//! [`for_each`], [`filter`], [`fold`], and [more].
+//!
+//! [`rayon::prelude`]: prelude/index.html
+//! [`map`]: iter/trait.ParallelIterator.html#method.map
+//! [`for_each`]: iter/trait.ParallelIterator.html#method.for_each
+//! [`filter`]: iter/trait.ParallelIterator.html#method.filter
+//! [`fold`]: iter/trait.ParallelIterator.html#method.fold
+//! [more]: iter/trait.ParallelIterator.html#provided-methods
+//! [`ParallelIterator`]: iter/trait.ParallelIterator.html
+//! [`IndexedParallelIterator`]: iter/trait.IndexedParallelIterator.html
+//!
+//! # Crate Layout
+//!
+//! Rayon extends many of the types found in the standard library with
+//! parallel iterator implementations. The modules in the `rayon`
+//! crate mirror [`std`] itself: so, e.g., the `option` module in
+//! Rayon contains parallel iterators for the `Option` type, which is
+//! found in [the `option` module of `std`]. Similarly, the
+//! `collections` module in Rayon offers parallel iterator types for
+//! [the `collections` from `std`]. You will rarely need to access
+//! these submodules unless you need to name iterator types
+//! explicitly.
+//!
+//! [the `option` module of `std`]: https://doc.rust-lang.org/std/option/index.html
+//! [the `collections` from `std`]: https://doc.rust-lang.org/std/collections/index.html
+//! [`std`]: https://doc.rust-lang.org/std/
+//!
+//! # Targets without threading
+//!
+//! Rayon has limited support for targets without `std` threading implementations.
+//! See the [`rayon_core`] documentation for more information about its global fallback.
+//!
+//! # Other questions?
+//!
+//! See [the Rayon FAQ][faq].
+//!
+//! [faq]: https://github.com/rayon-rs/rayon/blob/main/FAQ.md
+
+#[macro_use]
+mod delegate;
+
+#[macro_use]
+mod private;
+
+mod split_producer;
+
+pub mod array;
+pub mod collections;
+pub mod iter;
+pub mod option;
+pub mod prelude;
+pub mod range;
+pub mod range_inclusive;
+pub mod result;
+pub mod slice;
+pub mod str;
+pub mod string;
+pub mod vec;
+
+mod math;
+mod par_either;
+
+mod compile_fail;
+
+pub use rayon_core::FnContext;
+pub use rayon_core::ThreadBuilder;
+pub use rayon_core::ThreadPool;
+pub use rayon_core::ThreadPoolBuildError;
+pub use rayon_core::ThreadPoolBuilder;
+pub use rayon_core::{broadcast, spawn_broadcast, BroadcastContext};
+pub use rayon_core::{current_num_threads, current_thread_index, max_num_threads};
+pub use rayon_core::{in_place_scope, scope, Scope};
+pub use rayon_core::{in_place_scope_fifo, scope_fifo, ScopeFifo};
+pub use rayon_core::{join, join_context};
+pub use rayon_core::{spawn, spawn_fifo};
+pub use rayon_core::{yield_local, yield_now, Yield};
+
+/// We need to transmit raw pointers across threads. It is possible to do this
+/// without any unsafe code by converting pointers to usize or to AtomicPtr<T>
+/// then back to a raw pointer for use. We prefer this approach because code
+/// that uses this type is more explicit.
+///
+/// Unsafe code is still required to dereference the pointer, so this type is
+/// not unsound on its own, although it does partly lift the unconditional
+/// !Send and !Sync on raw pointers. As always, dereference with care.
+struct SendPtr<T>(*mut T);
+
+// SAFETY: !Send for raw pointers is not for safety, just as a lint
+unsafe impl<T: Send> Send for SendPtr<T> {}
+
+// SAFETY: !Sync for raw pointers is not for safety, just as a lint
+unsafe impl<T: Send> Sync for SendPtr<T> {}
+
+impl<T> SendPtr<T> {
+    // Helper to avoid disjoint captures of `send_ptr.0`
+    fn get(self) -> *mut T {
+        self.0
+    }
+}
+
+// Implement Clone without the T: Clone bound from the derive
+impl<T> Clone for SendPtr<T> {
+    fn clone(&self) -> Self {
+        *self
+    }
+}
+
+// Implement Copy without the T: Copy bound from the derive
+impl<T> Copy for SendPtr<T> {}
+
\ No newline at end of file diff --git a/src/rayon/math.rs.html b/src/rayon/math.rs.html new file mode 100644 index 0000000000..75e52ac150 --- /dev/null +++ b/src/rayon/math.rs.html @@ -0,0 +1,111 @@ +math.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
use std::ops::{Bound, Range, RangeBounds};
+
+/// Divide `n` by `divisor`, and round up to the nearest integer
+/// if not evenly divisible.
+#[inline]
+pub(super) fn div_round_up(n: usize, divisor: usize) -> usize {
+    debug_assert!(divisor != 0, "Division by zero!");
+    if n == 0 {
+        0
+    } else {
+        (n - 1) / divisor + 1
+    }
+}
+
+/// Normalize arbitrary `RangeBounds` to a `Range`
+pub(super) fn simplify_range(range: impl RangeBounds<usize>, len: usize) -> Range<usize> {
+    let start = match range.start_bound() {
+        Bound::Unbounded => 0,
+        Bound::Included(&i) if i <= len => i,
+        Bound::Excluded(&i) if i < len => i + 1,
+        bound => panic!("range start {:?} should be <= length {}", bound, len),
+    };
+    let end = match range.end_bound() {
+        Bound::Unbounded => len,
+        Bound::Excluded(&i) if i <= len => i,
+        Bound::Included(&i) if i < len => i + 1,
+        bound => panic!("range end {:?} should be <= length {}", bound, len),
+    };
+    if start > end {
+        panic!(
+            "range start {:?} should be <= range end {:?}",
+            range.start_bound(),
+            range.end_bound()
+        );
+    }
+    start..end
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn check_div_round_up() {
+        assert_eq!(0, div_round_up(0, 5));
+        assert_eq!(1, div_round_up(5, 5));
+        assert_eq!(1, div_round_up(1, 5));
+        assert_eq!(2, div_round_up(3, 2));
+        assert_eq!(
+            usize::max_value() / 2 + 1,
+            div_round_up(usize::max_value(), 2)
+        );
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/option.rs.html b/src/rayon/option.rs.html new file mode 100644 index 0000000000..508fd1fb0f --- /dev/null +++ b/src/rayon/option.rs.html @@ -0,0 +1,409 @@ +option.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+
//! Parallel iterator types for [options][std::option]
+//!
+//! You will rarely need to interact with this module directly unless you need
+//! to name one of the iterator types.
+//!
+//! [std::option]: https://doc.rust-lang.org/stable/std/option/
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use std::sync::atomic::{AtomicBool, Ordering};
+
+/// A parallel iterator over the value in [`Some`] variant of an [`Option`].
+///
+/// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
+///
+/// This `struct` is created by the [`into_par_iter`] function.
+///
+/// [`Option`]: https://doc.rust-lang.org/std/option/enum.Option.html
+/// [`Some`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.Some
+/// [`into_par_iter`]: ../iter/trait.IntoParallelIterator.html#tymethod.into_par_iter
+#[derive(Debug, Clone)]
+pub struct IntoIter<T: Send> {
+    opt: Option<T>,
+}
+
+impl<T: Send> IntoParallelIterator for Option<T> {
+    type Item = T;
+    type Iter = IntoIter<T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IntoIter { opt: self }
+    }
+}
+
+impl<T: Send> ParallelIterator for IntoIter<T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.drive(consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<T: Send> IndexedParallelIterator for IntoIter<T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        let mut folder = consumer.into_folder();
+        if let Some(item) = self.opt {
+            folder = folder.consume(item);
+        }
+        folder.complete()
+    }
+
+    fn len(&self) -> usize {
+        match self.opt {
+            Some(_) => 1,
+            None => 0,
+        }
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(OptionProducer { opt: self.opt })
+    }
+}
+
+/// A parallel iterator over a reference to the [`Some`] variant of an [`Option`].
+///
+/// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
+///
+/// This `struct` is created by the [`par_iter`] function.
+///
+/// [`Option`]: https://doc.rust-lang.org/std/option/enum.Option.html
+/// [`Some`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.Some
+/// [`par_iter`]: ../iter/trait.IntoParallelRefIterator.html#tymethod.par_iter
+#[derive(Debug)]
+pub struct Iter<'a, T: Sync> {
+    inner: IntoIter<&'a T>,
+}
+
+impl<'a, T: Sync> Clone for Iter<'a, T> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+impl<'a, T: Sync> IntoParallelIterator for &'a Option<T> {
+    type Item = &'a T;
+    type Iter = Iter<'a, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        Iter {
+            inner: self.as_ref().into_par_iter(),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    Iter<'a, T> => &'a T,
+    impl<'a, T: Sync + 'a>
+}
+
+/// A parallel iterator over a mutable reference to the [`Some`] variant of an [`Option`].
+///
+/// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
+///
+/// This `struct` is created by the [`par_iter_mut`] function.
+///
+/// [`Option`]: https://doc.rust-lang.org/std/option/enum.Option.html
+/// [`Some`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.Some
+/// [`par_iter_mut`]: ../iter/trait.IntoParallelRefMutIterator.html#tymethod.par_iter_mut
+#[derive(Debug)]
+pub struct IterMut<'a, T: Send> {
+    inner: IntoIter<&'a mut T>,
+}
+
+impl<'a, T: Send> IntoParallelIterator for &'a mut Option<T> {
+    type Item = &'a mut T;
+    type Iter = IterMut<'a, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IterMut {
+            inner: self.as_mut().into_par_iter(),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    IterMut<'a, T> => &'a mut T,
+    impl<'a, T: Send + 'a>
+}
+
+/// Private producer for an option
+struct OptionProducer<T: Send> {
+    opt: Option<T>,
+}
+
+impl<T: Send> Producer for OptionProducer<T> {
+    type Item = T;
+    type IntoIter = std::option::IntoIter<T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.opt.into_iter()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        debug_assert!(index <= 1);
+        let none = OptionProducer { opt: None };
+        if index == 0 {
+            (none, self)
+        } else {
+            (self, none)
+        }
+    }
+}
+
+/// Collect an arbitrary `Option`-wrapped collection.
+///
+/// If any item is `None`, then all previous items collected are discarded,
+/// and it returns only `None`.
+impl<C, T> FromParallelIterator<Option<T>> for Option<C>
+where
+    C: FromParallelIterator<T>,
+    T: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = Option<T>>,
+    {
+        fn check<T>(found_none: &AtomicBool) -> impl Fn(&Option<T>) + '_ {
+            move |item| {
+                if item.is_none() {
+                    found_none.store(true, Ordering::Relaxed);
+                }
+            }
+        }
+
+        let found_none = AtomicBool::new(false);
+        let collection = par_iter
+            .into_par_iter()
+            .inspect(check(&found_none))
+            .while_some()
+            .collect();
+
+        if found_none.load(Ordering::Relaxed) {
+            None
+        } else {
+            Some(collection)
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/par_either.rs.html b/src/rayon/par_either.rs.html new file mode 100644 index 0000000000..e535cc3a2c --- /dev/null +++ b/src/rayon/par_either.rs.html @@ -0,0 +1,151 @@ +par_either.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+
use crate::iter::plumbing::*;
+use crate::iter::Either::{Left, Right};
+use crate::iter::*;
+
+/// `Either<L, R>` is a parallel iterator if both `L` and `R` are parallel iterators.
+impl<L, R> ParallelIterator for Either<L, R>
+where
+    L: ParallelIterator,
+    R: ParallelIterator<Item = L::Item>,
+{
+    type Item = L::Item;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        match self {
+            Left(iter) => iter.drive_unindexed(consumer),
+            Right(iter) => iter.drive_unindexed(consumer),
+        }
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        self.as_ref().either(L::opt_len, R::opt_len)
+    }
+}
+
+impl<L, R> IndexedParallelIterator for Either<L, R>
+where
+    L: IndexedParallelIterator,
+    R: IndexedParallelIterator<Item = L::Item>,
+{
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        match self {
+            Left(iter) => iter.drive(consumer),
+            Right(iter) => iter.drive(consumer),
+        }
+    }
+
+    fn len(&self) -> usize {
+        self.as_ref().either(L::len, R::len)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        match self {
+            Left(iter) => iter.with_producer(callback),
+            Right(iter) => iter.with_producer(callback),
+        }
+    }
+}
+
+/// `Either<L, R>` can be extended if both `L` and `R` are parallel extendable.
+impl<L, R, T> ParallelExtend<T> for Either<L, R>
+where
+    L: ParallelExtend<T>,
+    R: ParallelExtend<T>,
+    T: Send,
+{
+    fn par_extend<I>(&mut self, par_iter: I)
+    where
+        I: IntoParallelIterator<Item = T>,
+    {
+        match self.as_mut() {
+            Left(collection) => collection.par_extend(par_iter),
+            Right(collection) => collection.par_extend(par_iter),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/prelude.rs.html b/src/rayon/prelude.rs.html new file mode 100644 index 0000000000..c832ad0c53 --- /dev/null +++ b/src/rayon/prelude.rs.html @@ -0,0 +1,37 @@ +prelude.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+
//! The rayon prelude imports the various `ParallelIterator` traits.
+//! The intention is that one can include `use rayon::prelude::*` and
+//! have easy access to the various traits and methods you will need.
+
+pub use crate::iter::FromParallelIterator;
+pub use crate::iter::IndexedParallelIterator;
+pub use crate::iter::IntoParallelIterator;
+pub use crate::iter::IntoParallelRefIterator;
+pub use crate::iter::IntoParallelRefMutIterator;
+pub use crate::iter::ParallelBridge;
+pub use crate::iter::ParallelDrainFull;
+pub use crate::iter::ParallelDrainRange;
+pub use crate::iter::ParallelExtend;
+pub use crate::iter::ParallelIterator;
+pub use crate::slice::ParallelSlice;
+pub use crate::slice::ParallelSliceMut;
+pub use crate::str::ParallelString;
+
\ No newline at end of file diff --git a/src/rayon/private.rs.html b/src/rayon/private.rs.html new file mode 100644 index 0000000000..a84e4ebe32 --- /dev/null +++ b/src/rayon/private.rs.html @@ -0,0 +1,55 @@ +private.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
//! The public parts of this private module are used to create traits
+//! that cannot be implemented outside of our own crate.  This way we
+//! can feel free to extend those traits without worrying about it
+//! being a breaking change for other implementations.
+
+/// If this type is pub but not publicly reachable, third parties
+/// can't name it and can't implement traits using it.
+#[allow(missing_debug_implementations)]
+pub struct PrivateMarker;
+
+macro_rules! private_decl {
+    () => {
+        /// This trait is private; this method exists to make it
+        /// impossible to implement outside the crate.
+        #[doc(hidden)]
+        fn __rayon_private__(&self) -> crate::private::PrivateMarker;
+    };
+}
+
+macro_rules! private_impl {
+    () => {
+        fn __rayon_private__(&self) -> crate::private::PrivateMarker {
+            crate::private::PrivateMarker
+        }
+    };
+}
+
\ No newline at end of file diff --git a/src/rayon/range.rs.html b/src/rayon/range.rs.html new file mode 100644 index 0000000000..34b3ec96e3 --- /dev/null +++ b/src/rayon/range.rs.html @@ -0,0 +1,911 @@ +range.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+
//! Parallel iterator types for [ranges][std::range],
+//! the type for values created by `a..b` expressions
+//!
+//! You will rarely need to interact with this module directly unless you have
+//! need to name one of the iterator types.
+//!
+//! ```
+//! use rayon::prelude::*;
+//!
+//! let r = (0..100u64).into_par_iter()
+//!                    .sum();
+//!
+//! // compare result with sequential calculation
+//! assert_eq!((0..100).sum::<u64>(), r);
+//! ```
+//!
+//! [std::range]: https://doc.rust-lang.org/core/ops/struct.Range.html
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use std::ops::Range;
+
+/// Parallel iterator over a range, implemented for all integer types and `char`.
+///
+/// **Note:** The `zip` operation requires `IndexedParallelIterator`
+/// which is not implemented for `u64`, `i64`, `u128`, or `i128`.
+///
+/// ```
+/// use rayon::prelude::*;
+///
+/// let p = (0..25usize).into_par_iter()
+///                   .zip(0..25usize)
+///                   .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+///                   .map(|(x, y)| x * y)
+///                   .sum::<usize>();
+///
+/// let s = (0..25usize).zip(0..25)
+///                   .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+///                   .map(|(x, y)| x * y)
+///                   .sum();
+///
+/// assert_eq!(p, s);
+/// ```
+#[derive(Debug, Clone)]
+pub struct Iter<T> {
+    range: Range<T>,
+}
+
+/// Implemented for ranges of all primitive integer types and `char`.
+impl<T> IntoParallelIterator for Range<T>
+where
+    Iter<T>: ParallelIterator,
+{
+    type Item = <Iter<T> as ParallelIterator>::Item;
+    type Iter = Iter<T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        Iter { range: self }
+    }
+}
+
+struct IterProducer<T> {
+    range: Range<T>,
+}
+
+impl<T> IntoIterator for IterProducer<T>
+where
+    Range<T>: Iterator,
+{
+    type Item = <Range<T> as Iterator>::Item;
+    type IntoIter = Range<T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.range
+    }
+}
+
+/// These traits help drive integer type inference. Without them, an unknown `{integer}` type only
+/// has constraints on `Iter<{integer}>`, which will probably give up and use `i32`. By adding
+/// these traits on the item type, the compiler can see a more direct constraint to infer like
+/// `{integer}: RangeInteger`, which works better. See `test_issue_833` for an example.
+///
+/// They have to be `pub` since they're seen in the public `impl ParallelIterator` constraints, but
+/// we put them in a private modules so they're not actually reachable in our public API.
+mod private {
+    use super::*;
+
+    /// Implementation details of `ParallelIterator for Iter<Self>`
+    pub trait RangeInteger: Sized + Send {
+        private_decl! {}
+
+        fn drive_unindexed<C>(iter: Iter<Self>, consumer: C) -> C::Result
+        where
+            C: UnindexedConsumer<Self>;
+
+        fn opt_len(iter: &Iter<Self>) -> Option<usize>;
+    }
+
+    /// Implementation details of `IndexedParallelIterator for Iter<Self>`
+    pub trait IndexedRangeInteger: RangeInteger {
+        private_decl! {}
+
+        fn drive<C>(iter: Iter<Self>, consumer: C) -> C::Result
+        where
+            C: Consumer<Self>;
+
+        fn len(iter: &Iter<Self>) -> usize;
+
+        fn with_producer<CB>(iter: Iter<Self>, callback: CB) -> CB::Output
+        where
+            CB: ProducerCallback<Self>;
+    }
+}
+use private::{IndexedRangeInteger, RangeInteger};
+
+impl<T: RangeInteger> ParallelIterator for Iter<T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<T>,
+    {
+        T::drive_unindexed(self, consumer)
+    }
+
+    #[inline]
+    fn opt_len(&self) -> Option<usize> {
+        T::opt_len(self)
+    }
+}
+
+impl<T: IndexedRangeInteger> IndexedParallelIterator for Iter<T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<T>,
+    {
+        T::drive(self, consumer)
+    }
+
+    #[inline]
+    fn len(&self) -> usize {
+        T::len(self)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<T>,
+    {
+        T::with_producer(self, callback)
+    }
+}
+
+macro_rules! indexed_range_impl {
+    ( $t:ty ) => {
+        impl RangeInteger for $t {
+            private_impl! {}
+
+            fn drive_unindexed<C>(iter: Iter<$t>, consumer: C) -> C::Result
+            where
+                C: UnindexedConsumer<$t>,
+            {
+                bridge(iter, consumer)
+            }
+
+            fn opt_len(iter: &Iter<$t>) -> Option<usize> {
+                Some(iter.range.len())
+            }
+        }
+
+        impl IndexedRangeInteger for $t {
+            private_impl! {}
+
+            fn drive<C>(iter: Iter<$t>, consumer: C) -> C::Result
+            where
+                C: Consumer<$t>,
+            {
+                bridge(iter, consumer)
+            }
+
+            fn len(iter: &Iter<$t>) -> usize {
+                iter.range.len()
+            }
+
+            fn with_producer<CB>(iter: Iter<$t>, callback: CB) -> CB::Output
+            where
+                CB: ProducerCallback<$t>,
+            {
+                callback.callback(IterProducer { range: iter.range })
+            }
+        }
+
+        impl Producer for IterProducer<$t> {
+            type Item = <Range<$t> as Iterator>::Item;
+            type IntoIter = Range<$t>;
+            fn into_iter(self) -> Self::IntoIter {
+                self.range
+            }
+
+            fn split_at(self, index: usize) -> (Self, Self) {
+                assert!(index <= self.range.len());
+                // For signed $t, the length and requested index could be greater than $t::MAX, and
+                // then `index as $t` could wrap to negative, so wrapping_add is necessary.
+                let mid = self.range.start.wrapping_add(index as $t);
+                let left = self.range.start..mid;
+                let right = mid..self.range.end;
+                (IterProducer { range: left }, IterProducer { range: right })
+            }
+        }
+    };
+}
+
+trait UnindexedRangeLen<L> {
+    fn len(&self) -> L;
+}
+
+macro_rules! unindexed_range_impl {
+    ( $t:ty, $len_t:ty ) => {
+        impl UnindexedRangeLen<$len_t> for Range<$t> {
+            fn len(&self) -> $len_t {
+                let &Range { start, end } = self;
+                if end > start {
+                    end.wrapping_sub(start) as $len_t
+                } else {
+                    0
+                }
+            }
+        }
+
+        impl RangeInteger for $t {
+            private_impl! {}
+
+            fn drive_unindexed<C>(iter: Iter<$t>, consumer: C) -> C::Result
+            where
+                C: UnindexedConsumer<$t>,
+            {
+                #[inline]
+                fn offset(start: $t) -> impl Fn(usize) -> $t {
+                    move |i| start.wrapping_add(i as $t)
+                }
+
+                if let Some(len) = iter.opt_len() {
+                    // Drive this in indexed mode for better `collect`.
+                    (0..len)
+                        .into_par_iter()
+                        .map(offset(iter.range.start))
+                        .drive(consumer)
+                } else {
+                    bridge_unindexed(IterProducer { range: iter.range }, consumer)
+                }
+            }
+
+            fn opt_len(iter: &Iter<$t>) -> Option<usize> {
+                usize::try_from(iter.range.len()).ok()
+            }
+        }
+
+        impl UnindexedProducer for IterProducer<$t> {
+            type Item = $t;
+
+            fn split(mut self) -> (Self, Option<Self>) {
+                let index = self.range.len() / 2;
+                if index > 0 {
+                    let mid = self.range.start.wrapping_add(index as $t);
+                    let right = mid..self.range.end;
+                    self.range.end = mid;
+                    (self, Some(IterProducer { range: right }))
+                } else {
+                    (self, None)
+                }
+            }
+
+            fn fold_with<F>(self, folder: F) -> F
+            where
+                F: Folder<Self::Item>,
+            {
+                folder.consume_iter(self)
+            }
+        }
+    };
+}
+
+// all Range<T> with ExactSizeIterator
+indexed_range_impl! {u8}
+indexed_range_impl! {u16}
+indexed_range_impl! {u32}
+indexed_range_impl! {usize}
+indexed_range_impl! {i8}
+indexed_range_impl! {i16}
+indexed_range_impl! {i32}
+indexed_range_impl! {isize}
+
+// other Range<T> with just Iterator
+unindexed_range_impl! {u64, u64}
+unindexed_range_impl! {i64, u64}
+unindexed_range_impl! {u128, u128}
+unindexed_range_impl! {i128, u128}
+
+// char is special because of the surrogate range hole
+macro_rules! convert_char {
+    ( $self:ident . $method:ident ( $( $arg:expr ),* ) ) => {{
+        let start = $self.range.start as u32;
+        let end = $self.range.end as u32;
+        if start < 0xD800 && 0xE000 < end {
+            // chain the before and after surrogate range fragments
+            (start..0xD800)
+                .into_par_iter()
+                .chain(0xE000..end)
+                .map(|codepoint| unsafe { char::from_u32_unchecked(codepoint) })
+                .$method($( $arg ),*)
+        } else {
+            // no surrogate range to worry about
+            (start..end)
+                .into_par_iter()
+                .map(|codepoint| unsafe { char::from_u32_unchecked(codepoint) })
+                .$method($( $arg ),*)
+        }
+    }};
+}
+
+impl ParallelIterator for Iter<char> {
+    type Item = char;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        convert_char!(self.drive(consumer))
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl IndexedParallelIterator for Iter<char> {
+    // Split at the surrogate range first if we're allowed to
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        convert_char!(self.drive(consumer))
+    }
+
+    fn len(&self) -> usize {
+        // Taken from <char as Step>::steps_between
+        let start = self.range.start as u32;
+        let end = self.range.end as u32;
+        if start < end {
+            let mut count = end - start;
+            if start < 0xD800 && 0xE000 <= end {
+                count -= 0x800
+            }
+            count as usize
+        } else {
+            0
+        }
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        convert_char!(self.with_producer(callback))
+    }
+}
+
+#[test]
+fn check_range_split_at_overflow() {
+    // Note, this split index overflows i8!
+    let producer = IterProducer { range: -100i8..100 };
+    let (left, right) = producer.split_at(150);
+    let r1: i32 = left.range.map(i32::from).sum();
+    let r2: i32 = right.range.map(i32::from).sum();
+    assert_eq!(r1 + r2, -100);
+}
+
+#[test]
+fn test_i128_len_doesnt_overflow() {
+    // Using parse because some versions of rust don't allow long literals
+    let octillion: i128 = "1000000000000000000000000000".parse().unwrap();
+    let producer = IterProducer {
+        range: 0..octillion,
+    };
+
+    assert_eq!(octillion as u128, producer.range.len());
+    assert_eq!(octillion as u128, (0..octillion).len());
+    assert_eq!(2 * octillion as u128, (-octillion..octillion).len());
+
+    assert_eq!(u128::MAX, (i128::MIN..i128::MAX).len());
+}
+
+#[test]
+fn test_u64_opt_len() {
+    assert_eq!(Some(100), (0..100u64).into_par_iter().opt_len());
+    assert_eq!(
+        Some(usize::MAX),
+        (0..usize::MAX as u64).into_par_iter().opt_len()
+    );
+    if (usize::MAX as u64) < u64::MAX {
+        assert_eq!(
+            None,
+            (0..(usize::MAX as u64).wrapping_add(1))
+                .into_par_iter()
+                .opt_len()
+        );
+        assert_eq!(None, (0..u64::MAX).into_par_iter().opt_len());
+    }
+}
+
+#[test]
+fn test_u128_opt_len() {
+    assert_eq!(Some(100), (0..100u128).into_par_iter().opt_len());
+    assert_eq!(
+        Some(usize::MAX),
+        (0..usize::MAX as u128).into_par_iter().opt_len()
+    );
+    assert_eq!(None, (0..1 + usize::MAX as u128).into_par_iter().opt_len());
+    assert_eq!(None, (0..u128::MAX).into_par_iter().opt_len());
+}
+
+// `usize as i64` can overflow, so make sure to wrap it appropriately
+// when using the `opt_len` "indexed" mode.
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_usize_i64_overflow() {
+    use crate::ThreadPoolBuilder;
+
+    let iter = (-2..i64::MAX).into_par_iter();
+    assert_eq!(iter.opt_len(), Some(i64::MAX as usize + 2));
+
+    // always run with multiple threads to split into, or this will take forever...
+    let pool = ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+    pool.install(|| assert_eq!(iter.find_last(|_| true), Some(i64::MAX - 1)));
+}
+
+#[test]
+fn test_issue_833() {
+    fn is_even(n: i64) -> bool {
+        n % 2 == 0
+    }
+
+    // The integer type should be inferred from `is_even`
+    let v: Vec<_> = (1..100).into_par_iter().filter(|&x| is_even(x)).collect();
+    assert!(v.into_iter().eq((2..100).step_by(2)));
+
+    // Try examples with indexed iterators too
+    let pos = (0..100).into_par_iter().position_any(|x| x == 50i16);
+    assert_eq!(pos, Some(50usize));
+
+    assert!((0..100)
+        .into_par_iter()
+        .zip(0..100)
+        .all(|(a, b)| i16::eq(&a, &b)));
+}
+
\ No newline at end of file diff --git a/src/rayon/range_inclusive.rs.html b/src/rayon/range_inclusive.rs.html new file mode 100644 index 0000000000..92efad9620 --- /dev/null +++ b/src/rayon/range_inclusive.rs.html @@ -0,0 +1,765 @@ +range_inclusive.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+
//! Parallel iterator types for [inclusive ranges][std::range],
+//! the type for values created by `a..=b` expressions
+//!
+//! You will rarely need to interact with this module directly unless you have
+//! need to name one of the iterator types.
+//!
+//! ```
+//! use rayon::prelude::*;
+//!
+//! let r = (0..=100u64).into_par_iter()
+//!                     .sum();
+//!
+//! // compare result with sequential calculation
+//! assert_eq!((0..=100).sum::<u64>(), r);
+//! ```
+//!
+//! [std::range]: https://doc.rust-lang.org/core/ops/struct.RangeInclusive.html
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use std::ops::RangeInclusive;
+
+/// Parallel iterator over an inclusive range, implemented for all integer types and `char`.
+///
+/// **Note:** The `zip` operation requires `IndexedParallelIterator`
+/// which is only implemented for `u8`, `i8`, `u16`, `i16`, and `char`.
+///
+/// ```
+/// use rayon::prelude::*;
+///
+/// let p = (0..=25u16).into_par_iter()
+///                   .zip(0..=25u16)
+///                   .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+///                   .map(|(x, y)| x * y)
+///                   .sum::<u16>();
+///
+/// let s = (0..=25u16).zip(0..=25u16)
+///                   .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
+///                   .map(|(x, y)| x * y)
+///                   .sum();
+///
+/// assert_eq!(p, s);
+/// ```
+#[derive(Debug, Clone)]
+pub struct Iter<T> {
+    range: RangeInclusive<T>,
+}
+
+impl<T> Iter<T>
+where
+    RangeInclusive<T>: Eq,
+    T: Ord + Copy,
+{
+    /// Returns `Some((start, end))` for `start..=end`, or `None` if it is exhausted.
+    ///
+    /// Note that `RangeInclusive` does not specify the bounds of an exhausted iterator,
+    /// so this is a way for us to figure out what we've got.  Thankfully, all of the
+    /// integer types we care about can be trivially cloned.
+    fn bounds(&self) -> Option<(T, T)> {
+        let start = *self.range.start();
+        let end = *self.range.end();
+        if start <= end && self.range == (start..=end) {
+            // If the range is still nonempty, this is obviously true
+            // If the range is exhausted, either start > end or
+            // the range does not equal start..=end.
+            Some((start, end))
+        } else {
+            None
+        }
+    }
+}
+
+/// Implemented for ranges of all primitive integer types and `char`.
+impl<T> IntoParallelIterator for RangeInclusive<T>
+where
+    Iter<T>: ParallelIterator,
+{
+    type Item = <Iter<T> as ParallelIterator>::Item;
+    type Iter = Iter<T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        Iter { range: self }
+    }
+}
+
+/// These traits help drive integer type inference. Without them, an unknown `{integer}` type only
+/// has constraints on `Iter<{integer}>`, which will probably give up and use `i32`. By adding
+/// these traits on the item type, the compiler can see a more direct constraint to infer like
+/// `{integer}: RangeInteger`, which works better. See `test_issue_833` for an example.
+///
+/// They have to be `pub` since they're seen in the public `impl ParallelIterator` constraints, but
+/// we put them in a private modules so they're not actually reachable in our public API.
+mod private {
+    use super::*;
+
+    /// Implementation details of `ParallelIterator for Iter<Self>`
+    pub trait RangeInteger: Sized + Send {
+        private_decl! {}
+
+        fn drive_unindexed<C>(iter: Iter<Self>, consumer: C) -> C::Result
+        where
+            C: UnindexedConsumer<Self>;
+
+        fn opt_len(iter: &Iter<Self>) -> Option<usize>;
+    }
+
+    /// Implementation details of `IndexedParallelIterator for Iter<Self>`
+    pub trait IndexedRangeInteger: RangeInteger {
+        private_decl! {}
+
+        fn drive<C>(iter: Iter<Self>, consumer: C) -> C::Result
+        where
+            C: Consumer<Self>;
+
+        fn len(iter: &Iter<Self>) -> usize;
+
+        fn with_producer<CB>(iter: Iter<Self>, callback: CB) -> CB::Output
+        where
+            CB: ProducerCallback<Self>;
+    }
+}
+use private::{IndexedRangeInteger, RangeInteger};
+
+impl<T: RangeInteger> ParallelIterator for Iter<T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<T>,
+    {
+        T::drive_unindexed(self, consumer)
+    }
+
+    #[inline]
+    fn opt_len(&self) -> Option<usize> {
+        T::opt_len(self)
+    }
+}
+
+impl<T: IndexedRangeInteger> IndexedParallelIterator for Iter<T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<T>,
+    {
+        T::drive(self, consumer)
+    }
+
+    #[inline]
+    fn len(&self) -> usize {
+        T::len(self)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<T>,
+    {
+        T::with_producer(self, callback)
+    }
+}
+
+macro_rules! convert {
+    ( $iter:ident . $method:ident ( $( $arg:expr ),* ) ) => {
+        if let Some((start, end)) = $iter.bounds() {
+            if let Some(end) = end.checked_add(1) {
+                (start..end).into_par_iter().$method($( $arg ),*)
+            } else {
+                (start..end).into_par_iter().chain(once(end)).$method($( $arg ),*)
+            }
+        } else {
+            empty::<Self>().$method($( $arg ),*)
+        }
+    };
+}
+
+macro_rules! parallel_range_impl {
+    ( $t:ty ) => {
+        impl RangeInteger for $t {
+            private_impl! {}
+
+            fn drive_unindexed<C>(iter: Iter<$t>, consumer: C) -> C::Result
+            where
+                C: UnindexedConsumer<$t>,
+            {
+                convert!(iter.drive_unindexed(consumer))
+            }
+
+            fn opt_len(iter: &Iter<$t>) -> Option<usize> {
+                convert!(iter.opt_len())
+            }
+        }
+    };
+}
+
+macro_rules! indexed_range_impl {
+    ( $t:ty ) => {
+        parallel_range_impl! { $t }
+
+        impl IndexedRangeInteger for $t {
+            private_impl! {}
+
+            fn drive<C>(iter: Iter<$t>, consumer: C) -> C::Result
+            where
+                C: Consumer<$t>,
+            {
+                convert!(iter.drive(consumer))
+            }
+
+            fn len(iter: &Iter<$t>) -> usize {
+                iter.range.len()
+            }
+
+            fn with_producer<CB>(iter: Iter<$t>, callback: CB) -> CB::Output
+            where
+                CB: ProducerCallback<$t>,
+            {
+                convert!(iter.with_producer(callback))
+            }
+        }
+    };
+}
+
+// all RangeInclusive<T> with ExactSizeIterator
+indexed_range_impl! {u8}
+indexed_range_impl! {u16}
+indexed_range_impl! {i8}
+indexed_range_impl! {i16}
+
+// other RangeInclusive<T> with just Iterator
+parallel_range_impl! {usize}
+parallel_range_impl! {isize}
+parallel_range_impl! {u32}
+parallel_range_impl! {i32}
+parallel_range_impl! {u64}
+parallel_range_impl! {i64}
+parallel_range_impl! {u128}
+parallel_range_impl! {i128}
+
+// char is special
+macro_rules! convert_char {
+    ( $self:ident . $method:ident ( $( $arg:expr ),* ) ) => {
+        if let Some((start, end)) = $self.bounds() {
+            let start = start as u32;
+            let end = end as u32;
+            if start < 0xD800 && 0xE000 <= end {
+                // chain the before and after surrogate range fragments
+                (start..0xD800)
+                    .into_par_iter()
+                    .chain(0xE000..end + 1) // cannot use RangeInclusive, so add one to end
+                    .map(|codepoint| unsafe { char::from_u32_unchecked(codepoint) })
+                    .$method($( $arg ),*)
+            } else {
+                // no surrogate range to worry about
+                (start..end + 1) // cannot use RangeInclusive, so add one to end
+                    .into_par_iter()
+                    .map(|codepoint| unsafe { char::from_u32_unchecked(codepoint) })
+                    .$method($( $arg ),*)
+            }
+        } else {
+            empty::<char>().$method($( $arg ),*)
+        }
+    };
+}
+
+impl ParallelIterator for Iter<char> {
+    type Item = char;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        convert_char!(self.drive(consumer))
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+// Range<u32> is broken on 16 bit platforms, may as well benefit from it
+impl IndexedParallelIterator for Iter<char> {
+    // Split at the surrogate range first if we're allowed to
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        convert_char!(self.drive(consumer))
+    }
+
+    fn len(&self) -> usize {
+        if let Some((start, end)) = self.bounds() {
+            // Taken from <char as Step>::steps_between
+            let start = start as u32;
+            let end = end as u32;
+            let mut count = end - start;
+            if start < 0xD800 && 0xE000 <= end {
+                count -= 0x800
+            }
+            (count + 1) as usize // add one for inclusive
+        } else {
+            0
+        }
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        convert_char!(self.with_producer(callback))
+    }
+}
+
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_u32_opt_len() {
+    assert_eq!(Some(101), (0..=100u32).into_par_iter().opt_len());
+    assert_eq!(
+        Some(u32::MAX as usize),
+        (0..=u32::MAX - 1).into_par_iter().opt_len()
+    );
+    assert_eq!(
+        Some(u32::MAX as usize + 1),
+        (0..=u32::MAX).into_par_iter().opt_len()
+    );
+}
+
+#[test]
+fn test_u64_opt_len() {
+    assert_eq!(Some(101), (0..=100u64).into_par_iter().opt_len());
+    assert_eq!(
+        Some(usize::MAX),
+        (0..=usize::MAX as u64 - 1).into_par_iter().opt_len()
+    );
+    assert_eq!(None, (0..=usize::MAX as u64).into_par_iter().opt_len());
+    assert_eq!(None, (0..=u64::MAX).into_par_iter().opt_len());
+}
+
+#[test]
+fn test_u128_opt_len() {
+    assert_eq!(Some(101), (0..=100u128).into_par_iter().opt_len());
+    assert_eq!(
+        Some(usize::MAX),
+        (0..=usize::MAX as u128 - 1).into_par_iter().opt_len()
+    );
+    assert_eq!(None, (0..=usize::MAX as u128).into_par_iter().opt_len());
+    assert_eq!(None, (0..=u128::MAX).into_par_iter().opt_len());
+}
+
+// `usize as i64` can overflow, so make sure to wrap it appropriately
+// when using the `opt_len` "indexed" mode.
+#[test]
+#[cfg(target_pointer_width = "64")]
+fn test_usize_i64_overflow() {
+    use crate::ThreadPoolBuilder;
+
+    let iter = (-2..=i64::MAX).into_par_iter();
+    assert_eq!(iter.opt_len(), Some(i64::MAX as usize + 3));
+
+    // always run with multiple threads to split into, or this will take forever...
+    let pool = ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+    pool.install(|| assert_eq!(iter.find_last(|_| true), Some(i64::MAX)));
+}
+
+#[test]
+fn test_issue_833() {
+    fn is_even(n: i64) -> bool {
+        n % 2 == 0
+    }
+
+    // The integer type should be inferred from `is_even`
+    let v: Vec<_> = (1..=100).into_par_iter().filter(|&x| is_even(x)).collect();
+    assert!(v.into_iter().eq((2..=100).step_by(2)));
+
+    // Try examples with indexed iterators too
+    let pos = (0..=100).into_par_iter().position_any(|x| x == 50i16);
+    assert_eq!(pos, Some(50usize));
+
+    assert!((0..=100)
+        .into_par_iter()
+        .zip(0..=100)
+        .all(|(a, b)| i16::eq(&a, &b)));
+}
+
\ No newline at end of file diff --git a/src/rayon/result.rs.html b/src/rayon/result.rs.html new file mode 100644 index 0000000000..83dd828923 --- /dev/null +++ b/src/rayon/result.rs.html @@ -0,0 +1,267 @@ +result.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+
//! Parallel iterator types for [results][std::result]
+//!
+//! You will rarely need to interact with this module directly unless you need
+//! to name one of the iterator types.
+//!
+//! [std::result]: https://doc.rust-lang.org/stable/std/result/
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use std::sync::Mutex;
+
+use crate::option;
+
+/// Parallel iterator over a result
+#[derive(Debug, Clone)]
+pub struct IntoIter<T: Send> {
+    inner: option::IntoIter<T>,
+}
+
+impl<T: Send, E> IntoParallelIterator for Result<T, E> {
+    type Item = T;
+    type Iter = IntoIter<T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IntoIter {
+            inner: self.ok().into_par_iter(),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    IntoIter<T> => T,
+    impl<T: Send>
+}
+
+/// Parallel iterator over an immutable reference to a result
+#[derive(Debug)]
+pub struct Iter<'a, T: Sync> {
+    inner: option::IntoIter<&'a T>,
+}
+
+impl<'a, T: Sync> Clone for Iter<'a, T> {
+    fn clone(&self) -> Self {
+        Iter {
+            inner: self.inner.clone(),
+        }
+    }
+}
+
+impl<'a, T: Sync, E> IntoParallelIterator for &'a Result<T, E> {
+    type Item = &'a T;
+    type Iter = Iter<'a, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        Iter {
+            inner: self.as_ref().ok().into_par_iter(),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    Iter<'a, T> => &'a T,
+    impl<'a, T: Sync + 'a>
+}
+
+/// Parallel iterator over a mutable reference to a result
+#[derive(Debug)]
+pub struct IterMut<'a, T: Send> {
+    inner: option::IntoIter<&'a mut T>,
+}
+
+impl<'a, T: Send, E> IntoParallelIterator for &'a mut Result<T, E> {
+    type Item = &'a mut T;
+    type Iter = IterMut<'a, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IterMut {
+            inner: self.as_mut().ok().into_par_iter(),
+        }
+    }
+}
+
+delegate_indexed_iterator! {
+    IterMut<'a, T> => &'a mut T,
+    impl<'a, T: Send + 'a>
+}
+
+/// Collect an arbitrary `Result`-wrapped collection.
+///
+/// If any item is `Err`, then all previous `Ok` items collected are
+/// discarded, and it returns that error.  If there are multiple errors, the
+/// one returned is not deterministic.
+impl<C, T, E> FromParallelIterator<Result<T, E>> for Result<C, E>
+where
+    C: FromParallelIterator<T>,
+    T: Send,
+    E: Send,
+{
+    fn from_par_iter<I>(par_iter: I) -> Self
+    where
+        I: IntoParallelIterator<Item = Result<T, E>>,
+    {
+        fn ok<T, E>(saved: &Mutex<Option<E>>) -> impl Fn(Result<T, E>) -> Option<T> + '_ {
+            move |item| match item {
+                Ok(item) => Some(item),
+                Err(error) => {
+                    // We don't need a blocking `lock()`, as anybody
+                    // else holding the lock will also be writing
+                    // `Some(error)`, and then ours is irrelevant.
+                    if let Ok(mut guard) = saved.try_lock() {
+                        if guard.is_none() {
+                            *guard = Some(error);
+                        }
+                    }
+                    None
+                }
+            }
+        }
+
+        let saved_error = Mutex::new(None);
+        let collection = par_iter
+            .into_par_iter()
+            .map(ok(&saved_error))
+            .while_some()
+            .collect();
+
+        match saved_error.into_inner().unwrap() {
+            Some(error) => Err(error),
+            None => Ok(collection),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/slice/chunk_by.rs.html b/src/rayon/slice/chunk_by.rs.html new file mode 100644 index 0000000000..848c4b80ac --- /dev/null +++ b/src/rayon/slice/chunk_by.rs.html @@ -0,0 +1,491 @@ +chunk_by.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+
use crate::iter::plumbing::*;
+use crate::iter::*;
+use std::marker::PhantomData;
+use std::{fmt, mem};
+
+trait ChunkBySlice<T>: AsRef<[T]> + Default + Send {
+    fn split(self, index: usize) -> (Self, Self);
+
+    fn find(&self, pred: &impl Fn(&T, &T) -> bool, start: usize, end: usize) -> Option<usize> {
+        self.as_ref()[start..end]
+            .windows(2)
+            .position(move |w| !pred(&w[0], &w[1]))
+            .map(|i| i + 1)
+    }
+
+    fn rfind(&self, pred: &impl Fn(&T, &T) -> bool, end: usize) -> Option<usize> {
+        self.as_ref()[..end]
+            .windows(2)
+            .rposition(move |w| !pred(&w[0], &w[1]))
+            .map(|i| i + 1)
+    }
+}
+
+impl<T: Sync> ChunkBySlice<T> for &[T] {
+    fn split(self, index: usize) -> (Self, Self) {
+        self.split_at(index)
+    }
+}
+
+impl<T: Send> ChunkBySlice<T> for &mut [T] {
+    fn split(self, index: usize) -> (Self, Self) {
+        self.split_at_mut(index)
+    }
+}
+
+struct ChunkByProducer<'p, T, Slice, Pred> {
+    slice: Slice,
+    pred: &'p Pred,
+    tail: usize,
+    marker: PhantomData<fn(&T)>,
+}
+
+// Note: this implementation is very similar to `SplitProducer`.
+impl<T, Slice, Pred> UnindexedProducer for ChunkByProducer<'_, T, Slice, Pred>
+where
+    Slice: ChunkBySlice<T>,
+    Pred: Fn(&T, &T) -> bool + Send + Sync,
+{
+    type Item = Slice;
+
+    fn split(self) -> (Self, Option<Self>) {
+        if self.tail < 2 {
+            return (Self { tail: 0, ..self }, None);
+        }
+
+        // Look forward for the separator, and failing that look backward.
+        let mid = self.tail / 2;
+        let index = match self.slice.find(self.pred, mid, self.tail) {
+            Some(i) => Some(mid + i),
+            None => self.slice.rfind(self.pred, mid + 1),
+        };
+
+        if let Some(index) = index {
+            let (left, right) = self.slice.split(index);
+
+            let (left_tail, right_tail) = if index <= mid {
+                // If we scanned backwards to find the separator, everything in
+                // the right side is exhausted, with no separators left to find.
+                (index, 0)
+            } else {
+                (mid + 1, self.tail - index)
+            };
+
+            // Create the left split before the separator.
+            let left = Self {
+                slice: left,
+                tail: left_tail,
+                ..self
+            };
+
+            // Create the right split following the separator.
+            let right = Self {
+                slice: right,
+                tail: right_tail,
+                ..self
+            };
+
+            (left, Some(right))
+        } else {
+            // The search is exhausted, no more separators...
+            (Self { tail: 0, ..self }, None)
+        }
+    }
+
+    fn fold_with<F>(self, mut folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        let Self {
+            slice, pred, tail, ..
+        } = self;
+
+        let (slice, tail) = if tail == slice.as_ref().len() {
+            // No tail section, so just let `consume_iter` do it all.
+            (Some(slice), None)
+        } else if let Some(index) = slice.rfind(pred, tail) {
+            // We found the last separator to complete the tail, so
+            // end with that slice after `consume_iter` finds the rest.
+            let (left, right) = slice.split(index);
+            (Some(left), Some(right))
+        } else {
+            // We know there are no separators at all, so it's all "tail".
+            (None, Some(slice))
+        };
+
+        if let Some(mut slice) = slice {
+            // TODO (MSRV 1.77) use either:
+            // folder.consume_iter(slice.chunk_by(pred))
+            // folder.consume_iter(slice.chunk_by_mut(pred))
+
+            folder = folder.consume_iter(std::iter::from_fn(move || {
+                let len = slice.as_ref().len();
+                if len > 0 {
+                    let i = slice.find(pred, 0, len).unwrap_or(len);
+                    let (head, tail) = mem::take(&mut slice).split(i);
+                    slice = tail;
+                    Some(head)
+                } else {
+                    None
+                }
+            }));
+        }
+
+        if let Some(tail) = tail {
+            folder = folder.consume(tail);
+        }
+
+        folder
+    }
+}
+
+/// Parallel iterator over slice in (non-overlapping) chunks separated by a predicate.
+///
+/// This struct is created by the [`par_chunk_by`] method on `&[T]`.
+///
+/// [`par_chunk_by`]: trait.ParallelSlice.html#method.par_chunk_by
+pub struct ChunkBy<'data, T, P> {
+    pred: P,
+    slice: &'data [T],
+}
+
+impl<'data, T, P: Clone> Clone for ChunkBy<'data, T, P> {
+    fn clone(&self) -> Self {
+        ChunkBy {
+            pred: self.pred.clone(),
+            slice: self.slice,
+        }
+    }
+}
+
+impl<'data, T: fmt::Debug, P> fmt::Debug for ChunkBy<'data, T, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("ChunkBy")
+            .field("slice", &self.slice)
+            .finish()
+    }
+}
+
+impl<'data, T, P> ChunkBy<'data, T, P> {
+    pub(super) fn new(slice: &'data [T], pred: P) -> Self {
+        Self { pred, slice }
+    }
+}
+
+impl<'data, T, P> ParallelIterator for ChunkBy<'data, T, P>
+where
+    T: Sync,
+    P: Fn(&T, &T) -> bool + Send + Sync,
+{
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge_unindexed(
+            ChunkByProducer {
+                tail: self.slice.len(),
+                slice: self.slice,
+                pred: &self.pred,
+                marker: PhantomData,
+            },
+            consumer,
+        )
+    }
+}
+
+/// Parallel iterator over slice in (non-overlapping) mutable chunks
+/// separated by a predicate.
+///
+/// This struct is created by the [`par_chunk_by_mut`] method on `&mut [T]`.
+///
+/// [`par_chunk_by_mut`]: trait.ParallelSliceMut.html#method.par_chunk_by_mut
+pub struct ChunkByMut<'data, T, P> {
+    pred: P,
+    slice: &'data mut [T],
+}
+
+impl<'data, T: fmt::Debug, P> fmt::Debug for ChunkByMut<'data, T, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("ChunkByMut")
+            .field("slice", &self.slice)
+            .finish()
+    }
+}
+
+impl<'data, T, P> ChunkByMut<'data, T, P> {
+    pub(super) fn new(slice: &'data mut [T], pred: P) -> Self {
+        Self { pred, slice }
+    }
+}
+
+impl<'data, T, P> ParallelIterator for ChunkByMut<'data, T, P>
+where
+    T: Send,
+    P: Fn(&T, &T) -> bool + Send + Sync,
+{
+    type Item = &'data mut [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge_unindexed(
+            ChunkByProducer {
+                tail: self.slice.len(),
+                slice: self.slice,
+                pred: &self.pred,
+                marker: PhantomData,
+            },
+            consumer,
+        )
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/slice/chunks.rs.html b/src/rayon/slice/chunks.rs.html new file mode 100644 index 0000000000..7e5886ff68 --- /dev/null +++ b/src/rayon/slice/chunks.rs.html @@ -0,0 +1,779 @@ +chunks.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+
use crate::iter::plumbing::*;
+use crate::iter::*;
+use crate::math::div_round_up;
+
+/// Parallel iterator over immutable non-overlapping chunks of a slice
+#[derive(Debug)]
+pub struct Chunks<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: Sync> Chunks<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data [T]) -> Self {
+        Self { chunk_size, slice }
+    }
+}
+
+impl<'data, T: Sync> Clone for Chunks<'data, T> {
+    fn clone(&self) -> Self {
+        Chunks { ..*self }
+    }
+}
+
+impl<'data, T: Sync + 'data> ParallelIterator for Chunks<'data, T> {
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Sync + 'data> IndexedParallelIterator for Chunks<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        div_round_up(self.slice.len(), self.chunk_size)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(ChunksProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct ChunksProducer<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: 'data + Sync> Producer for ChunksProducer<'data, T> {
+    type Item = &'data [T];
+    type IntoIter = ::std::slice::Chunks<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.chunks(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = Ord::min(index * self.chunk_size, self.slice.len());
+        let (left, right) = self.slice.split_at(elem_index);
+        (
+            ChunksProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+            ChunksProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+        )
+    }
+}
+
+/// Parallel iterator over immutable non-overlapping chunks of a slice
+#[derive(Debug)]
+pub struct ChunksExact<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+    rem: &'data [T],
+}
+
+impl<'data, T: Sync> ChunksExact<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data [T]) -> Self {
+        let rem_len = slice.len() % chunk_size;
+        let len = slice.len() - rem_len;
+        let (slice, rem) = slice.split_at(len);
+        Self {
+            chunk_size,
+            slice,
+            rem,
+        }
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements.
+    pub fn remainder(&self) -> &'data [T] {
+        self.rem
+    }
+}
+
+impl<'data, T: Sync> Clone for ChunksExact<'data, T> {
+    fn clone(&self) -> Self {
+        ChunksExact { ..*self }
+    }
+}
+
+impl<'data, T: Sync + 'data> ParallelIterator for ChunksExact<'data, T> {
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Sync + 'data> IndexedParallelIterator for ChunksExact<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.slice.len() / self.chunk_size
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(ChunksExactProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct ChunksExactProducer<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: 'data + Sync> Producer for ChunksExactProducer<'data, T> {
+    type Item = &'data [T];
+    type IntoIter = ::std::slice::ChunksExact<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.chunks_exact(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = index * self.chunk_size;
+        let (left, right) = self.slice.split_at(elem_index);
+        (
+            ChunksExactProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+            ChunksExactProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+        )
+    }
+}
+
+/// Parallel iterator over mutable non-overlapping chunks of a slice
+#[derive(Debug)]
+pub struct ChunksMut<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+}
+
+impl<'data, T: Send> ChunksMut<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data mut [T]) -> Self {
+        Self { chunk_size, slice }
+    }
+}
+
+impl<'data, T: Send + 'data> ParallelIterator for ChunksMut<'data, T> {
+    type Item = &'data mut [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Send + 'data> IndexedParallelIterator for ChunksMut<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        div_round_up(self.slice.len(), self.chunk_size)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(ChunksMutProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct ChunksMutProducer<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+}
+
+impl<'data, T: 'data + Send> Producer for ChunksMutProducer<'data, T> {
+    type Item = &'data mut [T];
+    type IntoIter = ::std::slice::ChunksMut<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.chunks_mut(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = Ord::min(index * self.chunk_size, self.slice.len());
+        let (left, right) = self.slice.split_at_mut(elem_index);
+        (
+            ChunksMutProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+            ChunksMutProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+        )
+    }
+}
+
+/// Parallel iterator over mutable non-overlapping chunks of a slice
+#[derive(Debug)]
+pub struct ChunksExactMut<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+    rem: &'data mut [T],
+}
+
+impl<'data, T: Send> ChunksExactMut<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data mut [T]) -> Self {
+        let rem_len = slice.len() % chunk_size;
+        let len = slice.len() - rem_len;
+        let (slice, rem) = slice.split_at_mut(len);
+        Self {
+            chunk_size,
+            slice,
+            rem,
+        }
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements.
+    ///
+    /// Note that this has to consume `self` to return the original lifetime of
+    /// the data, which prevents this from actually being used as a parallel
+    /// iterator since that also consumes. This method is provided for parity
+    /// with `std::iter::ChunksExactMut`, but consider calling `remainder()` or
+    /// `take_remainder()` as alternatives.
+    pub fn into_remainder(self) -> &'data mut [T] {
+        self.rem
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements.
+    ///
+    /// Consider `take_remainder()` if you need access to the data with its
+    /// original lifetime, rather than borrowing through `&mut self` here.
+    pub fn remainder(&mut self) -> &mut [T] {
+        self.rem
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements. Subsequent calls will return an empty slice.
+    pub fn take_remainder(&mut self) -> &'data mut [T] {
+        std::mem::take(&mut self.rem)
+    }
+}
+
+impl<'data, T: Send + 'data> ParallelIterator for ChunksExactMut<'data, T> {
+    type Item = &'data mut [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Send + 'data> IndexedParallelIterator for ChunksExactMut<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.slice.len() / self.chunk_size
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(ChunksExactMutProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct ChunksExactMutProducer<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+}
+
+impl<'data, T: 'data + Send> Producer for ChunksExactMutProducer<'data, T> {
+    type Item = &'data mut [T];
+    type IntoIter = ::std::slice::ChunksExactMut<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.chunks_exact_mut(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = index * self.chunk_size;
+        let (left, right) = self.slice.split_at_mut(elem_index);
+        (
+            ChunksExactMutProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+            ChunksExactMutProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+        )
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/slice/mergesort.rs.html b/src/rayon/slice/mergesort.rs.html new file mode 100644 index 0000000000..72bfe4b732 --- /dev/null +++ b/src/rayon/slice/mergesort.rs.html @@ -0,0 +1,1513 @@ +mergesort.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+
//! Parallel merge sort.
+//!
+//! This implementation is copied verbatim from `std::slice::sort` and then parallelized.
+//! The only difference from the original is that the sequential `mergesort` returns
+//! `MergesortResult` and leaves descending arrays intact.
+
+use crate::iter::*;
+use crate::slice::ParallelSliceMut;
+use crate::SendPtr;
+use std::mem;
+use std::mem::size_of;
+use std::ptr;
+use std::slice;
+
+unsafe fn get_and_increment<T>(ptr: &mut *mut T) -> *mut T {
+    let old = *ptr;
+    *ptr = ptr.offset(1);
+    old
+}
+
+unsafe fn decrement_and_get<T>(ptr: &mut *mut T) -> *mut T {
+    *ptr = ptr.offset(-1);
+    *ptr
+}
+
+/// When dropped, copies from `src` into `dest` a sequence of length `len`.
+struct CopyOnDrop<T> {
+    src: *const T,
+    dest: *mut T,
+    len: usize,
+}
+
+impl<T> Drop for CopyOnDrop<T> {
+    fn drop(&mut self) {
+        unsafe {
+            ptr::copy_nonoverlapping(self.src, self.dest, self.len);
+        }
+    }
+}
+
+/// Inserts `v[0]` into pre-sorted sequence `v[1..]` so that whole `v[..]` becomes sorted.
+///
+/// This is the integral subroutine of insertion sort.
+fn insert_head<T, F>(v: &mut [T], is_less: &F)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    if v.len() >= 2 && is_less(&v[1], &v[0]) {
+        unsafe {
+            // There are three ways to implement insertion here:
+            //
+            // 1. Swap adjacent elements until the first one gets to its final destination.
+            //    However, this way we copy data around more than is necessary. If elements are big
+            //    structures (costly to copy), this method will be slow.
+            //
+            // 2. Iterate until the right place for the first element is found. Then shift the
+            //    elements succeeding it to make room for it and finally place it into the
+            //    remaining hole. This is a good method.
+            //
+            // 3. Copy the first element into a temporary variable. Iterate until the right place
+            //    for it is found. As we go along, copy every traversed element into the slot
+            //    preceding it. Finally, copy data from the temporary variable into the remaining
+            //    hole. This method is very good. Benchmarks demonstrated slightly better
+            //    performance than with the 2nd method.
+            //
+            // All methods were benchmarked, and the 3rd showed best results. So we chose that one.
+            let tmp = mem::ManuallyDrop::new(ptr::read(&v[0]));
+
+            // Intermediate state of the insertion process is always tracked by `hole`, which
+            // serves two purposes:
+            // 1. Protects integrity of `v` from panics in `is_less`.
+            // 2. Fills the remaining hole in `v` in the end.
+            //
+            // Panic safety:
+            //
+            // If `is_less` panics at any point during the process, `hole` will get dropped and
+            // fill the hole in `v` with `tmp`, thus ensuring that `v` still holds every object it
+            // initially held exactly once.
+            let mut hole = InsertionHole {
+                src: &*tmp,
+                dest: &mut v[1],
+            };
+            ptr::copy_nonoverlapping(&v[1], &mut v[0], 1);
+
+            for i in 2..v.len() {
+                if !is_less(&v[i], &*tmp) {
+                    break;
+                }
+                ptr::copy_nonoverlapping(&v[i], &mut v[i - 1], 1);
+                hole.dest = &mut v[i];
+            }
+            // `hole` gets dropped and thus copies `tmp` into the remaining hole in `v`.
+        }
+    }
+
+    // When dropped, copies from `src` into `dest`.
+    struct InsertionHole<T> {
+        src: *const T,
+        dest: *mut T,
+    }
+
+    impl<T> Drop for InsertionHole<T> {
+        fn drop(&mut self) {
+            unsafe {
+                ptr::copy_nonoverlapping(self.src, self.dest, 1);
+            }
+        }
+    }
+}
+
+/// Merges non-decreasing runs `v[..mid]` and `v[mid..]` using `buf` as temporary storage, and
+/// stores the result into `v[..]`.
+///
+/// # Safety
+///
+/// The two slices must be non-empty and `mid` must be in bounds. Buffer `buf` must be long enough
+/// to hold a copy of the shorter slice. Also, `T` must not be a zero-sized type.
+unsafe fn merge<T, F>(v: &mut [T], mid: usize, buf: *mut T, is_less: &F)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    let len = v.len();
+    let v = v.as_mut_ptr();
+    let v_mid = v.add(mid);
+    let v_end = v.add(len);
+
+    // The merge process first copies the shorter run into `buf`. Then it traces the newly copied
+    // run and the longer run forwards (or backwards), comparing their next unconsumed elements and
+    // copying the lesser (or greater) one into `v`.
+    //
+    // As soon as the shorter run is fully consumed, the process is done. If the longer run gets
+    // consumed first, then we must copy whatever is left of the shorter run into the remaining
+    // hole in `v`.
+    //
+    // Intermediate state of the process is always tracked by `hole`, which serves two purposes:
+    // 1. Protects integrity of `v` from panics in `is_less`.
+    // 2. Fills the remaining hole in `v` if the longer run gets consumed first.
+    //
+    // Panic safety:
+    //
+    // If `is_less` panics at any point during the process, `hole` will get dropped and fill the
+    // hole in `v` with the unconsumed range in `buf`, thus ensuring that `v` still holds every
+    // object it initially held exactly once.
+    let mut hole;
+
+    if mid <= len - mid {
+        // The left run is shorter.
+        ptr::copy_nonoverlapping(v, buf, mid);
+        hole = MergeHole {
+            start: buf,
+            end: buf.add(mid),
+            dest: v,
+        };
+
+        // Initially, these pointers point to the beginnings of their arrays.
+        let left = &mut hole.start;
+        let mut right = v_mid;
+        let out = &mut hole.dest;
+
+        while *left < hole.end && right < v_end {
+            // Consume the lesser side.
+            // If equal, prefer the left run to maintain stability.
+            let to_copy = if is_less(&*right, &**left) {
+                get_and_increment(&mut right)
+            } else {
+                get_and_increment(left)
+            };
+            ptr::copy_nonoverlapping(to_copy, get_and_increment(out), 1);
+        }
+    } else {
+        // The right run is shorter.
+        ptr::copy_nonoverlapping(v_mid, buf, len - mid);
+        hole = MergeHole {
+            start: buf,
+            end: buf.add(len - mid),
+            dest: v_mid,
+        };
+
+        // Initially, these pointers point past the ends of their arrays.
+        let left = &mut hole.dest;
+        let right = &mut hole.end;
+        let mut out = v_end;
+
+        while v < *left && buf < *right {
+            // Consume the greater side.
+            // If equal, prefer the right run to maintain stability.
+            let to_copy = if is_less(&*right.offset(-1), &*left.offset(-1)) {
+                decrement_and_get(left)
+            } else {
+                decrement_and_get(right)
+            };
+            ptr::copy_nonoverlapping(to_copy, decrement_and_get(&mut out), 1);
+        }
+    }
+    // Finally, `hole` gets dropped. If the shorter run was not fully consumed, whatever remains of
+    // it will now be copied into the hole in `v`.
+
+    // When dropped, copies the range `start..end` into `dest..`.
+    struct MergeHole<T> {
+        start: *mut T,
+        end: *mut T,
+        dest: *mut T,
+    }
+
+    impl<T> Drop for MergeHole<T> {
+        fn drop(&mut self) {
+            // `T` is not a zero-sized type, so it's okay to divide by its size.
+            unsafe {
+                let len = self.end.offset_from(self.start) as usize;
+                ptr::copy_nonoverlapping(self.start, self.dest, len);
+            }
+        }
+    }
+}
+
+/// The result of merge sort.
+#[must_use]
+#[derive(Clone, Copy, PartialEq, Eq)]
+enum MergesortResult {
+    /// The slice has already been sorted.
+    NonDescending,
+    /// The slice has been descending and therefore it was left intact.
+    Descending,
+    /// The slice was sorted.
+    Sorted,
+}
+
+/// A sorted run that starts at index `start` and is of length `len`.
+#[derive(Clone, Copy)]
+struct Run {
+    start: usize,
+    len: usize,
+}
+
+/// Examines the stack of runs and identifies the next pair of runs to merge. More specifically,
+/// if `Some(r)` is returned, that means `runs[r]` and `runs[r + 1]` must be merged next. If the
+/// algorithm should continue building a new run instead, `None` is returned.
+///
+/// TimSort is infamous for its buggy implementations, as described here:
+/// http://envisage-project.eu/timsort-specification-and-verification/
+///
+/// The gist of the story is: we must enforce the invariants on the top four runs on the stack.
+/// Enforcing them on just top three is not sufficient to ensure that the invariants will still
+/// hold for *all* runs in the stack.
+///
+/// This function correctly checks invariants for the top four runs. Additionally, if the top
+/// run starts at index 0, it will always demand a merge operation until the stack is fully
+/// collapsed, in order to complete the sort.
+#[inline]
+fn collapse(runs: &[Run]) -> Option<usize> {
+    let n = runs.len();
+
+    if n >= 2
+        && (runs[n - 1].start == 0
+            || runs[n - 2].len <= runs[n - 1].len
+            || (n >= 3 && runs[n - 3].len <= runs[n - 2].len + runs[n - 1].len)
+            || (n >= 4 && runs[n - 4].len <= runs[n - 3].len + runs[n - 2].len))
+    {
+        if n >= 3 && runs[n - 3].len < runs[n - 1].len {
+            Some(n - 3)
+        } else {
+            Some(n - 2)
+        }
+    } else {
+        None
+    }
+}
+
+/// Sorts a slice using merge sort, unless it is already in descending order.
+///
+/// This function doesn't modify the slice if it is already non-descending or descending.
+/// Otherwise, it sorts the slice into non-descending order.
+///
+/// This merge sort borrows some (but not all) ideas from TimSort, which is described in detail
+/// [here](https://github.com/python/cpython/blob/main/Objects/listsort.txt).
+///
+/// The algorithm identifies strictly descending and non-descending subsequences, which are called
+/// natural runs. There is a stack of pending runs yet to be merged. Each newly found run is pushed
+/// onto the stack, and then some pairs of adjacent runs are merged until these two invariants are
+/// satisfied:
+///
+/// 1. for every `i` in `1..runs.len()`: `runs[i - 1].len > runs[i].len`
+/// 2. for every `i` in `2..runs.len()`: `runs[i - 2].len > runs[i - 1].len + runs[i].len`
+///
+/// The invariants ensure that the total running time is *O*(*n* \* log(*n*)) worst-case.
+///
+/// # Safety
+///
+/// The argument `buf` is used as a temporary buffer and must be at least as long as `v`.
+unsafe fn mergesort<T, F>(v: &mut [T], buf: *mut T, is_less: &F) -> MergesortResult
+where
+    T: Send,
+    F: Fn(&T, &T) -> bool + Sync,
+{
+    // Very short runs are extended using insertion sort to span at least this many elements.
+    const MIN_RUN: usize = 10;
+
+    let len = v.len();
+
+    // In order to identify natural runs in `v`, we traverse it backwards. That might seem like a
+    // strange decision, but consider the fact that merges more often go in the opposite direction
+    // (forwards). According to benchmarks, merging forwards is slightly faster than merging
+    // backwards. To conclude, identifying runs by traversing backwards improves performance.
+    let mut runs = vec![];
+    let mut end = len;
+    while end > 0 {
+        // Find the next natural run, and reverse it if it's strictly descending.
+        let mut start = end - 1;
+
+        if start > 0 {
+            start -= 1;
+
+            if is_less(v.get_unchecked(start + 1), v.get_unchecked(start)) {
+                while start > 0 && is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) {
+                    start -= 1;
+                }
+
+                // If this descending run covers the whole slice, return immediately.
+                if start == 0 && end == len {
+                    return MergesortResult::Descending;
+                } else {
+                    v[start..end].reverse();
+                }
+            } else {
+                while start > 0 && !is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) {
+                    start -= 1;
+                }
+
+                // If this non-descending run covers the whole slice, return immediately.
+                if end - start == len {
+                    return MergesortResult::NonDescending;
+                }
+            }
+        }
+
+        // Insert some more elements into the run if it's too short. Insertion sort is faster than
+        // merge sort on short sequences, so this significantly improves performance.
+        while start > 0 && end - start < MIN_RUN {
+            start -= 1;
+            insert_head(&mut v[start..end], &is_less);
+        }
+
+        // Push this run onto the stack.
+        runs.push(Run {
+            start,
+            len: end - start,
+        });
+        end = start;
+
+        // Merge some pairs of adjacent runs to satisfy the invariants.
+        while let Some(r) = collapse(&runs) {
+            let left = runs[r + 1];
+            let right = runs[r];
+            merge(
+                &mut v[left.start..right.start + right.len],
+                left.len,
+                buf,
+                &is_less,
+            );
+
+            runs[r] = Run {
+                start: left.start,
+                len: left.len + right.len,
+            };
+            runs.remove(r + 1);
+        }
+    }
+
+    // Finally, exactly one run must remain in the stack.
+    debug_assert!(runs.len() == 1 && runs[0].start == 0 && runs[0].len == len);
+
+    // The original order of the slice was neither non-descending nor descending.
+    MergesortResult::Sorted
+}
+
+////////////////////////////////////////////////////////////////////////////
+// Everything above this line is copied from `std::slice::sort` (with very minor tweaks).
+// Everything below this line is parallelization.
+////////////////////////////////////////////////////////////////////////////
+
+/// Splits two sorted slices so that they can be merged in parallel.
+///
+/// Returns two indices `(a, b)` so that slices `left[..a]` and `right[..b]` come before
+/// `left[a..]` and `right[b..]`.
+fn split_for_merge<T, F>(left: &[T], right: &[T], is_less: &F) -> (usize, usize)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    let left_len = left.len();
+    let right_len = right.len();
+
+    if left_len >= right_len {
+        let left_mid = left_len / 2;
+
+        // Find the first element in `right` that is greater than or equal to `left[left_mid]`.
+        let mut a = 0;
+        let mut b = right_len;
+        while a < b {
+            let m = a + (b - a) / 2;
+            if is_less(&right[m], &left[left_mid]) {
+                a = m + 1;
+            } else {
+                b = m;
+            }
+        }
+
+        (left_mid, a)
+    } else {
+        let right_mid = right_len / 2;
+
+        // Find the first element in `left` that is greater than `right[right_mid]`.
+        let mut a = 0;
+        let mut b = left_len;
+        while a < b {
+            let m = a + (b - a) / 2;
+            if is_less(&right[right_mid], &left[m]) {
+                b = m;
+            } else {
+                a = m + 1;
+            }
+        }
+
+        (a, right_mid)
+    }
+}
+
+/// Merges slices `left` and `right` in parallel and stores the result into `dest`.
+///
+/// # Safety
+///
+/// The `dest` pointer must have enough space to store the result.
+///
+/// Even if `is_less` panics at any point during the merge process, this function will fully copy
+/// all elements from `left` and `right` into `dest` (not necessarily in sorted order).
+unsafe fn par_merge<T, F>(left: &mut [T], right: &mut [T], dest: *mut T, is_less: &F)
+where
+    T: Send,
+    F: Fn(&T, &T) -> bool + Sync,
+{
+    // Slices whose lengths sum up to this value are merged sequentially. This number is slightly
+    // larger than `CHUNK_LENGTH`, and the reason is that merging is faster than merge sorting, so
+    // merging needs a bit coarser granularity in order to hide the overhead of Rayon's task
+    // scheduling.
+    const MAX_SEQUENTIAL: usize = 5000;
+
+    let left_len = left.len();
+    let right_len = right.len();
+
+    // Intermediate state of the merge process, which serves two purposes:
+    // 1. Protects integrity of `dest` from panics in `is_less`.
+    // 2. Copies the remaining elements as soon as one of the two sides is exhausted.
+    //
+    // Panic safety:
+    //
+    // If `is_less` panics at any point during the merge process, `s` will get dropped and copy the
+    // remaining parts of `left` and `right` into `dest`.
+    let mut s = State {
+        left_start: left.as_mut_ptr(),
+        left_end: left.as_mut_ptr().add(left_len),
+        right_start: right.as_mut_ptr(),
+        right_end: right.as_mut_ptr().add(right_len),
+        dest,
+    };
+
+    if left_len == 0 || right_len == 0 || left_len + right_len < MAX_SEQUENTIAL {
+        while s.left_start < s.left_end && s.right_start < s.right_end {
+            // Consume the lesser side.
+            // If equal, prefer the left run to maintain stability.
+            let to_copy = if is_less(&*s.right_start, &*s.left_start) {
+                get_and_increment(&mut s.right_start)
+            } else {
+                get_and_increment(&mut s.left_start)
+            };
+            ptr::copy_nonoverlapping(to_copy, get_and_increment(&mut s.dest), 1);
+        }
+    } else {
+        // Function `split_for_merge` might panic. If that happens, `s` will get destructed and copy
+        // the whole `left` and `right` into `dest`.
+        let (left_mid, right_mid) = split_for_merge(left, right, is_less);
+        let (left_l, left_r) = left.split_at_mut(left_mid);
+        let (right_l, right_r) = right.split_at_mut(right_mid);
+
+        // Prevent the destructor of `s` from running. Rayon will ensure that both calls to
+        // `par_merge` happen. If one of the two calls panics, they will ensure that elements still
+        // get copied into `dest_left` and `dest_right``.
+        mem::forget(s);
+
+        // Wrap pointers in SendPtr so that they can be sent to another thread
+        // See the documentation of SendPtr for a full explanation
+        let dest_l = SendPtr(dest);
+        let dest_r = SendPtr(dest.add(left_l.len() + right_l.len()));
+        rayon_core::join(
+            move || par_merge(left_l, right_l, dest_l.get(), is_less),
+            move || par_merge(left_r, right_r, dest_r.get(), is_less),
+        );
+    }
+    // Finally, `s` gets dropped if we used sequential merge, thus copying the remaining elements
+    // all at once.
+
+    // When dropped, copies arrays `left_start..left_end` and `right_start..right_end` into `dest`,
+    // in that order.
+    struct State<T> {
+        left_start: *mut T,
+        left_end: *mut T,
+        right_start: *mut T,
+        right_end: *mut T,
+        dest: *mut T,
+    }
+
+    impl<T> Drop for State<T> {
+        fn drop(&mut self) {
+            let size = size_of::<T>();
+            let left_len = (self.left_end as usize - self.left_start as usize) / size;
+            let right_len = (self.right_end as usize - self.right_start as usize) / size;
+
+            // Copy array `left`, followed by `right`.
+            unsafe {
+                ptr::copy_nonoverlapping(self.left_start, self.dest, left_len);
+                self.dest = self.dest.add(left_len);
+                ptr::copy_nonoverlapping(self.right_start, self.dest, right_len);
+            }
+        }
+    }
+}
+
+/// Recursively merges pre-sorted chunks inside `v`.
+///
+/// Chunks of `v` are stored in `chunks` as intervals (inclusive left and exclusive right bound).
+/// Argument `buf` is an auxiliary buffer that will be used during the procedure.
+/// If `into_buf` is true, the result will be stored into `buf`, otherwise it will be in `v`.
+///
+/// # Safety
+///
+/// The number of chunks must be positive and they must be adjacent: the right bound of each chunk
+/// must equal the left bound of the following chunk.
+///
+/// The buffer must be at least as long as `v`.
+unsafe fn recurse<T, F>(
+    v: *mut T,
+    buf: *mut T,
+    chunks: &[(usize, usize)],
+    into_buf: bool,
+    is_less: &F,
+) where
+    T: Send,
+    F: Fn(&T, &T) -> bool + Sync,
+{
+    let len = chunks.len();
+    debug_assert!(len > 0);
+
+    // Base case of the algorithm.
+    // If only one chunk is remaining, there's no more work to split and merge.
+    if len == 1 {
+        if into_buf {
+            // Copy the chunk from `v` into `buf`.
+            let (start, end) = chunks[0];
+            let src = v.add(start);
+            let dest = buf.add(start);
+            ptr::copy_nonoverlapping(src, dest, end - start);
+        }
+        return;
+    }
+
+    // Split the chunks into two halves.
+    let (start, _) = chunks[0];
+    let (mid, _) = chunks[len / 2];
+    let (_, end) = chunks[len - 1];
+    let (left, right) = chunks.split_at(len / 2);
+
+    // After recursive calls finish we'll have to merge chunks `(start, mid)` and `(mid, end)` from
+    // `src` into `dest`. If the current invocation has to store the result into `buf`, we'll
+    // merge chunks from `v` into `buf`, and vice versa.
+    //
+    // Recursive calls flip `into_buf` at each level of recursion. More concretely, `par_merge`
+    // merges chunks from `buf` into `v` at the first level, from `v` into `buf` at the second
+    // level etc.
+    let (src, dest) = if into_buf { (v, buf) } else { (buf, v) };
+
+    // Panic safety:
+    //
+    // If `is_less` panics at any point during the recursive calls, the destructor of `guard` will
+    // be executed, thus copying everything from `src` into `dest`. This way we ensure that all
+    // chunks are in fact copied into `dest`, even if the merge process doesn't finish.
+    let guard = CopyOnDrop {
+        src: src.add(start),
+        dest: dest.add(start),
+        len: end - start,
+    };
+
+    // Wrap pointers in SendPtr so that they can be sent to another thread
+    // See the documentation of SendPtr for a full explanation
+    let v = SendPtr(v);
+    let buf = SendPtr(buf);
+    rayon_core::join(
+        move || recurse(v.get(), buf.get(), left, !into_buf, is_less),
+        move || recurse(v.get(), buf.get(), right, !into_buf, is_less),
+    );
+
+    // Everything went all right - recursive calls didn't panic.
+    // Forget the guard in order to prevent its destructor from running.
+    mem::forget(guard);
+
+    // Merge chunks `(start, mid)` and `(mid, end)` from `src` into `dest`.
+    let src_left = slice::from_raw_parts_mut(src.add(start), mid - start);
+    let src_right = slice::from_raw_parts_mut(src.add(mid), end - mid);
+    par_merge(src_left, src_right, dest.add(start), is_less);
+}
+
+/// Sorts `v` using merge sort in parallel.
+///
+/// The algorithm is stable, allocates memory, and `O(n log n)` worst-case.
+/// The allocated temporary buffer is of the same length as is `v`.
+pub(super) fn par_mergesort<T, F>(v: &mut [T], is_less: F)
+where
+    T: Send,
+    F: Fn(&T, &T) -> bool + Sync,
+{
+    // Slices of up to this length get sorted using insertion sort in order to avoid the cost of
+    // buffer allocation.
+    const MAX_INSERTION: usize = 20;
+    // The length of initial chunks. This number is as small as possible but so that the overhead
+    // of Rayon's task scheduling is still negligible.
+    const CHUNK_LENGTH: usize = 2000;
+
+    // Sorting has no meaningful behavior on zero-sized types.
+    if size_of::<T>() == 0 {
+        return;
+    }
+
+    let len = v.len();
+
+    // Short slices get sorted in-place via insertion sort to avoid allocations.
+    if len <= MAX_INSERTION {
+        if len >= 2 {
+            for i in (0..len - 1).rev() {
+                insert_head(&mut v[i..], &is_less);
+            }
+        }
+        return;
+    }
+
+    // Allocate a buffer to use as scratch memory. We keep the length 0 so we can keep in it
+    // shallow copies of the contents of `v` without risking the dtors running on copies if
+    // `is_less` panics.
+    let mut buf = Vec::<T>::with_capacity(len);
+    let buf = buf.as_mut_ptr();
+
+    // If the slice is not longer than one chunk would be, do sequential merge sort and return.
+    if len <= CHUNK_LENGTH {
+        let res = unsafe { mergesort(v, buf, &is_less) };
+        if res == MergesortResult::Descending {
+            v.reverse();
+        }
+        return;
+    }
+
+    // Split the slice into chunks and merge sort them in parallel.
+    // However, descending chunks will not be sorted - they will be simply left intact.
+    let mut iter = {
+        // Wrap pointer in SendPtr so that it can be sent to another thread
+        // See the documentation of SendPtr for a full explanation
+        let buf = SendPtr(buf);
+        let is_less = &is_less;
+
+        v.par_chunks_mut(CHUNK_LENGTH)
+            .with_max_len(1)
+            .enumerate()
+            .map(move |(i, chunk)| {
+                let l = CHUNK_LENGTH * i;
+                let r = l + chunk.len();
+                unsafe {
+                    let buf = buf.get().add(l);
+                    (l, r, mergesort(chunk, buf, is_less))
+                }
+            })
+            .collect::<Vec<_>>()
+            .into_iter()
+            .peekable()
+    };
+
+    // Now attempt to concatenate adjacent chunks that were left intact.
+    let mut chunks = Vec::with_capacity(iter.len());
+
+    while let Some((a, mut b, res)) = iter.next() {
+        // If this chunk was not modified by the sort procedure...
+        if res != MergesortResult::Sorted {
+            while let Some(&(x, y, r)) = iter.peek() {
+                // If the following chunk is of the same type and can be concatenated...
+                if r == res && (r == MergesortResult::Descending) == is_less(&v[x], &v[x - 1]) {
+                    // Concatenate them.
+                    b = y;
+                    iter.next();
+                } else {
+                    break;
+                }
+            }
+        }
+
+        // Descending chunks must be reversed.
+        if res == MergesortResult::Descending {
+            v[a..b].reverse();
+        }
+
+        chunks.push((a, b));
+    }
+
+    // All chunks are properly sorted.
+    // Now we just have to merge them together.
+    unsafe {
+        recurse(v.as_mut_ptr(), buf, &chunks, false, &is_less);
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::split_for_merge;
+    use rand::distributions::Uniform;
+    use rand::{thread_rng, Rng};
+
+    #[test]
+    fn test_split_for_merge() {
+        fn check(left: &[u32], right: &[u32]) {
+            let (l, r) = split_for_merge(left, right, &|&a, &b| a < b);
+            assert!(left[..l]
+                .iter()
+                .all(|&x| right[r..].iter().all(|&y| x <= y)));
+            assert!(right[..r].iter().all(|&x| left[l..].iter().all(|&y| x < y)));
+        }
+
+        check(&[1, 2, 2, 2, 2, 3], &[1, 2, 2, 2, 2, 3]);
+        check(&[1, 2, 2, 2, 2, 3], &[]);
+        check(&[], &[1, 2, 2, 2, 2, 3]);
+
+        let rng = &mut thread_rng();
+
+        for _ in 0..100 {
+            let limit: u32 = rng.gen_range(1..21);
+            let left_len: usize = rng.gen_range(0..20);
+            let right_len: usize = rng.gen_range(0..20);
+
+            let mut left = rng
+                .sample_iter(&Uniform::new(0, limit))
+                .take(left_len)
+                .collect::<Vec<_>>();
+            let mut right = rng
+                .sample_iter(&Uniform::new(0, limit))
+                .take(right_len)
+                .collect::<Vec<_>>();
+
+            left.sort();
+            right.sort();
+            check(&left, &right);
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/slice/mod.rs.html b/src/rayon/slice/mod.rs.html new file mode 100644 index 0000000000..174eb11d6d --- /dev/null +++ b/src/rayon/slice/mod.rs.html @@ -0,0 +1,2455 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+
//! Parallel iterator types for [slices][std::slice]
+//!
+//! You will rarely need to interact with this module directly unless you need
+//! to name one of the iterator types.
+//!
+//! [std::slice]: https://doc.rust-lang.org/stable/std/slice/
+
+mod chunk_by;
+mod chunks;
+mod mergesort;
+mod quicksort;
+mod rchunks;
+
+mod test;
+
+use self::mergesort::par_mergesort;
+use self::quicksort::par_quicksort;
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use crate::split_producer::*;
+
+use std::cmp::Ordering;
+use std::fmt::{self, Debug};
+use std::mem;
+
+pub use self::chunk_by::{ChunkBy, ChunkByMut};
+pub use self::chunks::{Chunks, ChunksExact, ChunksExactMut, ChunksMut};
+pub use self::rchunks::{RChunks, RChunksExact, RChunksExactMut, RChunksMut};
+
+/// Parallel extensions for slices.
+pub trait ParallelSlice<T: Sync> {
+    /// Returns a plain slice, which is used to implement the rest of the
+    /// parallel methods.
+    fn as_parallel_slice(&self) -> &[T];
+
+    /// Returns a parallel iterator over subslices separated by elements that
+    /// match the separator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let products: Vec<_> = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9]
+    ///     .par_split(|i| *i == 0)
+    ///     .map(|numbers| numbers.iter().product::<i32>())
+    ///     .collect();
+    /// assert_eq!(products, [6, 64, 162]);
+    /// ```
+    fn par_split<P>(&self, separator: P) -> Split<'_, T, P>
+    where
+        P: Fn(&T) -> bool + Sync + Send,
+    {
+        Split {
+            slice: self.as_parallel_slice(),
+            separator,
+        }
+    }
+
+    /// Returns a parallel iterator over subslices separated by elements that
+    /// match the separator, including the matched part as a terminator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let lengths: Vec<_> = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9]
+    ///     .par_split_inclusive(|i| *i == 0)
+    ///     .map(|numbers| numbers.len())
+    ///     .collect();
+    /// assert_eq!(lengths, [4, 4, 3]);
+    /// ```
+    fn par_split_inclusive<P>(&self, separator: P) -> SplitInclusive<'_, T, P>
+    where
+        P: Fn(&T) -> bool + Sync + Send,
+    {
+        SplitInclusive {
+            slice: self.as_parallel_slice(),
+            separator,
+        }
+    }
+
+    /// Returns a parallel iterator over all contiguous windows of length
+    /// `window_size`. The windows overlap.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let windows: Vec<_> = [1, 2, 3].par_windows(2).collect();
+    /// assert_eq!(vec![[1, 2], [2, 3]], windows);
+    /// ```
+    fn par_windows(&self, window_size: usize) -> Windows<'_, T> {
+        Windows {
+            window_size,
+            slice: self.as_parallel_slice(),
+        }
+    }
+
+    /// Returns a parallel iterator over at most `chunk_size` elements of
+    /// `self` at a time. The chunks do not overlap.
+    ///
+    /// If the number of elements in the iterator is not divisible by
+    /// `chunk_size`, the last chunk may be shorter than `chunk_size`.  All
+    /// other chunks will have that exact length.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let chunks: Vec<_> = [1, 2, 3, 4, 5].par_chunks(2).collect();
+    /// assert_eq!(chunks, vec![&[1, 2][..], &[3, 4], &[5]]);
+    /// ```
+    #[track_caller]
+    fn par_chunks(&self, chunk_size: usize) -> Chunks<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        Chunks::new(chunk_size, self.as_parallel_slice())
+    }
+
+    /// Returns a parallel iterator over `chunk_size` elements of
+    /// `self` at a time. The chunks do not overlap.
+    ///
+    /// If `chunk_size` does not divide the length of the slice, then the
+    /// last up to `chunk_size-1` elements will be omitted and can be
+    /// retrieved from the remainder function of the iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let chunks: Vec<_> = [1, 2, 3, 4, 5].par_chunks_exact(2).collect();
+    /// assert_eq!(chunks, vec![&[1, 2][..], &[3, 4]]);
+    /// ```
+    #[track_caller]
+    fn par_chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        ChunksExact::new(chunk_size, self.as_parallel_slice())
+    }
+
+    /// Returns a parallel iterator over at most `chunk_size` elements of `self` at a time,
+    /// starting at the end. The chunks do not overlap.
+    ///
+    /// If the number of elements in the iterator is not divisible by
+    /// `chunk_size`, the last chunk may be shorter than `chunk_size`.  All
+    /// other chunks will have that exact length.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let chunks: Vec<_> = [1, 2, 3, 4, 5].par_rchunks(2).collect();
+    /// assert_eq!(chunks, vec![&[4, 5][..], &[2, 3], &[1]]);
+    /// ```
+    #[track_caller]
+    fn par_rchunks(&self, chunk_size: usize) -> RChunks<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        RChunks::new(chunk_size, self.as_parallel_slice())
+    }
+
+    /// Returns a parallel iterator over `chunk_size` elements of `self` at a time,
+    /// starting at the end. The chunks do not overlap.
+    ///
+    /// If `chunk_size` does not divide the length of the slice, then the
+    /// last up to `chunk_size-1` elements will be omitted and can be
+    /// retrieved from the remainder function of the iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let chunks: Vec<_> = [1, 2, 3, 4, 5].par_rchunks_exact(2).collect();
+    /// assert_eq!(chunks, vec![&[4, 5][..], &[2, 3]]);
+    /// ```
+    #[track_caller]
+    fn par_rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        RChunksExact::new(chunk_size, self.as_parallel_slice())
+    }
+
+    /// Returns a parallel iterator over the slice producing non-overlapping runs
+    /// of elements using the predicate to separate them.
+    ///
+    /// The predicate is called on two elements following themselves,
+    /// it means the predicate is called on `slice[0]` and `slice[1]`
+    /// then on `slice[1]` and `slice[2]` and so on.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let chunks: Vec<_> = [1, 2, 2, 3, 3, 3].par_chunk_by(|&x, &y| x == y).collect();
+    /// assert_eq!(chunks[0], &[1]);
+    /// assert_eq!(chunks[1], &[2, 2]);
+    /// assert_eq!(chunks[2], &[3, 3, 3]);
+    /// ```
+    fn par_chunk_by<F>(&self, pred: F) -> ChunkBy<'_, T, F>
+    where
+        F: Fn(&T, &T) -> bool + Send + Sync,
+    {
+        ChunkBy::new(self.as_parallel_slice(), pred)
+    }
+}
+
+impl<T: Sync> ParallelSlice<T> for [T] {
+    #[inline]
+    fn as_parallel_slice(&self) -> &[T] {
+        self
+    }
+}
+
+/// Parallel extensions for mutable slices.
+pub trait ParallelSliceMut<T: Send> {
+    /// Returns a plain mutable slice, which is used to implement the rest of
+    /// the parallel methods.
+    fn as_parallel_slice_mut(&mut self) -> &mut [T];
+
+    /// Returns a parallel iterator over mutable subslices separated by
+    /// elements that match the separator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let mut array = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9];
+    /// array.par_split_mut(|i| *i == 0)
+    ///      .for_each(|slice| slice.reverse());
+    /// assert_eq!(array, [3, 2, 1, 0, 8, 4, 2, 0, 9, 6, 3]);
+    /// ```
+    fn par_split_mut<P>(&mut self, separator: P) -> SplitMut<'_, T, P>
+    where
+        P: Fn(&T) -> bool + Sync + Send,
+    {
+        SplitMut {
+            slice: self.as_parallel_slice_mut(),
+            separator,
+        }
+    }
+
+    /// Returns a parallel iterator over mutable subslices separated by elements
+    /// that match the separator, including the matched part as a terminator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let mut array = [1, 2, 3, 0, 2, 4, 8, 0, 3, 6, 9];
+    /// array.par_split_inclusive_mut(|i| *i == 0)
+    ///      .for_each(|slice| slice.reverse());
+    /// assert_eq!(array, [0, 3, 2, 1, 0, 8, 4, 2, 9, 6, 3]);
+    /// ```
+    fn par_split_inclusive_mut<P>(&mut self, separator: P) -> SplitInclusiveMut<'_, T, P>
+    where
+        P: Fn(&T) -> bool + Sync + Send,
+    {
+        SplitInclusiveMut {
+            slice: self.as_parallel_slice_mut(),
+            separator,
+        }
+    }
+
+    /// Returns a parallel iterator over at most `chunk_size` elements of
+    /// `self` at a time. The chunks are mutable and do not overlap.
+    ///
+    /// If the number of elements in the iterator is not divisible by
+    /// `chunk_size`, the last chunk may be shorter than `chunk_size`.  All
+    /// other chunks will have that exact length.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let mut array = [1, 2, 3, 4, 5];
+    /// array.par_chunks_mut(2)
+    ///      .for_each(|slice| slice.reverse());
+    /// assert_eq!(array, [2, 1, 4, 3, 5]);
+    /// ```
+    #[track_caller]
+    fn par_chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        ChunksMut::new(chunk_size, self.as_parallel_slice_mut())
+    }
+
+    /// Returns a parallel iterator over `chunk_size` elements of
+    /// `self` at a time. The chunks are mutable and do not overlap.
+    ///
+    /// If `chunk_size` does not divide the length of the slice, then the
+    /// last up to `chunk_size-1` elements will be omitted and can be
+    /// retrieved from the remainder function of the iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let mut array = [1, 2, 3, 4, 5];
+    /// array.par_chunks_exact_mut(3)
+    ///      .for_each(|slice| slice.reverse());
+    /// assert_eq!(array, [3, 2, 1, 4, 5]);
+    /// ```
+    #[track_caller]
+    fn par_chunks_exact_mut(&mut self, chunk_size: usize) -> ChunksExactMut<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        ChunksExactMut::new(chunk_size, self.as_parallel_slice_mut())
+    }
+
+    /// Returns a parallel iterator over at most `chunk_size` elements of `self` at a time,
+    /// starting at the end. The chunks are mutable and do not overlap.
+    ///
+    /// If the number of elements in the iterator is not divisible by
+    /// `chunk_size`, the last chunk may be shorter than `chunk_size`.  All
+    /// other chunks will have that exact length.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let mut array = [1, 2, 3, 4, 5];
+    /// array.par_rchunks_mut(2)
+    ///      .for_each(|slice| slice.reverse());
+    /// assert_eq!(array, [1, 3, 2, 5, 4]);
+    /// ```
+    #[track_caller]
+    fn par_rchunks_mut(&mut self, chunk_size: usize) -> RChunksMut<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        RChunksMut::new(chunk_size, self.as_parallel_slice_mut())
+    }
+
+    /// Returns a parallel iterator over `chunk_size` elements of `self` at a time,
+    /// starting at the end. The chunks are mutable and do not overlap.
+    ///
+    /// If `chunk_size` does not divide the length of the slice, then the
+    /// last up to `chunk_size-1` elements will be omitted and can be
+    /// retrieved from the remainder function of the iterator.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let mut array = [1, 2, 3, 4, 5];
+    /// array.par_rchunks_exact_mut(3)
+    ///      .for_each(|slice| slice.reverse());
+    /// assert_eq!(array, [1, 2, 5, 4, 3]);
+    /// ```
+    #[track_caller]
+    fn par_rchunks_exact_mut(&mut self, chunk_size: usize) -> RChunksExactMut<'_, T> {
+        assert!(chunk_size != 0, "chunk_size must not be zero");
+        RChunksExactMut::new(chunk_size, self.as_parallel_slice_mut())
+    }
+
+    /// Sorts the slice in parallel.
+    ///
+    /// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \* log(*n*)) worst-case.
+    ///
+    /// When applicable, unstable sorting is preferred because it is generally faster than stable
+    /// sorting and it doesn't allocate auxiliary memory.
+    /// See [`par_sort_unstable`](#method.par_sort_unstable).
+    ///
+    /// # Current implementation
+    ///
+    /// The current algorithm is an adaptive merge sort inspired by
+    /// [timsort](https://en.wikipedia.org/wiki/Timsort).
+    /// It is designed to be very fast in cases where the slice is nearly sorted, or consists of
+    /// two or more sorted sequences concatenated one after another.
+    ///
+    /// Also, it allocates temporary storage the same size as `self`, but for very short slices a
+    /// non-allocating insertion sort is used instead.
+    ///
+    /// In order to sort the slice in parallel, the slice is first divided into smaller chunks and
+    /// all chunks are sorted in parallel. Then, adjacent chunks that together form non-descending
+    /// or descending runs are concatenated. Finally, the remaining chunks are merged together using
+    /// parallel subdivision of chunks and parallel merge operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = [-5, 4, 1, -3, 2];
+    ///
+    /// v.par_sort();
+    /// assert_eq!(v, [-5, -3, 1, 2, 4]);
+    /// ```
+    fn par_sort(&mut self)
+    where
+        T: Ord,
+    {
+        par_mergesort(self.as_parallel_slice_mut(), T::lt);
+    }
+
+    /// Sorts the slice in parallel with a comparator function.
+    ///
+    /// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \* log(*n*)) worst-case.
+    ///
+    /// The comparator function must define a total ordering for the elements in the slice. If
+    /// the ordering is not total, the order of the elements is unspecified. An order is a
+    /// total order if it is (for all `a`, `b` and `c`):
+    ///
+    /// * total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true, and
+    /// * transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
+    ///
+    /// For example, while [`f64`] doesn't implement [`Ord`] because `NaN != NaN`, we can use
+    /// `partial_cmp` as our sort function when we know the slice doesn't contain a `NaN`.
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
+    /// floats.par_sort_by(|a, b| a.partial_cmp(b).unwrap());
+    /// assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);
+    /// ```
+    ///
+    /// When applicable, unstable sorting is preferred because it is generally faster than stable
+    /// sorting and it doesn't allocate auxiliary memory.
+    /// See [`par_sort_unstable_by`](#method.par_sort_unstable_by).
+    ///
+    /// # Current implementation
+    ///
+    /// The current algorithm is an adaptive merge sort inspired by
+    /// [timsort](https://en.wikipedia.org/wiki/Timsort).
+    /// It is designed to be very fast in cases where the slice is nearly sorted, or consists of
+    /// two or more sorted sequences concatenated one after another.
+    ///
+    /// Also, it allocates temporary storage the same size as `self`, but for very short slices a
+    /// non-allocating insertion sort is used instead.
+    ///
+    /// In order to sort the slice in parallel, the slice is first divided into smaller chunks and
+    /// all chunks are sorted in parallel. Then, adjacent chunks that together form non-descending
+    /// or descending runs are concatenated. Finally, the remaining chunks are merged together using
+    /// parallel subdivision of chunks and parallel merge operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = [5, 4, 1, 3, 2];
+    /// v.par_sort_by(|a, b| a.cmp(b));
+    /// assert_eq!(v, [1, 2, 3, 4, 5]);
+    ///
+    /// // reverse sorting
+    /// v.par_sort_by(|a, b| b.cmp(a));
+    /// assert_eq!(v, [5, 4, 3, 2, 1]);
+    /// ```
+    fn par_sort_by<F>(&mut self, compare: F)
+    where
+        F: Fn(&T, &T) -> Ordering + Sync,
+    {
+        par_mergesort(self.as_parallel_slice_mut(), |a, b| {
+            compare(a, b) == Ordering::Less
+        });
+    }
+
+    /// Sorts the slice in parallel with a key extraction function.
+    ///
+    /// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* \* log(*n*))
+    /// worst-case, where the key function is *O*(*m*).
+    ///
+    /// For expensive key functions (e.g. functions that are not simple property accesses or
+    /// basic operations), [`par_sort_by_cached_key`](#method.par_sort_by_cached_key) is likely to
+    /// be significantly faster, as it does not recompute element keys.
+    ///
+    /// When applicable, unstable sorting is preferred because it is generally faster than stable
+    /// sorting and it doesn't allocate auxiliary memory.
+    /// See [`par_sort_unstable_by_key`](#method.par_sort_unstable_by_key).
+    ///
+    /// # Current implementation
+    ///
+    /// The current algorithm is an adaptive merge sort inspired by
+    /// [timsort](https://en.wikipedia.org/wiki/Timsort).
+    /// It is designed to be very fast in cases where the slice is nearly sorted, or consists of
+    /// two or more sorted sequences concatenated one after another.
+    ///
+    /// Also, it allocates temporary storage the same size as `self`, but for very short slices a
+    /// non-allocating insertion sort is used instead.
+    ///
+    /// In order to sort the slice in parallel, the slice is first divided into smaller chunks and
+    /// all chunks are sorted in parallel. Then, adjacent chunks that together form non-descending
+    /// or descending runs are concatenated. Finally, the remaining chunks are merged together using
+    /// parallel subdivision of chunks and parallel merge operation.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = [-5i32, 4, 1, -3, 2];
+    ///
+    /// v.par_sort_by_key(|k| k.abs());
+    /// assert_eq!(v, [1, 2, -3, 4, -5]);
+    /// ```
+    fn par_sort_by_key<K, F>(&mut self, f: F)
+    where
+        K: Ord,
+        F: Fn(&T) -> K + Sync,
+    {
+        par_mergesort(self.as_parallel_slice_mut(), |a, b| f(a).lt(&f(b)));
+    }
+
+    /// Sorts the slice in parallel with a key extraction function.
+    ///
+    /// During sorting, the key function is called at most once per element, by using
+    /// temporary storage to remember the results of key evaluation.
+    /// The key function is called in parallel, so the order of calls is completely unspecified.
+    ///
+    /// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* + *n* \* log(*n*))
+    /// worst-case, where the key function is *O*(*m*).
+    ///
+    /// For simple key functions (e.g., functions that are property accesses or
+    /// basic operations), [`par_sort_by_key`](#method.par_sort_by_key) is likely to be
+    /// faster.
+    ///
+    /// # Current implementation
+    ///
+    /// The current algorithm is based on [pattern-defeating quicksort][pdqsort] by Orson Peters,
+    /// which combines the fast average case of randomized quicksort with the fast worst case of
+    /// heapsort, while achieving linear time on slices with certain patterns. It uses some
+    /// randomization to avoid degenerate cases, but with a fixed seed to always provide
+    /// deterministic behavior.
+    ///
+    /// In the worst case, the algorithm allocates temporary storage in a `Vec<(K, usize)>` the
+    /// length of the slice.
+    ///
+    /// All quicksorts work in two stages: partitioning into two halves followed by recursive
+    /// calls. The partitioning phase is sequential, but the two recursive calls are performed in
+    /// parallel. Finally, after sorting the cached keys, the item positions are updated sequentially.
+    ///
+    /// [pdqsort]: https://github.com/orlp/pdqsort
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = [-5i32, 4, 32, -3, 2];
+    ///
+    /// v.par_sort_by_cached_key(|k| k.to_string());
+    /// assert!(v == [-3, -5, 2, 32, 4]);
+    /// ```
+    fn par_sort_by_cached_key<K, F>(&mut self, f: F)
+    where
+        F: Fn(&T) -> K + Sync,
+        K: Ord + Send,
+    {
+        let slice = self.as_parallel_slice_mut();
+        let len = slice.len();
+        if len < 2 {
+            return;
+        }
+
+        // Helper macro for indexing our vector by the smallest possible type, to reduce allocation.
+        macro_rules! sort_by_key {
+            ($t:ty) => {{
+                let mut indices: Vec<_> = slice
+                    .par_iter_mut()
+                    .enumerate()
+                    .map(|(i, x)| (f(&*x), i as $t))
+                    .collect();
+                // The elements of `indices` are unique, as they are indexed, so any sort will be
+                // stable with respect to the original slice. We use `sort_unstable` here because
+                // it requires less memory allocation.
+                indices.par_sort_unstable();
+                for i in 0..len {
+                    let mut index = indices[i].1;
+                    while (index as usize) < i {
+                        index = indices[index as usize].1;
+                    }
+                    indices[i].1 = index;
+                    slice.swap(i, index as usize);
+                }
+            }};
+        }
+
+        let sz_u8 = mem::size_of::<(K, u8)>();
+        let sz_u16 = mem::size_of::<(K, u16)>();
+        let sz_u32 = mem::size_of::<(K, u32)>();
+        let sz_usize = mem::size_of::<(K, usize)>();
+
+        if sz_u8 < sz_u16 && len <= (std::u8::MAX as usize) {
+            return sort_by_key!(u8);
+        }
+        if sz_u16 < sz_u32 && len <= (std::u16::MAX as usize) {
+            return sort_by_key!(u16);
+        }
+        if sz_u32 < sz_usize && len <= (std::u32::MAX as usize) {
+            return sort_by_key!(u32);
+        }
+        sort_by_key!(usize)
+    }
+
+    /// Sorts the slice in parallel, but might not preserve the order of equal elements.
+    ///
+    /// This sort is unstable (i.e., may reorder equal elements), in-place
+    /// (i.e., does not allocate), and *O*(*n* \* log(*n*)) worst-case.
+    ///
+    /// # Current implementation
+    ///
+    /// The current algorithm is based on [pattern-defeating quicksort][pdqsort] by Orson Peters,
+    /// which combines the fast average case of randomized quicksort with the fast worst case of
+    /// heapsort, while achieving linear time on slices with certain patterns. It uses some
+    /// randomization to avoid degenerate cases, but with a fixed seed to always provide
+    /// deterministic behavior.
+    ///
+    /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
+    /// slice consists of several concatenated sorted sequences.
+    ///
+    /// All quicksorts work in two stages: partitioning into two halves followed by recursive
+    /// calls. The partitioning phase is sequential, but the two recursive calls are performed in
+    /// parallel.
+    ///
+    /// [pdqsort]: https://github.com/orlp/pdqsort
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = [-5, 4, 1, -3, 2];
+    ///
+    /// v.par_sort_unstable();
+    /// assert_eq!(v, [-5, -3, 1, 2, 4]);
+    /// ```
+    fn par_sort_unstable(&mut self)
+    where
+        T: Ord,
+    {
+        par_quicksort(self.as_parallel_slice_mut(), T::lt);
+    }
+
+    /// Sorts the slice in parallel with a comparator function, but might not preserve the order of
+    /// equal elements.
+    ///
+    /// This sort is unstable (i.e., may reorder equal elements), in-place
+    /// (i.e., does not allocate), and *O*(*n* \* log(*n*)) worst-case.
+    ///
+    /// The comparator function must define a total ordering for the elements in the slice. If
+    /// the ordering is not total, the order of the elements is unspecified. An order is a
+    /// total order if it is (for all `a`, `b` and `c`):
+    ///
+    /// * total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true, and
+    /// * transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
+    ///
+    /// For example, while [`f64`] doesn't implement [`Ord`] because `NaN != NaN`, we can use
+    /// `partial_cmp` as our sort function when we know the slice doesn't contain a `NaN`.
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
+    /// floats.par_sort_unstable_by(|a, b| a.partial_cmp(b).unwrap());
+    /// assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);
+    /// ```
+    ///
+    /// # Current implementation
+    ///
+    /// The current algorithm is based on [pattern-defeating quicksort][pdqsort] by Orson Peters,
+    /// which combines the fast average case of randomized quicksort with the fast worst case of
+    /// heapsort, while achieving linear time on slices with certain patterns. It uses some
+    /// randomization to avoid degenerate cases, but with a fixed seed to always provide
+    /// deterministic behavior.
+    ///
+    /// It is typically faster than stable sorting, except in a few special cases, e.g., when the
+    /// slice consists of several concatenated sorted sequences.
+    ///
+    /// All quicksorts work in two stages: partitioning into two halves followed by recursive
+    /// calls. The partitioning phase is sequential, but the two recursive calls are performed in
+    /// parallel.
+    ///
+    /// [pdqsort]: https://github.com/orlp/pdqsort
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = [5, 4, 1, 3, 2];
+    /// v.par_sort_unstable_by(|a, b| a.cmp(b));
+    /// assert_eq!(v, [1, 2, 3, 4, 5]);
+    ///
+    /// // reverse sorting
+    /// v.par_sort_unstable_by(|a, b| b.cmp(a));
+    /// assert_eq!(v, [5, 4, 3, 2, 1]);
+    /// ```
+    fn par_sort_unstable_by<F>(&mut self, compare: F)
+    where
+        F: Fn(&T, &T) -> Ordering + Sync,
+    {
+        par_quicksort(self.as_parallel_slice_mut(), |a, b| {
+            compare(a, b) == Ordering::Less
+        });
+    }
+
+    /// Sorts the slice in parallel with a key extraction function, but might not preserve the order
+    /// of equal elements.
+    ///
+    /// This sort is unstable (i.e., may reorder equal elements), in-place
+    /// (i.e., does not allocate), and *O*(m \* *n* \* log(*n*)) worst-case,
+    /// where the key function is *O*(*m*).
+    ///
+    /// # Current implementation
+    ///
+    /// The current algorithm is based on [pattern-defeating quicksort][pdqsort] by Orson Peters,
+    /// which combines the fast average case of randomized quicksort with the fast worst case of
+    /// heapsort, while achieving linear time on slices with certain patterns. It uses some
+    /// randomization to avoid degenerate cases, but with a fixed seed to always provide
+    /// deterministic behavior.
+    ///
+    /// Due to its key calling strategy, `par_sort_unstable_by_key` is likely to be slower than
+    /// [`par_sort_by_cached_key`](#method.par_sort_by_cached_key) in cases where the key function
+    /// is expensive.
+    ///
+    /// All quicksorts work in two stages: partitioning into two halves followed by recursive
+    /// calls. The partitioning phase is sequential, but the two recursive calls are performed in
+    /// parallel.
+    ///
+    /// [pdqsort]: https://github.com/orlp/pdqsort
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let mut v = [-5i32, 4, 1, -3, 2];
+    ///
+    /// v.par_sort_unstable_by_key(|k| k.abs());
+    /// assert_eq!(v, [1, 2, -3, 4, -5]);
+    /// ```
+    fn par_sort_unstable_by_key<K, F>(&mut self, f: F)
+    where
+        K: Ord,
+        F: Fn(&T) -> K + Sync,
+    {
+        par_quicksort(self.as_parallel_slice_mut(), |a, b| f(a).lt(&f(b)));
+    }
+
+    /// Returns a parallel iterator over the slice producing non-overlapping mutable
+    /// runs of elements using the predicate to separate them.
+    ///
+    /// The predicate is called on two elements following themselves,
+    /// it means the predicate is called on `slice[0]` and `slice[1]`
+    /// then on `slice[1]` and `slice[2]` and so on.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let mut xs = [1, 2, 2, 3, 3, 3];
+    /// let chunks: Vec<_> = xs.par_chunk_by_mut(|&x, &y| x == y).collect();
+    /// assert_eq!(chunks[0], &mut [1]);
+    /// assert_eq!(chunks[1], &mut [2, 2]);
+    /// assert_eq!(chunks[2], &mut [3, 3, 3]);
+    /// ```
+    fn par_chunk_by_mut<F>(&mut self, pred: F) -> ChunkByMut<'_, T, F>
+    where
+        F: Fn(&T, &T) -> bool + Send + Sync,
+    {
+        ChunkByMut::new(self.as_parallel_slice_mut(), pred)
+    }
+}
+
+impl<T: Send> ParallelSliceMut<T> for [T] {
+    #[inline]
+    fn as_parallel_slice_mut(&mut self) -> &mut [T] {
+        self
+    }
+}
+
+impl<'data, T: Sync + 'data> IntoParallelIterator for &'data [T] {
+    type Item = &'data T;
+    type Iter = Iter<'data, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        Iter { slice: self }
+    }
+}
+
+impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut [T] {
+    type Item = &'data mut T;
+    type Iter = IterMut<'data, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IterMut { slice: self }
+    }
+}
+
+/// Parallel iterator over immutable items in a slice
+#[derive(Debug)]
+pub struct Iter<'data, T: Sync> {
+    slice: &'data [T],
+}
+
+impl<'data, T: Sync> Clone for Iter<'data, T> {
+    fn clone(&self) -> Self {
+        Iter { ..*self }
+    }
+}
+
+impl<'data, T: Sync + 'data> ParallelIterator for Iter<'data, T> {
+    type Item = &'data T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Sync + 'data> IndexedParallelIterator for Iter<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.slice.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(IterProducer { slice: self.slice })
+    }
+}
+
+struct IterProducer<'data, T: Sync> {
+    slice: &'data [T],
+}
+
+impl<'data, T: 'data + Sync> Producer for IterProducer<'data, T> {
+    type Item = &'data T;
+    type IntoIter = ::std::slice::Iter<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.iter()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.slice.split_at(index);
+        (IterProducer { slice: left }, IterProducer { slice: right })
+    }
+}
+
+/// Parallel iterator over immutable overlapping windows of a slice
+#[derive(Debug)]
+pub struct Windows<'data, T: Sync> {
+    window_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: Sync> Clone for Windows<'data, T> {
+    fn clone(&self) -> Self {
+        Windows { ..*self }
+    }
+}
+
+impl<'data, T: Sync + 'data> ParallelIterator for Windows<'data, T> {
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Sync + 'data> IndexedParallelIterator for Windows<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        assert!(self.window_size >= 1);
+        self.slice.len().saturating_sub(self.window_size - 1)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(WindowsProducer {
+            window_size: self.window_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct WindowsProducer<'data, T: Sync> {
+    window_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: 'data + Sync> Producer for WindowsProducer<'data, T> {
+    type Item = &'data [T];
+    type IntoIter = ::std::slice::Windows<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.windows(self.window_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let left_index = Ord::min(self.slice.len(), index + (self.window_size - 1));
+        let left = &self.slice[..left_index];
+        let right = &self.slice[index..];
+        (
+            WindowsProducer {
+                window_size: self.window_size,
+                slice: left,
+            },
+            WindowsProducer {
+                window_size: self.window_size,
+                slice: right,
+            },
+        )
+    }
+}
+
+/// Parallel iterator over mutable items in a slice
+#[derive(Debug)]
+pub struct IterMut<'data, T: Send> {
+    slice: &'data mut [T],
+}
+
+impl<'data, T: Send + 'data> ParallelIterator for IterMut<'data, T> {
+    type Item = &'data mut T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Send + 'data> IndexedParallelIterator for IterMut<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.slice.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(IterMutProducer { slice: self.slice })
+    }
+}
+
+struct IterMutProducer<'data, T: Send> {
+    slice: &'data mut [T],
+}
+
+impl<'data, T: 'data + Send> Producer for IterMutProducer<'data, T> {
+    type Item = &'data mut T;
+    type IntoIter = ::std::slice::IterMut<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.iter_mut()
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let (left, right) = self.slice.split_at_mut(index);
+        (
+            IterMutProducer { slice: left },
+            IterMutProducer { slice: right },
+        )
+    }
+}
+
+/// Parallel iterator over slices separated by a predicate
+pub struct Split<'data, T, P> {
+    slice: &'data [T],
+    separator: P,
+}
+
+impl<'data, T, P: Clone> Clone for Split<'data, T, P> {
+    fn clone(&self) -> Self {
+        Split {
+            separator: self.separator.clone(),
+            ..*self
+        }
+    }
+}
+
+impl<'data, T: Debug, P> Debug for Split<'data, T, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Split").field("slice", &self.slice).finish()
+    }
+}
+
+impl<'data, T, P> ParallelIterator for Split<'data, T, P>
+where
+    P: Fn(&T) -> bool + Sync + Send,
+    T: Sync,
+{
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitProducer::new(self.slice, &self.separator);
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Parallel iterator over slices separated by a predicate,
+/// including the matched part as a terminator.
+pub struct SplitInclusive<'data, T, P> {
+    slice: &'data [T],
+    separator: P,
+}
+
+impl<'data, T, P: Clone> Clone for SplitInclusive<'data, T, P> {
+    fn clone(&self) -> Self {
+        SplitInclusive {
+            separator: self.separator.clone(),
+            ..*self
+        }
+    }
+}
+
+impl<'data, T: Debug, P> Debug for SplitInclusive<'data, T, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("SplitInclusive")
+            .field("slice", &self.slice)
+            .finish()
+    }
+}
+
+impl<'data, T, P> ParallelIterator for SplitInclusive<'data, T, P>
+where
+    P: Fn(&T) -> bool + Sync + Send,
+    T: Sync,
+{
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitInclusiveProducer::new_incl(self.slice, &self.separator);
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Implement support for `SplitProducer`.
+impl<'data, T, P> Fissile<P> for &'data [T]
+where
+    P: Fn(&T) -> bool,
+{
+    fn length(&self) -> usize {
+        self.len()
+    }
+
+    fn midpoint(&self, end: usize) -> usize {
+        end / 2
+    }
+
+    fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize> {
+        self[start..end].iter().position(separator)
+    }
+
+    fn rfind(&self, separator: &P, end: usize) -> Option<usize> {
+        self[..end].iter().rposition(separator)
+    }
+
+    fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self) {
+        if INCL {
+            // include the separator in the left side
+            self.split_at(index + 1)
+        } else {
+            let (left, right) = self.split_at(index);
+            (left, &right[1..]) // skip the separator
+        }
+    }
+
+    fn fold_splits<F, const INCL: bool>(self, separator: &P, folder: F, skip_last: bool) -> F
+    where
+        F: Folder<Self>,
+        Self: Send,
+    {
+        if INCL {
+            debug_assert!(!skip_last);
+            folder.consume_iter(self.split_inclusive(separator))
+        } else {
+            let mut split = self.split(separator);
+            if skip_last {
+                split.next_back();
+            }
+            folder.consume_iter(split)
+        }
+    }
+}
+
+/// Parallel iterator over mutable slices separated by a predicate
+pub struct SplitMut<'data, T, P> {
+    slice: &'data mut [T],
+    separator: P,
+}
+
+impl<'data, T: Debug, P> Debug for SplitMut<'data, T, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("SplitMut")
+            .field("slice", &self.slice)
+            .finish()
+    }
+}
+
+impl<'data, T, P> ParallelIterator for SplitMut<'data, T, P>
+where
+    P: Fn(&T) -> bool + Sync + Send,
+    T: Send,
+{
+    type Item = &'data mut [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitProducer::new(self.slice, &self.separator);
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Parallel iterator over mutable slices separated by a predicate,
+/// including the matched part as a terminator.
+pub struct SplitInclusiveMut<'data, T, P> {
+    slice: &'data mut [T],
+    separator: P,
+}
+
+impl<'data, T: Debug, P> Debug for SplitInclusiveMut<'data, T, P> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("SplitInclusiveMut")
+            .field("slice", &self.slice)
+            .finish()
+    }
+}
+
+impl<'data, T, P> ParallelIterator for SplitInclusiveMut<'data, T, P>
+where
+    P: Fn(&T) -> bool + Sync + Send,
+    T: Send,
+{
+    type Item = &'data mut [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitInclusiveProducer::new_incl(self.slice, &self.separator);
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Implement support for `SplitProducer`.
+impl<'data, T, P> Fissile<P> for &'data mut [T]
+where
+    P: Fn(&T) -> bool,
+{
+    fn length(&self) -> usize {
+        self.len()
+    }
+
+    fn midpoint(&self, end: usize) -> usize {
+        end / 2
+    }
+
+    fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize> {
+        self[start..end].iter().position(separator)
+    }
+
+    fn rfind(&self, separator: &P, end: usize) -> Option<usize> {
+        self[..end].iter().rposition(separator)
+    }
+
+    fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self) {
+        if INCL {
+            // include the separator in the left side
+            self.split_at_mut(index + 1)
+        } else {
+            let (left, right) = self.split_at_mut(index);
+            (left, &mut right[1..]) // skip the separator
+        }
+    }
+
+    fn fold_splits<F, const INCL: bool>(self, separator: &P, folder: F, skip_last: bool) -> F
+    where
+        F: Folder<Self>,
+        Self: Send,
+    {
+        if INCL {
+            debug_assert!(!skip_last);
+            folder.consume_iter(self.split_inclusive_mut(separator))
+        } else {
+            let mut split = self.split_mut(separator);
+            if skip_last {
+                split.next_back();
+            }
+            folder.consume_iter(split)
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/slice/quicksort.rs.html b/src/rayon/slice/quicksort.rs.html new file mode 100644 index 0000000000..a615351804 --- /dev/null +++ b/src/rayon/slice/quicksort.rs.html @@ -0,0 +1,1807 @@ +quicksort.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+
//! Parallel quicksort.
+//!
+//! This implementation is copied verbatim from `std::slice::sort_unstable` and then parallelized.
+//! The only difference from the original is that calls to `recurse` are executed in parallel using
+//! `rayon_core::join`.
+
+use std::marker::PhantomData;
+use std::mem::{self, MaybeUninit};
+use std::ptr;
+
+/// When dropped, copies from `src` into `dest`.
+#[must_use]
+struct CopyOnDrop<'a, T> {
+    src: *const T,
+    dest: *mut T,
+    /// `src` is often a local pointer here, make sure we have appropriate
+    /// PhantomData so that dropck can protect us.
+    marker: PhantomData<&'a mut T>,
+}
+
+impl<'a, T> CopyOnDrop<'a, T> {
+    /// Construct from a source pointer and a destination
+    /// Assumes dest lives longer than src, since there is no easy way to
+    /// copy down lifetime information from another pointer
+    unsafe fn new(src: &'a T, dest: *mut T) -> Self {
+        CopyOnDrop {
+            src,
+            dest,
+            marker: PhantomData,
+        }
+    }
+}
+
+impl<T> Drop for CopyOnDrop<'_, T> {
+    fn drop(&mut self) {
+        // SAFETY:  This is a helper class.
+        //          Please refer to its usage for correctness.
+        //          Namely, one must be sure that `src` and `dst` does not overlap as required by `ptr::copy_nonoverlapping`.
+        unsafe {
+            ptr::copy_nonoverlapping(self.src, self.dest, 1);
+        }
+    }
+}
+
+/// Shifts the first element to the right until it encounters a greater or equal element.
+fn shift_head<T, F>(v: &mut [T], is_less: &F)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    let len = v.len();
+    // SAFETY: The unsafe operations below involves indexing without a bounds check (by offsetting a
+    // pointer) and copying memory (`ptr::copy_nonoverlapping`).
+    //
+    // a. Indexing:
+    //  1. We checked the size of the array to >=2.
+    //  2. All the indexing that we will do is always between {0 <= index < len} at most.
+    //
+    // b. Memory copying
+    //  1. We are obtaining pointers to references which are guaranteed to be valid.
+    //  2. They cannot overlap because we obtain pointers to difference indices of the slice.
+    //     Namely, `i` and `i-1`.
+    //  3. If the slice is properly aligned, the elements are properly aligned.
+    //     It is the caller's responsibility to make sure the slice is properly aligned.
+    //
+    // See comments below for further detail.
+    unsafe {
+        // If the first two elements are out-of-order...
+        if len >= 2 && is_less(v.get_unchecked(1), v.get_unchecked(0)) {
+            // Read the first element into a stack-allocated variable. If a following comparison
+            // operation panics, `hole` will get dropped and automatically write the element back
+            // into the slice.
+            let tmp = mem::ManuallyDrop::new(ptr::read(v.get_unchecked(0)));
+            let v = v.as_mut_ptr();
+            let mut hole = CopyOnDrop::new(&*tmp, v.add(1));
+            ptr::copy_nonoverlapping(v.add(1), v.add(0), 1);
+
+            for i in 2..len {
+                if !is_less(&*v.add(i), &*tmp) {
+                    break;
+                }
+
+                // Move `i`-th element one place to the left, thus shifting the hole to the right.
+                ptr::copy_nonoverlapping(v.add(i), v.add(i - 1), 1);
+                hole.dest = v.add(i);
+            }
+            // `hole` gets dropped and thus copies `tmp` into the remaining hole in `v`.
+        }
+    }
+}
+
+/// Shifts the last element to the left until it encounters a smaller or equal element.
+fn shift_tail<T, F>(v: &mut [T], is_less: &F)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    let len = v.len();
+    // SAFETY: The unsafe operations below involves indexing without a bound check (by offsetting a
+    // pointer) and copying memory (`ptr::copy_nonoverlapping`).
+    //
+    // a. Indexing:
+    //  1. We checked the size of the array to >= 2.
+    //  2. All the indexing that we will do is always between `0 <= index < len-1` at most.
+    //
+    // b. Memory copying
+    //  1. We are obtaining pointers to references which are guaranteed to be valid.
+    //  2. They cannot overlap because we obtain pointers to difference indices of the slice.
+    //     Namely, `i` and `i+1`.
+    //  3. If the slice is properly aligned, the elements are properly aligned.
+    //     It is the caller's responsibility to make sure the slice is properly aligned.
+    //
+    // See comments below for further detail.
+    unsafe {
+        // If the last two elements are out-of-order...
+        if len >= 2 && is_less(v.get_unchecked(len - 1), v.get_unchecked(len - 2)) {
+            // Read the last element into a stack-allocated variable. If a following comparison
+            // operation panics, `hole` will get dropped and automatically write the element back
+            // into the slice.
+            let tmp = mem::ManuallyDrop::new(ptr::read(v.get_unchecked(len - 1)));
+            let v = v.as_mut_ptr();
+            let mut hole = CopyOnDrop::new(&*tmp, v.add(len - 2));
+            ptr::copy_nonoverlapping(v.add(len - 2), v.add(len - 1), 1);
+
+            for i in (0..len - 2).rev() {
+                if !is_less(&*tmp, &*v.add(i)) {
+                    break;
+                }
+
+                // Move `i`-th element one place to the right, thus shifting the hole to the left.
+                ptr::copy_nonoverlapping(v.add(i), v.add(i + 1), 1);
+                hole.dest = v.add(i);
+            }
+            // `hole` gets dropped and thus copies `tmp` into the remaining hole in `v`.
+        }
+    }
+}
+
+/// Partially sorts a slice by shifting several out-of-order elements around.
+///
+/// Returns `true` if the slice is sorted at the end. This function is *O*(*n*) worst-case.
+#[cold]
+fn partial_insertion_sort<T, F>(v: &mut [T], is_less: &F) -> bool
+where
+    F: Fn(&T, &T) -> bool,
+{
+    // Maximum number of adjacent out-of-order pairs that will get shifted.
+    const MAX_STEPS: usize = 5;
+    // If the slice is shorter than this, don't shift any elements.
+    const SHORTEST_SHIFTING: usize = 50;
+
+    let len = v.len();
+    let mut i = 1;
+
+    for _ in 0..MAX_STEPS {
+        // SAFETY: We already explicitly did the bound checking with `i < len`.
+        // All our subsequent indexing is only in the range `0 <= index < len`
+        unsafe {
+            // Find the next pair of adjacent out-of-order elements.
+            while i < len && !is_less(v.get_unchecked(i), v.get_unchecked(i - 1)) {
+                i += 1;
+            }
+        }
+
+        // Are we done?
+        if i == len {
+            return true;
+        }
+
+        // Don't shift elements on short arrays, that has a performance cost.
+        if len < SHORTEST_SHIFTING {
+            return false;
+        }
+
+        // Swap the found pair of elements. This puts them in correct order.
+        v.swap(i - 1, i);
+
+        // Shift the smaller element to the left.
+        shift_tail(&mut v[..i], is_less);
+        // Shift the greater element to the right.
+        shift_head(&mut v[i..], is_less);
+    }
+
+    // Didn't manage to sort the slice in the limited number of steps.
+    false
+}
+
+/// Sorts a slice using insertion sort, which is *O*(*n*^2) worst-case.
+fn insertion_sort<T, F>(v: &mut [T], is_less: &F)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    for i in 1..v.len() {
+        shift_tail(&mut v[..i + 1], is_less);
+    }
+}
+
+/// Sorts `v` using heapsort, which guarantees *O*(*n* \* log(*n*)) worst-case.
+#[cold]
+fn heapsort<T, F>(v: &mut [T], is_less: &F)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    // This binary heap respects the invariant `parent >= child`.
+    let sift_down = |v: &mut [T], mut node| {
+        loop {
+            // Children of `node`.
+            let mut child = 2 * node + 1;
+            if child >= v.len() {
+                break;
+            }
+
+            // Choose the greater child.
+            if child + 1 < v.len() && is_less(&v[child], &v[child + 1]) {
+                child += 1;
+            }
+
+            // Stop if the invariant holds at `node`.
+            if !is_less(&v[node], &v[child]) {
+                break;
+            }
+
+            // Swap `node` with the greater child, move one step down, and continue sifting.
+            v.swap(node, child);
+            node = child;
+        }
+    };
+
+    // Build the heap in linear time.
+    for i in (0..v.len() / 2).rev() {
+        sift_down(v, i);
+    }
+
+    // Pop maximal elements from the heap.
+    for i in (1..v.len()).rev() {
+        v.swap(0, i);
+        sift_down(&mut v[..i], 0);
+    }
+}
+
+/// Partitions `v` into elements smaller than `pivot`, followed by elements greater than or equal
+/// to `pivot`.
+///
+/// Returns the number of elements smaller than `pivot`.
+///
+/// Partitioning is performed block-by-block in order to minimize the cost of branching operations.
+/// This idea is presented in the [BlockQuicksort][pdf] paper.
+///
+/// [pdf]: https://drops.dagstuhl.de/opus/volltexte/2016/6389/pdf/LIPIcs-ESA-2016-38.pdf
+fn partition_in_blocks<T, F>(v: &mut [T], pivot: &T, is_less: &F) -> usize
+where
+    F: Fn(&T, &T) -> bool,
+{
+    // Number of elements in a typical block.
+    const BLOCK: usize = 128;
+
+    // The partitioning algorithm repeats the following steps until completion:
+    //
+    // 1. Trace a block from the left side to identify elements greater than or equal to the pivot.
+    // 2. Trace a block from the right side to identify elements smaller than the pivot.
+    // 3. Exchange the identified elements between the left and right side.
+    //
+    // We keep the following variables for a block of elements:
+    //
+    // 1. `block` - Number of elements in the block.
+    // 2. `start` - Start pointer into the `offsets` array.
+    // 3. `end` - End pointer into the `offsets` array.
+    // 4. `offsets - Indices of out-of-order elements within the block.
+
+    // The current block on the left side (from `l` to `l.add(block_l)`).
+    let mut l = v.as_mut_ptr();
+    let mut block_l = BLOCK;
+    let mut start_l = ptr::null_mut();
+    let mut end_l = ptr::null_mut();
+    let mut offsets_l = [MaybeUninit::<u8>::uninit(); BLOCK];
+
+    // The current block on the right side (from `r.sub(block_r)` to `r`).
+    // SAFETY: The documentation for .add() specifically mention that `vec.as_ptr().add(vec.len())` is always safe`
+    let mut r = unsafe { l.add(v.len()) };
+    let mut block_r = BLOCK;
+    let mut start_r = ptr::null_mut();
+    let mut end_r = ptr::null_mut();
+    let mut offsets_r = [MaybeUninit::<u8>::uninit(); BLOCK];
+
+    // FIXME: When we get VLAs, try creating one array of length `min(v.len(), 2 * BLOCK)` rather
+    // than two fixed-size arrays of length `BLOCK`. VLAs might be more cache-efficient.
+
+    // Returns the number of elements between pointers `l` (inclusive) and `r` (exclusive).
+    fn width<T>(l: *mut T, r: *mut T) -> usize {
+        assert!(mem::size_of::<T>() > 0);
+        // FIXME: this should *likely* use `offset_from`, but more
+        // investigation is needed (including running tests in miri).
+        // TODO unstable: (r.addr() - l.addr()) / mem::size_of::<T>()
+        (r as usize - l as usize) / mem::size_of::<T>()
+    }
+
+    loop {
+        // We are done with partitioning block-by-block when `l` and `r` get very close. Then we do
+        // some patch-up work in order to partition the remaining elements in between.
+        let is_done = width(l, r) <= 2 * BLOCK;
+
+        if is_done {
+            // Number of remaining elements (still not compared to the pivot).
+            let mut rem = width(l, r);
+            if start_l < end_l || start_r < end_r {
+                rem -= BLOCK;
+            }
+
+            // Adjust block sizes so that the left and right block don't overlap, but get perfectly
+            // aligned to cover the whole remaining gap.
+            if start_l < end_l {
+                block_r = rem;
+            } else if start_r < end_r {
+                block_l = rem;
+            } else {
+                // There were the same number of elements to switch on both blocks during the last
+                // iteration, so there are no remaining elements on either block. Cover the remaining
+                // items with roughly equally-sized blocks.
+                block_l = rem / 2;
+                block_r = rem - block_l;
+            }
+            debug_assert!(block_l <= BLOCK && block_r <= BLOCK);
+            debug_assert!(width(l, r) == block_l + block_r);
+        }
+
+        if start_l == end_l {
+            // Trace `block_l` elements from the left side.
+            // TODO unstable: start_l = MaybeUninit::slice_as_mut_ptr(&mut offsets_l);
+            start_l = offsets_l.as_mut_ptr() as *mut u8;
+            end_l = start_l;
+            let mut elem = l;
+
+            for i in 0..block_l {
+                // SAFETY: The unsafety operations below involve the usage of the `offset`.
+                //         According to the conditions required by the function, we satisfy them because:
+                //         1. `offsets_l` is stack-allocated, and thus considered separate allocated object.
+                //         2. The function `is_less` returns a `bool`.
+                //            Casting a `bool` will never overflow `isize`.
+                //         3. We have guaranteed that `block_l` will be `<= BLOCK`.
+                //            Plus, `end_l` was initially set to the begin pointer of `offsets_` which was declared on the stack.
+                //            Thus, we know that even in the worst case (all invocations of `is_less` returns false) we will only be at most 1 byte pass the end.
+                //        Another unsafety operation here is dereferencing `elem`.
+                //        However, `elem` was initially the begin pointer to the slice which is always valid.
+                unsafe {
+                    // Branchless comparison.
+                    *end_l = i as u8;
+                    end_l = end_l.offset(!is_less(&*elem, pivot) as isize);
+                    elem = elem.offset(1);
+                }
+            }
+        }
+
+        if start_r == end_r {
+            // Trace `block_r` elements from the right side.
+            // TODO unstable: start_r = MaybeUninit::slice_as_mut_ptr(&mut offsets_r);
+            start_r = offsets_r.as_mut_ptr() as *mut u8;
+            end_r = start_r;
+            let mut elem = r;
+
+            for i in 0..block_r {
+                // SAFETY: The unsafety operations below involve the usage of the `offset`.
+                //         According to the conditions required by the function, we satisfy them because:
+                //         1. `offsets_r` is stack-allocated, and thus considered separate allocated object.
+                //         2. The function `is_less` returns a `bool`.
+                //            Casting a `bool` will never overflow `isize`.
+                //         3. We have guaranteed that `block_r` will be `<= BLOCK`.
+                //            Plus, `end_r` was initially set to the begin pointer of `offsets_` which was declared on the stack.
+                //            Thus, we know that even in the worst case (all invocations of `is_less` returns true) we will only be at most 1 byte pass the end.
+                //        Another unsafety operation here is dereferencing `elem`.
+                //        However, `elem` was initially `1 * sizeof(T)` past the end and we decrement it by `1 * sizeof(T)` before accessing it.
+                //        Plus, `block_r` was asserted to be less than `BLOCK` and `elem` will therefore at most be pointing to the beginning of the slice.
+                unsafe {
+                    // Branchless comparison.
+                    elem = elem.offset(-1);
+                    *end_r = i as u8;
+                    end_r = end_r.offset(is_less(&*elem, pivot) as isize);
+                }
+            }
+        }
+
+        // Number of out-of-order elements to swap between the left and right side.
+        let count = Ord::min(width(start_l, end_l), width(start_r, end_r));
+
+        if count > 0 {
+            macro_rules! left {
+                () => {
+                    l.offset(*start_l as isize)
+                };
+            }
+            macro_rules! right {
+                () => {
+                    r.offset(-(*start_r as isize) - 1)
+                };
+            }
+
+            // Instead of swapping one pair at the time, it is more efficient to perform a cyclic
+            // permutation. This is not strictly equivalent to swapping, but produces a similar
+            // result using fewer memory operations.
+
+            // SAFETY: The use of `ptr::read` is valid because there is at least one element in
+            // both `offsets_l` and `offsets_r`, so `left!` is a valid pointer to read from.
+            //
+            // The uses of `left!` involve calls to `offset` on `l`, which points to the
+            // beginning of `v`. All the offsets pointed-to by `start_l` are at most `block_l`, so
+            // these `offset` calls are safe as all reads are within the block. The same argument
+            // applies for the uses of `right!`.
+            //
+            // The calls to `start_l.offset` are valid because there are at most `count-1` of them,
+            // plus the final one at the end of the unsafe block, where `count` is the minimum number
+            // of collected offsets in `offsets_l` and `offsets_r`, so there is no risk of there not
+            // being enough elements. The same reasoning applies to the calls to `start_r.offset`.
+            //
+            // The calls to `copy_nonoverlapping` are safe because `left!` and `right!` are guaranteed
+            // not to overlap, and are valid because of the reasoning above.
+            unsafe {
+                let tmp = ptr::read(left!());
+                ptr::copy_nonoverlapping(right!(), left!(), 1);
+
+                for _ in 1..count {
+                    start_l = start_l.offset(1);
+                    ptr::copy_nonoverlapping(left!(), right!(), 1);
+                    start_r = start_r.offset(1);
+                    ptr::copy_nonoverlapping(right!(), left!(), 1);
+                }
+
+                ptr::copy_nonoverlapping(&tmp, right!(), 1);
+                mem::forget(tmp);
+                start_l = start_l.offset(1);
+                start_r = start_r.offset(1);
+            }
+        }
+
+        if start_l == end_l {
+            // All out-of-order elements in the left block were moved. Move to the next block.
+
+            // block-width-guarantee
+            // SAFETY: if `!is_done` then the slice width is guaranteed to be at least `2*BLOCK` wide. There
+            // are at most `BLOCK` elements in `offsets_l` because of its size, so the `offset` operation is
+            // safe. Otherwise, the debug assertions in the `is_done` case guarantee that
+            // `width(l, r) == block_l + block_r`, namely, that the block sizes have been adjusted to account
+            // for the smaller number of remaining elements.
+            l = unsafe { l.add(block_l) };
+        }
+
+        if start_r == end_r {
+            // All out-of-order elements in the right block were moved. Move to the previous block.
+
+            // SAFETY: Same argument as [block-width-guarantee]. Either this is a full block `2*BLOCK`-wide,
+            // or `block_r` has been adjusted for the last handful of elements.
+            r = unsafe { r.offset(-(block_r as isize)) };
+        }
+
+        if is_done {
+            break;
+        }
+    }
+
+    // All that remains now is at most one block (either the left or the right) with out-of-order
+    // elements that need to be moved. Such remaining elements can be simply shifted to the end
+    // within their block.
+
+    if start_l < end_l {
+        // The left block remains.
+        // Move its remaining out-of-order elements to the far right.
+        debug_assert_eq!(width(l, r), block_l);
+        while start_l < end_l {
+            // remaining-elements-safety
+            // SAFETY: while the loop condition holds there are still elements in `offsets_l`, so it
+            // is safe to point `end_l` to the previous element.
+            //
+            // The `ptr::swap` is safe if both its arguments are valid for reads and writes:
+            //  - Per the debug assert above, the distance between `l` and `r` is `block_l`
+            //    elements, so there can be at most `block_l` remaining offsets between `start_l`
+            //    and `end_l`. This means `r` will be moved at most `block_l` steps back, which
+            //    makes the `r.offset` calls valid (at that point `l == r`).
+            //  - `offsets_l` contains valid offsets into `v` collected during the partitioning of
+            //    the last block, so the `l.offset` calls are valid.
+            unsafe {
+                end_l = end_l.offset(-1);
+                ptr::swap(l.offset(*end_l as isize), r.offset(-1));
+                r = r.offset(-1);
+            }
+        }
+        width(v.as_mut_ptr(), r)
+    } else if start_r < end_r {
+        // The right block remains.
+        // Move its remaining out-of-order elements to the far left.
+        debug_assert_eq!(width(l, r), block_r);
+        while start_r < end_r {
+            // SAFETY: See the reasoning in [remaining-elements-safety].
+            unsafe {
+                end_r = end_r.offset(-1);
+                ptr::swap(l, r.offset(-(*end_r as isize) - 1));
+                l = l.offset(1);
+            }
+        }
+        width(v.as_mut_ptr(), l)
+    } else {
+        // Nothing else to do, we're done.
+        width(v.as_mut_ptr(), l)
+    }
+}
+
+/// Partitions `v` into elements smaller than `v[pivot]`, followed by elements greater than or
+/// equal to `v[pivot]`.
+///
+/// Returns a tuple of:
+///
+/// 1. Number of elements smaller than `v[pivot]`.
+/// 2. True if `v` was already partitioned.
+fn partition<T, F>(v: &mut [T], pivot: usize, is_less: &F) -> (usize, bool)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    let (mid, was_partitioned) = {
+        // Place the pivot at the beginning of slice.
+        v.swap(0, pivot);
+        let (pivot, v) = v.split_at_mut(1);
+        let pivot = &mut pivot[0];
+
+        // Read the pivot into a stack-allocated variable for efficiency. If a following comparison
+        // operation panics, the pivot will be automatically written back into the slice.
+
+        // SAFETY: `pivot` is a reference to the first element of `v`, so `ptr::read` is safe.
+        let tmp = mem::ManuallyDrop::new(unsafe { ptr::read(pivot) });
+        let _pivot_guard = unsafe { CopyOnDrop::new(&*tmp, pivot) };
+        let pivot = &*tmp;
+
+        // Find the first pair of out-of-order elements.
+        let mut l = 0;
+        let mut r = v.len();
+
+        // SAFETY: The unsafety below involves indexing an array.
+        // For the first one: We already do the bounds checking here with `l < r`.
+        // For the second one: We initially have `l == 0` and `r == v.len()` and we checked that `l < r` at every indexing operation.
+        //                     From here we know that `r` must be at least `r == l` which was shown to be valid from the first one.
+        unsafe {
+            // Find the first element greater than or equal to the pivot.
+            while l < r && is_less(v.get_unchecked(l), pivot) {
+                l += 1;
+            }
+
+            // Find the last element smaller that the pivot.
+            while l < r && !is_less(v.get_unchecked(r - 1), pivot) {
+                r -= 1;
+            }
+        }
+
+        (
+            l + partition_in_blocks(&mut v[l..r], pivot, is_less),
+            l >= r,
+        )
+
+        // `_pivot_guard` goes out of scope and writes the pivot (which is a stack-allocated
+        // variable) back into the slice where it originally was. This step is critical in ensuring
+        // safety!
+    };
+
+    // Place the pivot between the two partitions.
+    v.swap(0, mid);
+
+    (mid, was_partitioned)
+}
+
+/// Partitions `v` into elements equal to `v[pivot]` followed by elements greater than `v[pivot]`.
+///
+/// Returns the number of elements equal to the pivot. It is assumed that `v` does not contain
+/// elements smaller than the pivot.
+fn partition_equal<T, F>(v: &mut [T], pivot: usize, is_less: &F) -> usize
+where
+    F: Fn(&T, &T) -> bool,
+{
+    // Place the pivot at the beginning of slice.
+    v.swap(0, pivot);
+    let (pivot, v) = v.split_at_mut(1);
+    let pivot = &mut pivot[0];
+
+    // Read the pivot into a stack-allocated variable for efficiency. If a following comparison
+    // operation panics, the pivot will be automatically written back into the slice.
+    // SAFETY: The pointer here is valid because it is obtained from a reference to a slice.
+    let tmp = mem::ManuallyDrop::new(unsafe { ptr::read(pivot) });
+    let _pivot_guard = unsafe { CopyOnDrop::new(&*tmp, pivot) };
+    let pivot = &*tmp;
+
+    // Now partition the slice.
+    let mut l = 0;
+    let mut r = v.len();
+    loop {
+        // SAFETY: The unsafety below involves indexing an array.
+        // For the first one: We already do the bounds checking here with `l < r`.
+        // For the second one: We initially have `l == 0` and `r == v.len()` and we checked that `l < r` at every indexing operation.
+        //                     From here we know that `r` must be at least `r == l` which was shown to be valid from the first one.
+        unsafe {
+            // Find the first element greater than the pivot.
+            while l < r && !is_less(pivot, v.get_unchecked(l)) {
+                l += 1;
+            }
+
+            // Find the last element equal to the pivot.
+            while l < r && is_less(pivot, v.get_unchecked(r - 1)) {
+                r -= 1;
+            }
+
+            // Are we done?
+            if l >= r {
+                break;
+            }
+
+            // Swap the found pair of out-of-order elements.
+            r -= 1;
+            let ptr = v.as_mut_ptr();
+            ptr::swap(ptr.add(l), ptr.add(r));
+            l += 1;
+        }
+    }
+
+    // We found `l` elements equal to the pivot. Add 1 to account for the pivot itself.
+    l + 1
+
+    // `_pivot_guard` goes out of scope and writes the pivot (which is a stack-allocated variable)
+    // back into the slice where it originally was. This step is critical in ensuring safety!
+}
+
+/// Scatters some elements around in an attempt to break patterns that might cause imbalanced
+/// partitions in quicksort.
+#[cold]
+fn break_patterns<T>(v: &mut [T]) {
+    let len = v.len();
+    if len >= 8 {
+        // Pseudorandom number generator from the "Xorshift RNGs" paper by George Marsaglia.
+        let mut random = len as u32;
+        let mut gen_u32 = || {
+            random ^= random << 13;
+            random ^= random >> 17;
+            random ^= random << 5;
+            random
+        };
+        let mut gen_usize = || {
+            if usize::BITS <= 32 {
+                gen_u32() as usize
+            } else {
+                (((gen_u32() as u64) << 32) | (gen_u32() as u64)) as usize
+            }
+        };
+
+        // Take random numbers modulo this number.
+        // The number fits into `usize` because `len` is not greater than `isize::MAX`.
+        let modulus = len.next_power_of_two();
+
+        // Some pivot candidates will be in the nearby of this index. Let's randomize them.
+        let pos = len / 4 * 2;
+
+        for i in 0..3 {
+            // Generate a random number modulo `len`. However, in order to avoid costly operations
+            // we first take it modulo a power of two, and then decrease by `len` until it fits
+            // into the range `[0, len - 1]`.
+            let mut other = gen_usize() & (modulus - 1);
+
+            // `other` is guaranteed to be less than `2 * len`.
+            if other >= len {
+                other -= len;
+            }
+
+            v.swap(pos - 1 + i, other);
+        }
+    }
+}
+
+/// Chooses a pivot in `v` and returns the index and `true` if the slice is likely already sorted.
+///
+/// Elements in `v` might be reordered in the process.
+fn choose_pivot<T, F>(v: &mut [T], is_less: &F) -> (usize, bool)
+where
+    F: Fn(&T, &T) -> bool,
+{
+    // Minimum length to choose the median-of-medians method.
+    // Shorter slices use the simple median-of-three method.
+    const SHORTEST_MEDIAN_OF_MEDIANS: usize = 50;
+    // Maximum number of swaps that can be performed in this function.
+    const MAX_SWAPS: usize = 4 * 3;
+
+    let len = v.len();
+
+    // Three indices near which we are going to choose a pivot.
+    #[allow(clippy::identity_op)]
+    let mut a = len / 4 * 1;
+    let mut b = len / 4 * 2;
+    let mut c = len / 4 * 3;
+
+    // Counts the total number of swaps we are about to perform while sorting indices.
+    let mut swaps = 0;
+
+    if len >= 8 {
+        // Swaps indices so that `v[a] <= v[b]`.
+        // SAFETY: `len >= 8` so there are at least two elements in the neighborhoods of
+        // `a`, `b` and `c`. This means the three calls to `sort_adjacent` result in
+        // corresponding calls to `sort3` with valid 3-item neighborhoods around each
+        // pointer, which in turn means the calls to `sort2` are done with valid
+        // references. Thus the `v.get_unchecked` calls are safe, as is the `ptr::swap`
+        // call.
+        let mut sort2 = |a: &mut usize, b: &mut usize| unsafe {
+            if is_less(v.get_unchecked(*b), v.get_unchecked(*a)) {
+                ptr::swap(a, b);
+                swaps += 1;
+            }
+        };
+
+        // Swaps indices so that `v[a] <= v[b] <= v[c]`.
+        let mut sort3 = |a: &mut usize, b: &mut usize, c: &mut usize| {
+            sort2(a, b);
+            sort2(b, c);
+            sort2(a, b);
+        };
+
+        if len >= SHORTEST_MEDIAN_OF_MEDIANS {
+            // Finds the median of `v[a - 1], v[a], v[a + 1]` and stores the index into `a`.
+            let mut sort_adjacent = |a: &mut usize| {
+                let tmp = *a;
+                sort3(&mut (tmp - 1), a, &mut (tmp + 1));
+            };
+
+            // Find medians in the neighborhoods of `a`, `b`, and `c`.
+            sort_adjacent(&mut a);
+            sort_adjacent(&mut b);
+            sort_adjacent(&mut c);
+        }
+
+        // Find the median among `a`, `b`, and `c`.
+        sort3(&mut a, &mut b, &mut c);
+    }
+
+    if swaps < MAX_SWAPS {
+        (b, swaps == 0)
+    } else {
+        // The maximum number of swaps was performed. Chances are the slice is descending or mostly
+        // descending, so reversing will probably help sort it faster.
+        v.reverse();
+        (len - 1 - b, true)
+    }
+}
+
+/// Sorts `v` recursively.
+///
+/// If the slice had a predecessor in the original array, it is specified as `pred`.
+///
+/// `limit` is the number of allowed imbalanced partitions before switching to `heapsort`. If zero,
+/// this function will immediately switch to heapsort.
+fn recurse<'a, T, F>(mut v: &'a mut [T], is_less: &F, mut pred: Option<&'a mut T>, mut limit: u32)
+where
+    T: Send,
+    F: Fn(&T, &T) -> bool + Sync,
+{
+    // Slices of up to this length get sorted using insertion sort.
+    const MAX_INSERTION: usize = 20;
+    // If both partitions are up to this length, we continue sequentially. This number is as small
+    // as possible but so that the overhead of Rayon's task scheduling is still negligible.
+    const MAX_SEQUENTIAL: usize = 2000;
+
+    // True if the last partitioning was reasonably balanced.
+    let mut was_balanced = true;
+    // True if the last partitioning didn't shuffle elements (the slice was already partitioned).
+    let mut was_partitioned = true;
+
+    loop {
+        let len = v.len();
+
+        // Very short slices get sorted using insertion sort.
+        if len <= MAX_INSERTION {
+            insertion_sort(v, is_less);
+            return;
+        }
+
+        // If too many bad pivot choices were made, simply fall back to heapsort in order to
+        // guarantee `O(n * log(n))` worst-case.
+        if limit == 0 {
+            heapsort(v, is_less);
+            return;
+        }
+
+        // If the last partitioning was imbalanced, try breaking patterns in the slice by shuffling
+        // some elements around. Hopefully we'll choose a better pivot this time.
+        if !was_balanced {
+            break_patterns(v);
+            limit -= 1;
+        }
+
+        // Choose a pivot and try guessing whether the slice is already sorted.
+        let (pivot, likely_sorted) = choose_pivot(v, is_less);
+
+        // If the last partitioning was decently balanced and didn't shuffle elements, and if pivot
+        // selection predicts the slice is likely already sorted...
+        if was_balanced && was_partitioned && likely_sorted {
+            // Try identifying several out-of-order elements and shifting them to correct
+            // positions. If the slice ends up being completely sorted, we're done.
+            if partial_insertion_sort(v, is_less) {
+                return;
+            }
+        }
+
+        // If the chosen pivot is equal to the predecessor, then it's the smallest element in the
+        // slice. Partition the slice into elements equal to and elements greater than the pivot.
+        // This case is usually hit when the slice contains many duplicate elements.
+        if let Some(ref p) = pred {
+            if !is_less(p, &v[pivot]) {
+                let mid = partition_equal(v, pivot, is_less);
+
+                // Continue sorting elements greater than the pivot.
+                v = &mut v[mid..];
+                continue;
+            }
+        }
+
+        // Partition the slice.
+        let (mid, was_p) = partition(v, pivot, is_less);
+        was_balanced = Ord::min(mid, len - mid) >= len / 8;
+        was_partitioned = was_p;
+
+        // Split the slice into `left`, `pivot`, and `right`.
+        let (left, right) = v.split_at_mut(mid);
+        let (pivot, right) = right.split_at_mut(1);
+        let pivot = &mut pivot[0];
+
+        if Ord::max(left.len(), right.len()) <= MAX_SEQUENTIAL {
+            // Recurse into the shorter side only in order to minimize the total number of recursive
+            // calls and consume less stack space. Then just continue with the longer side (this is
+            // akin to tail recursion).
+            if left.len() < right.len() {
+                recurse(left, is_less, pred, limit);
+                v = right;
+                pred = Some(pivot);
+            } else {
+                recurse(right, is_less, Some(pivot), limit);
+                v = left;
+            }
+        } else {
+            // Sort the left and right half in parallel.
+            rayon_core::join(
+                || recurse(left, is_less, pred, limit),
+                || recurse(right, is_less, Some(pivot), limit),
+            );
+            break;
+        }
+    }
+}
+
+/// Sorts `v` using pattern-defeating quicksort in parallel.
+///
+/// The algorithm is unstable, in-place, and *O*(*n* \* log(*n*)) worst-case.
+pub(super) fn par_quicksort<T, F>(v: &mut [T], is_less: F)
+where
+    T: Send,
+    F: Fn(&T, &T) -> bool + Sync,
+{
+    // Sorting has no meaningful behavior on zero-sized types.
+    if mem::size_of::<T>() == 0 {
+        return;
+    }
+
+    // Limit the number of imbalanced partitions to `floor(log2(len)) + 1`.
+    let limit = usize::BITS - v.len().leading_zeros();
+
+    recurse(v, &is_less, None, limit);
+}
+
+#[cfg(test)]
+mod tests {
+    use super::heapsort;
+    use rand::distributions::Uniform;
+    use rand::{thread_rng, Rng};
+
+    #[test]
+    fn test_heapsort() {
+        let rng = &mut thread_rng();
+
+        for len in (0..25).chain(500..501) {
+            for &modulus in &[5, 10, 100] {
+                let dist = Uniform::new(0, modulus);
+                for _ in 0..100 {
+                    let v: Vec<i32> = rng.sample_iter(&dist).take(len).collect();
+
+                    // Test heapsort using `<` operator.
+                    let mut tmp = v.clone();
+                    heapsort(&mut tmp, &|a, b| a < b);
+                    assert!(tmp.windows(2).all(|w| w[0] <= w[1]));
+
+                    // Test heapsort using `>` operator.
+                    let mut tmp = v.clone();
+                    heapsort(&mut tmp, &|a, b| a > b);
+                    assert!(tmp.windows(2).all(|w| w[0] >= w[1]));
+                }
+            }
+        }
+
+        // Sort using a completely random comparison function.
+        // This will reorder the elements *somehow*, but won't panic.
+        let mut v: Vec<_> = (0..100).collect();
+        heapsort(&mut v, &|_, _| thread_rng().gen());
+        heapsort(&mut v, &|a, b| a < b);
+
+        for (i, &entry) in v.iter().enumerate() {
+            assert_eq!(entry, i);
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/slice/rchunks.rs.html b/src/rayon/slice/rchunks.rs.html new file mode 100644 index 0000000000..5828e875a3 --- /dev/null +++ b/src/rayon/slice/rchunks.rs.html @@ -0,0 +1,775 @@ +rchunks.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+
use crate::iter::plumbing::*;
+use crate::iter::*;
+use crate::math::div_round_up;
+
+/// Parallel iterator over immutable non-overlapping chunks of a slice, starting at the end.
+#[derive(Debug)]
+pub struct RChunks<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: Sync> RChunks<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data [T]) -> Self {
+        Self { chunk_size, slice }
+    }
+}
+
+impl<'data, T: Sync> Clone for RChunks<'data, T> {
+    fn clone(&self) -> Self {
+        RChunks { ..*self }
+    }
+}
+
+impl<'data, T: Sync + 'data> ParallelIterator for RChunks<'data, T> {
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Sync + 'data> IndexedParallelIterator for RChunks<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        div_round_up(self.slice.len(), self.chunk_size)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(RChunksProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct RChunksProducer<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: 'data + Sync> Producer for RChunksProducer<'data, T> {
+    type Item = &'data [T];
+    type IntoIter = ::std::slice::RChunks<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.rchunks(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = self.slice.len().saturating_sub(index * self.chunk_size);
+        let (left, right) = self.slice.split_at(elem_index);
+        (
+            RChunksProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+            RChunksProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+        )
+    }
+}
+
+/// Parallel iterator over immutable non-overlapping chunks of a slice, starting at the end.
+#[derive(Debug)]
+pub struct RChunksExact<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+    rem: &'data [T],
+}
+
+impl<'data, T: Sync> RChunksExact<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data [T]) -> Self {
+        let rem_len = slice.len() % chunk_size;
+        let (rem, slice) = slice.split_at(rem_len);
+        Self {
+            chunk_size,
+            slice,
+            rem,
+        }
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements.
+    pub fn remainder(&self) -> &'data [T] {
+        self.rem
+    }
+}
+
+impl<'data, T: Sync> Clone for RChunksExact<'data, T> {
+    fn clone(&self) -> Self {
+        RChunksExact { ..*self }
+    }
+}
+
+impl<'data, T: Sync + 'data> ParallelIterator for RChunksExact<'data, T> {
+    type Item = &'data [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Sync + 'data> IndexedParallelIterator for RChunksExact<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.slice.len() / self.chunk_size
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(RChunksExactProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct RChunksExactProducer<'data, T: Sync> {
+    chunk_size: usize,
+    slice: &'data [T],
+}
+
+impl<'data, T: 'data + Sync> Producer for RChunksExactProducer<'data, T> {
+    type Item = &'data [T];
+    type IntoIter = ::std::slice::RChunksExact<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.rchunks_exact(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = self.slice.len() - index * self.chunk_size;
+        let (left, right) = self.slice.split_at(elem_index);
+        (
+            RChunksExactProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+            RChunksExactProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+        )
+    }
+}
+
+/// Parallel iterator over mutable non-overlapping chunks of a slice, starting at the end.
+#[derive(Debug)]
+pub struct RChunksMut<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+}
+
+impl<'data, T: Send> RChunksMut<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data mut [T]) -> Self {
+        Self { chunk_size, slice }
+    }
+}
+
+impl<'data, T: Send + 'data> ParallelIterator for RChunksMut<'data, T> {
+    type Item = &'data mut [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Send + 'data> IndexedParallelIterator for RChunksMut<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        div_round_up(self.slice.len(), self.chunk_size)
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(RChunksMutProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct RChunksMutProducer<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+}
+
+impl<'data, T: 'data + Send> Producer for RChunksMutProducer<'data, T> {
+    type Item = &'data mut [T];
+    type IntoIter = ::std::slice::RChunksMut<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.rchunks_mut(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = self.slice.len().saturating_sub(index * self.chunk_size);
+        let (left, right) = self.slice.split_at_mut(elem_index);
+        (
+            RChunksMutProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+            RChunksMutProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+        )
+    }
+}
+
+/// Parallel iterator over mutable non-overlapping chunks of a slice, starting at the end.
+#[derive(Debug)]
+pub struct RChunksExactMut<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+    rem: &'data mut [T],
+}
+
+impl<'data, T: Send> RChunksExactMut<'data, T> {
+    pub(super) fn new(chunk_size: usize, slice: &'data mut [T]) -> Self {
+        let rem_len = slice.len() % chunk_size;
+        let (rem, slice) = slice.split_at_mut(rem_len);
+        Self {
+            chunk_size,
+            slice,
+            rem,
+        }
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements.
+    ///
+    /// Note that this has to consume `self` to return the original lifetime of
+    /// the data, which prevents this from actually being used as a parallel
+    /// iterator since that also consumes. This method is provided for parity
+    /// with `std::iter::RChunksExactMut`, but consider calling `remainder()` or
+    /// `take_remainder()` as alternatives.
+    pub fn into_remainder(self) -> &'data mut [T] {
+        self.rem
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements.
+    ///
+    /// Consider `take_remainder()` if you need access to the data with its
+    /// original lifetime, rather than borrowing through `&mut self` here.
+    pub fn remainder(&mut self) -> &mut [T] {
+        self.rem
+    }
+
+    /// Return the remainder of the original slice that is not going to be
+    /// returned by the iterator. The returned slice has at most `chunk_size-1`
+    /// elements. Subsequent calls will return an empty slice.
+    pub fn take_remainder(&mut self) -> &'data mut [T] {
+        std::mem::take(&mut self.rem)
+    }
+}
+
+impl<'data, T: Send + 'data> ParallelIterator for RChunksExactMut<'data, T> {
+    type Item = &'data mut [T];
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Send + 'data> IndexedParallelIterator for RChunksExactMut<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.slice.len() / self.chunk_size
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        callback.callback(RChunksExactMutProducer {
+            chunk_size: self.chunk_size,
+            slice: self.slice,
+        })
+    }
+}
+
+struct RChunksExactMutProducer<'data, T: Send> {
+    chunk_size: usize,
+    slice: &'data mut [T],
+}
+
+impl<'data, T: 'data + Send> Producer for RChunksExactMutProducer<'data, T> {
+    type Item = &'data mut [T];
+    type IntoIter = ::std::slice::RChunksExactMut<'data, T>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.slice.rchunks_exact_mut(self.chunk_size)
+    }
+
+    fn split_at(self, index: usize) -> (Self, Self) {
+        let elem_index = self.slice.len() - index * self.chunk_size;
+        let (left, right) = self.slice.split_at_mut(elem_index);
+        (
+            RChunksExactMutProducer {
+                chunk_size: self.chunk_size,
+                slice: right,
+            },
+            RChunksExactMutProducer {
+                chunk_size: self.chunk_size,
+                slice: left,
+            },
+        )
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/split_producer.rs.html b/src/rayon/split_producer.rs.html new file mode 100644 index 0000000000..b6f6220d4f --- /dev/null +++ b/src/rayon/split_producer.rs.html @@ -0,0 +1,307 @@ +split_producer.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+
//! Common splitter for strings and slices
+//!
+//! This module is private, so these items are effectively `pub(super)`
+
+use crate::iter::plumbing::{Folder, UnindexedProducer};
+
+/// Common producer for splitting on a predicate.
+pub(super) struct SplitProducer<'p, P, V, const INCL: bool = false> {
+    data: V,
+    separator: &'p P,
+
+    /// Marks the endpoint beyond which we've already found no separators.
+    tail: usize,
+}
+
+pub(super) type SplitInclusiveProducer<'p, P, V> = SplitProducer<'p, P, V, true>;
+
+/// Helper trait so `&str`, `&[T]`, and `&mut [T]` can share `SplitProducer`.
+pub(super) trait Fissile<P>: Sized {
+    fn length(&self) -> usize;
+    fn midpoint(&self, end: usize) -> usize;
+    fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize>;
+    fn rfind(&self, separator: &P, end: usize) -> Option<usize>;
+    fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self);
+    fn fold_splits<F, const INCL: bool>(self, separator: &P, folder: F, skip_last: bool) -> F
+    where
+        F: Folder<Self>,
+        Self: Send;
+}
+
+impl<'p, P, V> SplitProducer<'p, P, V>
+where
+    V: Fissile<P> + Send,
+{
+    pub(super) fn new(data: V, separator: &'p P) -> Self {
+        SplitProducer {
+            tail: data.length(),
+            data,
+            separator,
+        }
+    }
+}
+
+impl<'p, P, V> SplitInclusiveProducer<'p, P, V>
+where
+    V: Fissile<P> + Send,
+{
+    pub(super) fn new_incl(data: V, separator: &'p P) -> Self {
+        SplitProducer {
+            tail: data.length(),
+            data,
+            separator,
+        }
+    }
+}
+
+impl<'p, P, V, const INCL: bool> SplitProducer<'p, P, V, INCL>
+where
+    V: Fissile<P> + Send,
+{
+    /// Common `fold_with` implementation, integrating `SplitTerminator`'s
+    /// need to sometimes skip its final empty item.
+    pub(super) fn fold_with<F>(self, folder: F, skip_last: bool) -> F
+    where
+        F: Folder<V>,
+    {
+        let SplitProducer {
+            data,
+            separator,
+            tail,
+        } = self;
+
+        if tail == data.length() {
+            // No tail section, so just let `fold_splits` handle it.
+            data.fold_splits::<F, INCL>(separator, folder, skip_last)
+        } else if let Some(index) = data.rfind(separator, tail) {
+            // We found the last separator to complete the tail, so
+            // end with that slice after `fold_splits` finds the rest.
+            let (left, right) = data.split_once::<INCL>(index);
+            let folder = left.fold_splits::<F, INCL>(separator, folder, false);
+            if skip_last || folder.full() {
+                folder
+            } else {
+                folder.consume(right)
+            }
+        } else {
+            // We know there are no separators at all.  Return our whole data.
+            if skip_last {
+                folder
+            } else {
+                folder.consume(data)
+            }
+        }
+    }
+}
+
+impl<'p, P, V, const INCL: bool> UnindexedProducer for SplitProducer<'p, P, V, INCL>
+where
+    V: Fissile<P> + Send,
+    P: Sync,
+{
+    type Item = V;
+
+    fn split(self) -> (Self, Option<Self>) {
+        // Look forward for the separator, and failing that look backward.
+        let mid = self.data.midpoint(self.tail);
+        let index = match self.data.find(self.separator, mid, self.tail) {
+            Some(i) => Some(mid + i),
+            None => self.data.rfind(self.separator, mid),
+        };
+
+        if let Some(index) = index {
+            let len = self.data.length();
+            let (left, right) = self.data.split_once::<INCL>(index);
+
+            let (left_tail, right_tail) = if index < mid {
+                // If we scanned backwards to find the separator, everything in
+                // the right side is exhausted, with no separators left to find.
+                (index, 0)
+            } else {
+                let right_index = len - right.length();
+                (mid, self.tail - right_index)
+            };
+
+            // Create the left split before the separator.
+            let left = SplitProducer {
+                data: left,
+                tail: left_tail,
+                ..self
+            };
+
+            // Create the right split following the separator.
+            let right = SplitProducer {
+                data: right,
+                tail: right_tail,
+                ..self
+            };
+
+            (left, Some(right))
+        } else {
+            // The search is exhausted, no more separators...
+            (SplitProducer { tail: 0, ..self }, None)
+        }
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.fold_with(folder, false)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/str.rs.html b/src/rayon/str.rs.html new file mode 100644 index 0000000000..b2d9f2663c --- /dev/null +++ b/src/rayon/str.rs.html @@ -0,0 +1,2023 @@ +str.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+
//! Parallel iterator types for [strings][std::str]
+//!
+//! You will rarely need to interact with this module directly unless you need
+//! to name one of the iterator types.
+//!
+//! Note: [`ParallelString::par_split()`] and [`par_split_terminator()`]
+//! reference a `Pattern` trait which is not visible outside this crate.
+//! This trait is intentionally kept private, for use only by Rayon itself.
+//! It is implemented for `char`, `&[char]`, `[char; N]`, `&[char; N]`,
+//! and any function or closure `F: Fn(char) -> bool + Sync + Send`.
+//!
+//! [`ParallelString::par_split()`]: trait.ParallelString.html#method.par_split
+//! [`par_split_terminator()`]: trait.ParallelString.html#method.par_split_terminator
+//!
+//! [std::str]: https://doc.rust-lang.org/stable/std/str/
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use crate::split_producer::*;
+
+/// Test if a byte is the start of a UTF-8 character.
+/// (extracted from `str::is_char_boundary`)
+#[inline]
+fn is_char_boundary(b: u8) -> bool {
+    // This is bit magic equivalent to: b < 128 || b >= 192
+    (b as i8) >= -0x40
+}
+
+/// Find the index of a character boundary near the midpoint.
+#[inline]
+fn find_char_midpoint(chars: &str) -> usize {
+    let mid = chars.len() / 2;
+
+    // We want to split near the midpoint, but we need to find an actual
+    // character boundary.  So we look at the raw bytes, first scanning
+    // forward from the midpoint for a boundary, then trying backward.
+    let (left, right) = chars.as_bytes().split_at(mid);
+    match right.iter().copied().position(is_char_boundary) {
+        Some(i) => mid + i,
+        None => left
+            .iter()
+            .copied()
+            .rposition(is_char_boundary)
+            .unwrap_or(0),
+    }
+}
+
+/// Try to split a string near the midpoint.
+#[inline]
+fn split(chars: &str) -> Option<(&str, &str)> {
+    let index = find_char_midpoint(chars);
+    if index > 0 {
+        Some(chars.split_at(index))
+    } else {
+        None
+    }
+}
+
+/// Parallel extensions for strings.
+pub trait ParallelString {
+    /// Returns a plain string slice, which is used to implement the rest of
+    /// the parallel methods.
+    fn as_parallel_string(&self) -> &str;
+
+    /// Returns a parallel iterator over the characters of a string.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let max = "hello".par_chars().max_by_key(|c| *c as i32);
+    /// assert_eq!(Some('o'), max);
+    /// ```
+    fn par_chars(&self) -> Chars<'_> {
+        Chars {
+            chars: self.as_parallel_string(),
+        }
+    }
+
+    /// Returns a parallel iterator over the characters of a string, with their positions.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let min = "hello".par_char_indices().min_by_key(|&(_i, c)| c as i32);
+    /// assert_eq!(Some((1, 'e')), min);
+    /// ```
+    fn par_char_indices(&self) -> CharIndices<'_> {
+        CharIndices {
+            chars: self.as_parallel_string(),
+        }
+    }
+
+    /// Returns a parallel iterator over the bytes of a string.
+    ///
+    /// Note that multi-byte sequences (for code points greater than `U+007F`)
+    /// are produced as separate items, but will not be split across threads.
+    /// If you would prefer an indexed iterator without that guarantee, consider
+    /// `string.as_bytes().par_iter().copied()` instead.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let max = "hello".par_bytes().max();
+    /// assert_eq!(Some(b'o'), max);
+    /// ```
+    fn par_bytes(&self) -> Bytes<'_> {
+        Bytes {
+            chars: self.as_parallel_string(),
+        }
+    }
+
+    /// Returns a parallel iterator over a string encoded as UTF-16.
+    ///
+    /// Note that surrogate pairs (for code points greater than `U+FFFF`) are
+    /// produced as separate items, but will not be split across threads.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    ///
+    /// let max = "hello".par_encode_utf16().max();
+    /// assert_eq!(Some(b'o' as u16), max);
+    ///
+    /// let text = "Zażółć gęślą jaźń";
+    /// let utf8_len = text.len();
+    /// let utf16_len = text.par_encode_utf16().count();
+    /// assert!(utf16_len <= utf8_len);
+    /// ```
+    fn par_encode_utf16(&self) -> EncodeUtf16<'_> {
+        EncodeUtf16 {
+            chars: self.as_parallel_string(),
+        }
+    }
+
+    /// Returns a parallel iterator over substrings separated by a
+    /// given character or predicate, similar to `str::split`.
+    ///
+    /// Note: the `Pattern` trait is private, for use only by Rayon itself.
+    /// It is implemented for `char`, `&[char]`, `[char; N]`, `&[char; N]`,
+    /// and any function or closure `F: Fn(char) -> bool + Sync + Send`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let total = "1, 2, buckle, 3, 4, door"
+    ///    .par_split(',')
+    ///    .filter_map(|s| s.trim().parse::<i32>().ok())
+    ///    .sum();
+    /// assert_eq!(10, total);
+    /// ```
+    fn par_split<P: Pattern>(&self, separator: P) -> Split<'_, P> {
+        Split::new(self.as_parallel_string(), separator)
+    }
+
+    /// Returns a parallel iterator over substrings separated by a
+    /// given character or predicate, keeping the matched part as a terminator
+    /// of the substring similar to `str::split_inclusive`.
+    ///
+    /// Note: the `Pattern` trait is private, for use only by Rayon itself.
+    /// It is implemented for `char`, `&[char]`, `[char; N]`, `&[char; N]`,
+    /// and any function or closure `F: Fn(char) -> bool + Sync + Send`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let lines: Vec<_> = "Mary had a little lamb\nlittle lamb\nlittle lamb."
+    ///    .par_split_inclusive('\n')
+    ///    .collect();
+    /// assert_eq!(lines, ["Mary had a little lamb\n", "little lamb\n", "little lamb."]);
+    /// ```
+    fn par_split_inclusive<P: Pattern>(&self, separator: P) -> SplitInclusive<'_, P> {
+        SplitInclusive::new(self.as_parallel_string(), separator)
+    }
+
+    /// Returns a parallel iterator over substrings terminated by a
+    /// given character or predicate, similar to `str::split_terminator`.
+    /// It's equivalent to `par_split`, except it doesn't produce an empty
+    /// substring after a trailing terminator.
+    ///
+    /// Note: the `Pattern` trait is private, for use only by Rayon itself.
+    /// It is implemented for `char`, `&[char]`, `[char; N]`, `&[char; N]`,
+    /// and any function or closure `F: Fn(char) -> bool + Sync + Send`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let parts: Vec<_> = "((1 + 3) * 2)"
+    ///     .par_split_terminator(|c| c == '(' || c == ')')
+    ///     .collect();
+    /// assert_eq!(vec!["", "", "1 + 3", " * 2"], parts);
+    /// ```
+    fn par_split_terminator<P: Pattern>(&self, terminator: P) -> SplitTerminator<'_, P> {
+        SplitTerminator::new(self.as_parallel_string(), terminator)
+    }
+
+    /// Returns a parallel iterator over the lines of a string, ending with an
+    /// optional carriage return and with a newline (`\r\n` or just `\n`).
+    /// The final line ending is optional, and line endings are not included in
+    /// the output strings.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let lengths: Vec<_> = "hello world\nfizbuzz"
+    ///     .par_lines()
+    ///     .map(|l| l.len())
+    ///     .collect();
+    /// assert_eq!(vec![11, 7], lengths);
+    /// ```
+    fn par_lines(&self) -> Lines<'_> {
+        Lines(self.as_parallel_string())
+    }
+
+    /// Returns a parallel iterator over the sub-slices of a string that are
+    /// separated by any amount of whitespace.
+    ///
+    /// As with `str::split_whitespace`, 'whitespace' is defined according to
+    /// the terms of the Unicode Derived Core Property `White_Space`.
+    /// If you only want to split on ASCII whitespace instead, use
+    /// [`par_split_ascii_whitespace`][`ParallelString::par_split_ascii_whitespace`].
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let longest = "which is the longest word?"
+    ///     .par_split_whitespace()
+    ///     .max_by_key(|word| word.len());
+    /// assert_eq!(Some("longest"), longest);
+    /// ```
+    ///
+    /// All kinds of whitespace are considered:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let words: Vec<&str> = " Mary   had\ta\u{2009}little  \n\t lamb"
+    ///     .par_split_whitespace()
+    ///     .collect();
+    /// assert_eq!(words, ["Mary", "had", "a", "little", "lamb"]);
+    /// ```
+    ///
+    /// If the string is empty or all whitespace, the iterator yields no string slices:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// assert_eq!("".par_split_whitespace().count(), 0);
+    /// assert_eq!("   ".par_split_whitespace().count(), 0);
+    /// ```
+    fn par_split_whitespace(&self) -> SplitWhitespace<'_> {
+        SplitWhitespace(self.as_parallel_string())
+    }
+
+    /// Returns a parallel iterator over the sub-slices of a string that are
+    /// separated by any amount of ASCII whitespace.
+    ///
+    /// To split by Unicode `White_Space` instead, use
+    /// [`par_split_whitespace`][`ParallelString::par_split_whitespace`].
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let longest = "which is the longest word?"
+    ///     .par_split_ascii_whitespace()
+    ///     .max_by_key(|word| word.len());
+    /// assert_eq!(Some("longest"), longest);
+    /// ```
+    ///
+    /// All kinds of ASCII whitespace are considered, but not Unicode `White_Space`:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let words: Vec<&str> = " Mary   had\ta\u{2009}little  \n\t lamb"
+    ///     .par_split_ascii_whitespace()
+    ///     .collect();
+    /// assert_eq!(words, ["Mary", "had", "a\u{2009}little", "lamb"]);
+    /// ```
+    ///
+    /// If the string is empty or all ASCII whitespace, the iterator yields no string slices:
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// assert_eq!("".par_split_whitespace().count(), 0);
+    /// assert_eq!("   ".par_split_whitespace().count(), 0);
+    /// ```
+    fn par_split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_> {
+        SplitAsciiWhitespace(self.as_parallel_string())
+    }
+
+    /// Returns a parallel iterator over substrings that match a
+    /// given character or predicate, similar to `str::matches`.
+    ///
+    /// Note: the `Pattern` trait is private, for use only by Rayon itself.
+    /// It is implemented for `char`, `&[char]`, `[char; N]`, `&[char; N]`,
+    /// and any function or closure `F: Fn(char) -> bool + Sync + Send`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let total = "1, 2, buckle, 3, 4, door"
+    ///    .par_matches(char::is_numeric)
+    ///    .map(|s| s.parse::<i32>().expect("digit"))
+    ///    .sum();
+    /// assert_eq!(10, total);
+    /// ```
+    fn par_matches<P: Pattern>(&self, pattern: P) -> Matches<'_, P> {
+        Matches {
+            chars: self.as_parallel_string(),
+            pattern,
+        }
+    }
+
+    /// Returns a parallel iterator over substrings that match a given character
+    /// or predicate, with their positions, similar to `str::match_indices`.
+    ///
+    /// Note: the `Pattern` trait is private, for use only by Rayon itself.
+    /// It is implemented for `char`, `&[char]`, `[char; N]`, `&[char; N]`,
+    /// and any function or closure `F: Fn(char) -> bool + Sync + Send`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use rayon::prelude::*;
+    /// let digits: Vec<_> = "1, 2, buckle, 3, 4, door"
+    ///    .par_match_indices(char::is_numeric)
+    ///    .collect();
+    /// assert_eq!(digits, vec![(0, "1"), (3, "2"), (14, "3"), (17, "4")]);
+    /// ```
+    fn par_match_indices<P: Pattern>(&self, pattern: P) -> MatchIndices<'_, P> {
+        MatchIndices {
+            chars: self.as_parallel_string(),
+            pattern,
+        }
+    }
+}
+
+impl ParallelString for str {
+    #[inline]
+    fn as_parallel_string(&self) -> &str {
+        self
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// We hide the `Pattern` trait in a private module, as its API is not meant
+/// for general consumption.  If we could have privacy on trait items, then it
+/// would be nicer to have its basic existence and implementors public while
+/// keeping all of the methods private.
+mod private {
+    use crate::iter::plumbing::Folder;
+
+    /// Pattern-matching trait for `ParallelString`, somewhat like a mix of
+    /// `std::str::pattern::{Pattern, Searcher}`.
+    ///
+    /// Implementing this trait is not permitted outside of `rayon`.
+    pub trait Pattern: Sized + Sync + Send {
+        private_decl! {}
+        fn find_in(&self, haystack: &str) -> Option<usize>;
+        fn rfind_in(&self, haystack: &str) -> Option<usize>;
+        fn is_suffix_of(&self, haystack: &str) -> bool;
+        fn fold_splits<'ch, F>(&self, haystack: &'ch str, folder: F, skip_last: bool) -> F
+        where
+            F: Folder<&'ch str>;
+        fn fold_inclusive_splits<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
+        where
+            F: Folder<&'ch str>;
+        fn fold_matches<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
+        where
+            F: Folder<&'ch str>;
+        fn fold_match_indices<'ch, F>(&self, haystack: &'ch str, folder: F, base: usize) -> F
+        where
+            F: Folder<(usize, &'ch str)>;
+    }
+}
+use self::private::Pattern;
+
+#[inline]
+fn offset<T>(base: usize) -> impl Fn((usize, T)) -> (usize, T) {
+    move |(i, x)| (base + i, x)
+}
+
+macro_rules! impl_pattern {
+    (&$self:ident => $pattern:expr) => {
+        private_impl! {}
+
+        #[inline]
+        fn find_in(&$self, chars: &str) -> Option<usize> {
+            chars.find($pattern)
+        }
+
+        #[inline]
+        fn rfind_in(&$self, chars: &str) -> Option<usize> {
+            chars.rfind($pattern)
+        }
+
+        #[inline]
+        fn is_suffix_of(&$self, chars: &str) -> bool {
+            chars.ends_with($pattern)
+        }
+
+        fn fold_splits<'ch, F>(&$self, chars: &'ch str, folder: F, skip_last: bool) -> F
+        where
+            F: Folder<&'ch str>,
+        {
+            let mut split = chars.split($pattern);
+            if skip_last {
+                split.next_back();
+            }
+            folder.consume_iter(split)
+        }
+
+        fn fold_inclusive_splits<'ch, F>(&$self, chars: &'ch str, folder: F) -> F
+        where
+            F: Folder<&'ch str>,
+        {
+            folder.consume_iter(chars.split_inclusive($pattern))
+        }
+
+        fn fold_matches<'ch, F>(&$self, chars: &'ch str, folder: F) -> F
+        where
+            F: Folder<&'ch str>,
+        {
+            folder.consume_iter(chars.matches($pattern))
+        }
+
+        fn fold_match_indices<'ch, F>(&$self, chars: &'ch str, folder: F, base: usize) -> F
+        where
+            F: Folder<(usize, &'ch str)>,
+        {
+            folder.consume_iter(chars.match_indices($pattern).map(offset(base)))
+        }
+    }
+}
+
+impl Pattern for char {
+    impl_pattern!(&self => *self);
+}
+
+impl Pattern for &[char] {
+    impl_pattern!(&self => *self);
+}
+
+// TODO (MSRV 1.75): use `*self` for array patterns too.
+// - Needs `DoubleEndedSearcher` so `split.next_back()` works.
+
+impl<const N: usize> Pattern for [char; N] {
+    impl_pattern!(&self => self.as_slice());
+}
+
+impl<const N: usize> Pattern for &[char; N] {
+    impl_pattern!(&self => self.as_slice());
+}
+
+impl<FN: Sync + Send + Fn(char) -> bool> Pattern for FN {
+    impl_pattern!(&self => self);
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over the characters of a string
+#[derive(Debug, Clone)]
+pub struct Chars<'ch> {
+    chars: &'ch str,
+}
+
+struct CharsProducer<'ch> {
+    chars: &'ch str,
+}
+
+impl<'ch> ParallelIterator for Chars<'ch> {
+    type Item = char;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge_unindexed(CharsProducer { chars: self.chars }, consumer)
+    }
+}
+
+impl<'ch> UnindexedProducer for CharsProducer<'ch> {
+    type Item = char;
+
+    fn split(self) -> (Self, Option<Self>) {
+        match split(self.chars) {
+            Some((left, right)) => (
+                CharsProducer { chars: left },
+                Some(CharsProducer { chars: right }),
+            ),
+            None => (self, None),
+        }
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        folder.consume_iter(self.chars.chars())
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over the characters of a string, with their positions
+#[derive(Debug, Clone)]
+pub struct CharIndices<'ch> {
+    chars: &'ch str,
+}
+
+struct CharIndicesProducer<'ch> {
+    index: usize,
+    chars: &'ch str,
+}
+
+impl<'ch> ParallelIterator for CharIndices<'ch> {
+    type Item = (usize, char);
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = CharIndicesProducer {
+            index: 0,
+            chars: self.chars,
+        };
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+impl<'ch> UnindexedProducer for CharIndicesProducer<'ch> {
+    type Item = (usize, char);
+
+    fn split(self) -> (Self, Option<Self>) {
+        match split(self.chars) {
+            Some((left, right)) => (
+                CharIndicesProducer {
+                    chars: left,
+                    ..self
+                },
+                Some(CharIndicesProducer {
+                    chars: right,
+                    index: self.index + left.len(),
+                }),
+            ),
+            None => (self, None),
+        }
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        let base = self.index;
+        folder.consume_iter(self.chars.char_indices().map(offset(base)))
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over the bytes of a string
+#[derive(Debug, Clone)]
+pub struct Bytes<'ch> {
+    chars: &'ch str,
+}
+
+struct BytesProducer<'ch> {
+    chars: &'ch str,
+}
+
+impl<'ch> ParallelIterator for Bytes<'ch> {
+    type Item = u8;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge_unindexed(BytesProducer { chars: self.chars }, consumer)
+    }
+}
+
+impl<'ch> UnindexedProducer for BytesProducer<'ch> {
+    type Item = u8;
+
+    fn split(self) -> (Self, Option<Self>) {
+        match split(self.chars) {
+            Some((left, right)) => (
+                BytesProducer { chars: left },
+                Some(BytesProducer { chars: right }),
+            ),
+            None => (self, None),
+        }
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        folder.consume_iter(self.chars.bytes())
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over a string encoded as UTF-16
+#[derive(Debug, Clone)]
+pub struct EncodeUtf16<'ch> {
+    chars: &'ch str,
+}
+
+struct EncodeUtf16Producer<'ch> {
+    chars: &'ch str,
+}
+
+impl<'ch> ParallelIterator for EncodeUtf16<'ch> {
+    type Item = u16;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge_unindexed(EncodeUtf16Producer { chars: self.chars }, consumer)
+    }
+}
+
+impl<'ch> UnindexedProducer for EncodeUtf16Producer<'ch> {
+    type Item = u16;
+
+    fn split(self) -> (Self, Option<Self>) {
+        match split(self.chars) {
+            Some((left, right)) => (
+                EncodeUtf16Producer { chars: left },
+                Some(EncodeUtf16Producer { chars: right }),
+            ),
+            None => (self, None),
+        }
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        folder.consume_iter(self.chars.encode_utf16())
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over substrings separated by a pattern
+#[derive(Debug, Clone)]
+pub struct Split<'ch, P: Pattern> {
+    chars: &'ch str,
+    separator: P,
+}
+
+impl<'ch, P: Pattern> Split<'ch, P> {
+    fn new(chars: &'ch str, separator: P) -> Self {
+        Split { chars, separator }
+    }
+}
+
+impl<'ch, P: Pattern> ParallelIterator for Split<'ch, P> {
+    type Item = &'ch str;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitProducer::new(self.chars, &self.separator);
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+/// Implement support for `SplitProducer`.
+impl<'ch, P: Pattern> Fissile<P> for &'ch str {
+    fn length(&self) -> usize {
+        self.len()
+    }
+
+    fn midpoint(&self, end: usize) -> usize {
+        // First find a suitable UTF-8 boundary.
+        find_char_midpoint(&self[..end])
+    }
+
+    fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize> {
+        separator.find_in(&self[start..end])
+    }
+
+    fn rfind(&self, separator: &P, end: usize) -> Option<usize> {
+        separator.rfind_in(&self[..end])
+    }
+
+    fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self) {
+        if INCL {
+            // include the separator in the left side
+            let separator = self[index..].chars().next().unwrap();
+            self.split_at(index + separator.len_utf8())
+        } else {
+            let (left, right) = self.split_at(index);
+            let mut right_iter = right.chars();
+            right_iter.next(); // skip the separator
+            (left, right_iter.as_str())
+        }
+    }
+
+    fn fold_splits<F, const INCL: bool>(self, separator: &P, folder: F, skip_last: bool) -> F
+    where
+        F: Folder<Self>,
+    {
+        if INCL {
+            debug_assert!(!skip_last);
+            separator.fold_inclusive_splits(self, folder)
+        } else {
+            separator.fold_splits(self, folder, skip_last)
+        }
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over substrings separated by a pattern
+#[derive(Debug, Clone)]
+pub struct SplitInclusive<'ch, P: Pattern> {
+    chars: &'ch str,
+    separator: P,
+}
+
+impl<'ch, P: Pattern> SplitInclusive<'ch, P> {
+    fn new(chars: &'ch str, separator: P) -> Self {
+        SplitInclusive { chars, separator }
+    }
+}
+
+impl<'ch, P: Pattern> ParallelIterator for SplitInclusive<'ch, P> {
+    type Item = &'ch str;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitInclusiveProducer::new_incl(self.chars, &self.separator);
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over substrings separated by a terminator pattern
+#[derive(Debug, Clone)]
+pub struct SplitTerminator<'ch, P: Pattern> {
+    chars: &'ch str,
+    terminator: P,
+}
+
+struct SplitTerminatorProducer<'ch, 'sep, P: Pattern> {
+    splitter: SplitProducer<'sep, P, &'ch str>,
+    skip_last: bool,
+}
+
+impl<'ch, P: Pattern> SplitTerminator<'ch, P> {
+    fn new(chars: &'ch str, terminator: P) -> Self {
+        SplitTerminator { chars, terminator }
+    }
+}
+
+impl<'ch, 'sep, P: Pattern + 'sep> SplitTerminatorProducer<'ch, 'sep, P> {
+    fn new(chars: &'ch str, terminator: &'sep P) -> Self {
+        SplitTerminatorProducer {
+            splitter: SplitProducer::new(chars, terminator),
+            skip_last: chars.is_empty() || terminator.is_suffix_of(chars),
+        }
+    }
+}
+
+impl<'ch, P: Pattern> ParallelIterator for SplitTerminator<'ch, P> {
+    type Item = &'ch str;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = SplitTerminatorProducer::new(self.chars, &self.terminator);
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+impl<'ch, 'sep, P: Pattern + 'sep> UnindexedProducer for SplitTerminatorProducer<'ch, 'sep, P> {
+    type Item = &'ch str;
+
+    fn split(mut self) -> (Self, Option<Self>) {
+        let (left, right) = self.splitter.split();
+        self.splitter = left;
+        let right = right.map(|right| {
+            let skip_last = self.skip_last;
+            self.skip_last = false;
+            SplitTerminatorProducer {
+                splitter: right,
+                skip_last,
+            }
+        });
+        (self, right)
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.splitter.fold_with(folder, self.skip_last)
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over lines in a string
+#[derive(Debug, Clone)]
+pub struct Lines<'ch>(&'ch str);
+
+#[inline]
+fn no_carriage_return(line: &str) -> &str {
+    line.strip_suffix('\r').unwrap_or(line)
+}
+
+impl<'ch> ParallelIterator for Lines<'ch> {
+    type Item = &'ch str;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.0
+            .par_split_terminator('\n')
+            .map(no_carriage_return)
+            .drive_unindexed(consumer)
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over substrings separated by whitespace
+#[derive(Debug, Clone)]
+pub struct SplitWhitespace<'ch>(&'ch str);
+
+#[inline]
+fn not_empty(s: &&str) -> bool {
+    !s.is_empty()
+}
+
+impl<'ch> ParallelIterator for SplitWhitespace<'ch> {
+    type Item = &'ch str;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.0
+            .par_split(char::is_whitespace)
+            .filter(not_empty)
+            .drive_unindexed(consumer)
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over substrings separated by ASCII whitespace
+#[derive(Debug, Clone)]
+pub struct SplitAsciiWhitespace<'ch>(&'ch str);
+
+#[inline]
+fn is_ascii_whitespace(c: char) -> bool {
+    c.is_ascii_whitespace()
+}
+
+impl<'ch> ParallelIterator for SplitAsciiWhitespace<'ch> {
+    type Item = &'ch str;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.0
+            .par_split(is_ascii_whitespace)
+            .filter(not_empty)
+            .drive_unindexed(consumer)
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over substrings that match a pattern
+#[derive(Debug, Clone)]
+pub struct Matches<'ch, P: Pattern> {
+    chars: &'ch str,
+    pattern: P,
+}
+
+struct MatchesProducer<'ch, 'pat, P: Pattern> {
+    chars: &'ch str,
+    pattern: &'pat P,
+}
+
+impl<'ch, P: Pattern> ParallelIterator for Matches<'ch, P> {
+    type Item = &'ch str;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = MatchesProducer {
+            chars: self.chars,
+            pattern: &self.pattern,
+        };
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+impl<'ch, 'pat, P: Pattern> UnindexedProducer for MatchesProducer<'ch, 'pat, P> {
+    type Item = &'ch str;
+
+    fn split(self) -> (Self, Option<Self>) {
+        match split(self.chars) {
+            Some((left, right)) => (
+                MatchesProducer {
+                    chars: left,
+                    ..self
+                },
+                Some(MatchesProducer {
+                    chars: right,
+                    ..self
+                }),
+            ),
+            None => (self, None),
+        }
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.pattern.fold_matches(self.chars, folder)
+    }
+}
+
+// /////////////////////////////////////////////////////////////////////////
+
+/// Parallel iterator over substrings that match a pattern, with their positions
+#[derive(Debug, Clone)]
+pub struct MatchIndices<'ch, P: Pattern> {
+    chars: &'ch str,
+    pattern: P,
+}
+
+struct MatchIndicesProducer<'ch, 'pat, P: Pattern> {
+    index: usize,
+    chars: &'ch str,
+    pattern: &'pat P,
+}
+
+impl<'ch, P: Pattern> ParallelIterator for MatchIndices<'ch, P> {
+    type Item = (usize, &'ch str);
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        let producer = MatchIndicesProducer {
+            index: 0,
+            chars: self.chars,
+            pattern: &self.pattern,
+        };
+        bridge_unindexed(producer, consumer)
+    }
+}
+
+impl<'ch, 'pat, P: Pattern> UnindexedProducer for MatchIndicesProducer<'ch, 'pat, P> {
+    type Item = (usize, &'ch str);
+
+    fn split(self) -> (Self, Option<Self>) {
+        match split(self.chars) {
+            Some((left, right)) => (
+                MatchIndicesProducer {
+                    chars: left,
+                    ..self
+                },
+                Some(MatchIndicesProducer {
+                    chars: right,
+                    index: self.index + left.len(),
+                    ..self
+                }),
+            ),
+            None => (self, None),
+        }
+    }
+
+    fn fold_with<F>(self, folder: F) -> F
+    where
+        F: Folder<Self::Item>,
+    {
+        self.pattern
+            .fold_match_indices(self.chars, folder, self.index)
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/string.rs.html b/src/rayon/string.rs.html new file mode 100644 index 0000000000..3e65800b18 --- /dev/null +++ b/src/rayon/string.rs.html @@ -0,0 +1,99 @@ +string.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+
//! This module contains the parallel iterator types for owned strings
+//! (`String`). You will rarely need to interact with it directly
+//! unless you have need to name one of the iterator types.
+
+use crate::iter::plumbing::*;
+use crate::math::simplify_range;
+use crate::prelude::*;
+use std::ops::{Range, RangeBounds};
+
+impl<'a> ParallelDrainRange<usize> for &'a mut String {
+    type Iter = Drain<'a>;
+    type Item = char;
+
+    fn par_drain<R: RangeBounds<usize>>(self, range: R) -> Self::Iter {
+        Drain {
+            range: simplify_range(range, self.len()),
+            string: self,
+        }
+    }
+}
+
+/// Draining parallel iterator that moves a range of characters out of a string,
+/// but keeps the total capacity.
+#[derive(Debug)]
+pub struct Drain<'a> {
+    string: &'a mut String,
+    range: Range<usize>,
+}
+
+impl<'a> ParallelIterator for Drain<'a> {
+    type Item = char;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        self.string[self.range.clone()]
+            .par_chars()
+            .drive_unindexed(consumer)
+    }
+}
+
+impl<'a> Drop for Drain<'a> {
+    fn drop(&mut self) {
+        // Remove the drained range.
+        self.string.drain(self.range.clone());
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon/vec.rs.html b/src/rayon/vec.rs.html new file mode 100644 index 0000000000..3229c4ec89 --- /dev/null +++ b/src/rayon/vec.rs.html @@ -0,0 +1,569 @@ +vec.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+
//! Parallel iterator types for [vectors][std::vec] (`Vec<T>`)
+//!
+//! You will rarely need to interact with this module directly unless you need
+//! to name one of the iterator types.
+//!
+//! [std::vec]: https://doc.rust-lang.org/stable/std/vec/
+
+use crate::iter::plumbing::*;
+use crate::iter::*;
+use crate::math::simplify_range;
+use crate::slice::{Iter, IterMut};
+use std::iter;
+use std::mem;
+use std::ops::{Range, RangeBounds};
+use std::ptr;
+use std::slice;
+
+impl<'data, T: Sync + 'data> IntoParallelIterator for &'data Vec<T> {
+    type Item = &'data T;
+    type Iter = Iter<'data, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        <&[T]>::into_par_iter(self)
+    }
+}
+
+impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut Vec<T> {
+    type Item = &'data mut T;
+    type Iter = IterMut<'data, T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        <&mut [T]>::into_par_iter(self)
+    }
+}
+
+/// Parallel iterator that moves out of a vector.
+#[derive(Debug, Clone)]
+pub struct IntoIter<T: Send> {
+    vec: Vec<T>,
+}
+
+impl<T: Send> IntoParallelIterator for Vec<T> {
+    type Item = T;
+    type Iter = IntoIter<T>;
+
+    fn into_par_iter(self) -> Self::Iter {
+        IntoIter { vec: self }
+    }
+}
+
+impl<T: Send> ParallelIterator for IntoIter<T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<T: Send> IndexedParallelIterator for IntoIter<T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.vec.len()
+    }
+
+    fn with_producer<CB>(mut self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        // Drain every item, and then the vector only needs to free its buffer.
+        self.vec.par_drain(..).with_producer(callback)
+    }
+}
+
+impl<'data, T: Send> ParallelDrainRange<usize> for &'data mut Vec<T> {
+    type Iter = Drain<'data, T>;
+    type Item = T;
+
+    fn par_drain<R: RangeBounds<usize>>(self, range: R) -> Self::Iter {
+        Drain {
+            orig_len: self.len(),
+            range: simplify_range(range, self.len()),
+            vec: self,
+        }
+    }
+}
+
+/// Draining parallel iterator that moves a range out of a vector, but keeps the total capacity.
+#[derive(Debug)]
+pub struct Drain<'data, T: Send> {
+    vec: &'data mut Vec<T>,
+    range: Range<usize>,
+    orig_len: usize,
+}
+
+impl<'data, T: Send> ParallelIterator for Drain<'data, T> {
+    type Item = T;
+
+    fn drive_unindexed<C>(self, consumer: C) -> C::Result
+    where
+        C: UnindexedConsumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn opt_len(&self) -> Option<usize> {
+        Some(self.len())
+    }
+}
+
+impl<'data, T: Send> IndexedParallelIterator for Drain<'data, T> {
+    fn drive<C>(self, consumer: C) -> C::Result
+    where
+        C: Consumer<Self::Item>,
+    {
+        bridge(self, consumer)
+    }
+
+    fn len(&self) -> usize {
+        self.range.len()
+    }
+
+    fn with_producer<CB>(self, callback: CB) -> CB::Output
+    where
+        CB: ProducerCallback<Self::Item>,
+    {
+        unsafe {
+            // Make the vector forget about the drained items, and temporarily the tail too.
+            self.vec.set_len(self.range.start);
+
+            // Create the producer as the exclusive "owner" of the slice.
+            let producer = DrainProducer::from_vec(self.vec, self.range.len());
+
+            // The producer will move or drop each item from the drained range.
+            callback.callback(producer)
+        }
+    }
+}
+
+impl<'data, T: Send> Drop for Drain<'data, T> {
+    fn drop(&mut self) {
+        let Range { start, end } = self.range;
+        if self.vec.len() == self.orig_len {
+            // We must not have produced, so just call a normal drain to remove the items.
+            self.vec.drain(start..end);
+        } else if start == end {
+            // Empty range, so just restore the length to its original state
+            unsafe {
+                self.vec.set_len(self.orig_len);
+            }
+        } else if end < self.orig_len {
+            // The producer was responsible for consuming the drained items.
+            // Move the tail items to their new place, then set the length to include them.
+            unsafe {
+                let ptr = self.vec.as_mut_ptr().add(start);
+                let tail_ptr = self.vec.as_ptr().add(end);
+                let tail_len = self.orig_len - end;
+                ptr::copy(tail_ptr, ptr, tail_len);
+                self.vec.set_len(start + tail_len);
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+pub(crate) struct DrainProducer<'data, T: Send> {
+    slice: &'data mut [T],
+}
+
+impl<T: Send> DrainProducer<'_, T> {
+    /// Creates a draining producer, which *moves* items from the slice.
+    ///
+    /// Unsafe because `!Copy` data must not be read after the borrow is released.
+    pub(crate) unsafe fn new(slice: &mut [T]) -> DrainProducer<'_, T> {
+        DrainProducer { slice }
+    }
+
+    /// Creates a draining producer, which *moves* items from the tail of the vector.
+    ///
+    /// Unsafe because we're moving from beyond `vec.len()`, so the caller must ensure
+    /// that data is initialized and not read after the borrow is released.
+    unsafe fn from_vec(vec: &mut Vec<T>, len: usize) -> DrainProducer<'_, T> {
+        let start = vec.len();
+        assert!(vec.capacity() - start >= len);
+
+        // The pointer is derived from `Vec` directly, not through a `Deref`,
+        // so it has provenance over the whole allocation.
+        let ptr = vec.as_mut_ptr().add(start);
+        DrainProducer::new(slice::from_raw_parts_mut(ptr, len))
+    }
+}
+
+impl<'data, T: 'data + Send> Producer for DrainProducer<'data, T> {
+    type Item = T;
+    type IntoIter = SliceDrain<'data, T>;
+
+    fn into_iter(mut self) -> Self::IntoIter {
+        // replace the slice so we don't drop it twice
+        let slice = mem::take(&mut self.slice);
+        SliceDrain {
+            iter: slice.iter_mut(),
+        }
+    }
+
+    fn split_at(mut self, index: usize) -> (Self, Self) {
+        // replace the slice so we don't drop it twice
+        let slice = mem::take(&mut self.slice);
+        let (left, right) = slice.split_at_mut(index);
+        unsafe { (DrainProducer::new(left), DrainProducer::new(right)) }
+    }
+}
+
+impl<'data, T: 'data + Send> Drop for DrainProducer<'data, T> {
+    fn drop(&mut self) {
+        // extract the slice so we can use `Drop for [T]`
+        let slice_ptr: *mut [T] = mem::take::<&'data mut [T]>(&mut self.slice);
+        unsafe { ptr::drop_in_place::<[T]>(slice_ptr) };
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+// like std::vec::Drain, without updating a source Vec
+pub(crate) struct SliceDrain<'data, T> {
+    iter: slice::IterMut<'data, T>,
+}
+
+impl<'data, T: 'data> Iterator for SliceDrain<'data, T> {
+    type Item = T;
+
+    fn next(&mut self) -> Option<T> {
+        // Coerce the pointer early, so we don't keep the
+        // reference that's about to be invalidated.
+        let ptr: *const T = self.iter.next()?;
+        Some(unsafe { ptr::read(ptr) })
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.iter.size_hint()
+    }
+
+    fn count(self) -> usize {
+        self.iter.len()
+    }
+}
+
+impl<'data, T: 'data> DoubleEndedIterator for SliceDrain<'data, T> {
+    fn next_back(&mut self) -> Option<Self::Item> {
+        // Coerce the pointer early, so we don't keep the
+        // reference that's about to be invalidated.
+        let ptr: *const T = self.iter.next_back()?;
+        Some(unsafe { ptr::read(ptr) })
+    }
+}
+
+impl<'data, T: 'data> ExactSizeIterator for SliceDrain<'data, T> {
+    fn len(&self) -> usize {
+        self.iter.len()
+    }
+}
+
+impl<'data, T: 'data> iter::FusedIterator for SliceDrain<'data, T> {}
+
+impl<'data, T: 'data> Drop for SliceDrain<'data, T> {
+    fn drop(&mut self) {
+        // extract the iterator so we can use `Drop for [T]`
+        let slice_ptr: *mut [T] = mem::replace(&mut self.iter, [].iter_mut()).into_slice();
+        unsafe { ptr::drop_in_place::<[T]>(slice_ptr) };
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/broadcast/mod.rs.html b/src/rayon_core/broadcast/mod.rs.html new file mode 100644 index 0000000000..ea415f9e2d --- /dev/null +++ b/src/rayon_core/broadcast/mod.rs.html @@ -0,0 +1,303 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+
use crate::job::{ArcJob, StackJob};
+use crate::latch::{CountLatch, LatchRef};
+use crate::registry::{Registry, WorkerThread};
+use std::fmt;
+use std::marker::PhantomData;
+use std::sync::Arc;
+
+mod test;
+
+/// Executes `op` within every thread in the current threadpool. If this is
+/// called from a non-Rayon thread, it will execute in the global threadpool.
+/// Any attempts to use `join`, `scope`, or parallel iterators will then operate
+/// within that threadpool. When the call has completed on each thread, returns
+/// a vector containing all of their return values.
+///
+/// For more information, see the [`ThreadPool::broadcast()`][m] method.
+///
+/// [m]: struct.ThreadPool.html#method.broadcast
+pub fn broadcast<OP, R>(op: OP) -> Vec<R>
+where
+    OP: Fn(BroadcastContext<'_>) -> R + Sync,
+    R: Send,
+{
+    // We assert that current registry has not terminated.
+    unsafe { broadcast_in(op, &Registry::current()) }
+}
+
+/// Spawns an asynchronous task on every thread in this thread-pool. This task
+/// will run in the implicit, global scope, which means that it may outlast the
+/// current stack frame -- therefore, it cannot capture any references onto the
+/// stack (you will likely need a `move` closure).
+///
+/// For more information, see the [`ThreadPool::spawn_broadcast()`][m] method.
+///
+/// [m]: struct.ThreadPool.html#method.spawn_broadcast
+pub fn spawn_broadcast<OP>(op: OP)
+where
+    OP: Fn(BroadcastContext<'_>) + Send + Sync + 'static,
+{
+    // We assert that current registry has not terminated.
+    unsafe { spawn_broadcast_in(op, &Registry::current()) }
+}
+
+/// Provides context to a closure called by `broadcast`.
+pub struct BroadcastContext<'a> {
+    worker: &'a WorkerThread,
+
+    /// Make sure to prevent auto-traits like `Send` and `Sync`.
+    _marker: PhantomData<&'a mut dyn Fn()>,
+}
+
+impl<'a> BroadcastContext<'a> {
+    pub(super) fn with<R>(f: impl FnOnce(BroadcastContext<'_>) -> R) -> R {
+        let worker_thread = WorkerThread::current();
+        assert!(!worker_thread.is_null());
+        f(BroadcastContext {
+            worker: unsafe { &*worker_thread },
+            _marker: PhantomData,
+        })
+    }
+
+    /// Our index amongst the broadcast threads (ranges from `0..self.num_threads()`).
+    #[inline]
+    pub fn index(&self) -> usize {
+        self.worker.index()
+    }
+
+    /// The number of threads receiving the broadcast in the thread pool.
+    ///
+    /// # Future compatibility note
+    ///
+    /// Future versions of Rayon might vary the number of threads over time, but
+    /// this method will always return the number of threads which are actually
+    /// receiving your particular `broadcast` call.
+    #[inline]
+    pub fn num_threads(&self) -> usize {
+        self.worker.registry().num_threads()
+    }
+}
+
+impl<'a> fmt::Debug for BroadcastContext<'a> {
+    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt.debug_struct("BroadcastContext")
+            .field("index", &self.index())
+            .field("num_threads", &self.num_threads())
+            .field("pool_id", &self.worker.registry().id())
+            .finish()
+    }
+}
+
+/// Execute `op` on every thread in the pool. It will be executed on each
+/// thread when they have nothing else to do locally, before they try to
+/// steal work from other threads. This function will not return until all
+/// threads have completed the `op`.
+///
+/// Unsafe because `registry` must not yet have terminated.
+pub(super) unsafe fn broadcast_in<OP, R>(op: OP, registry: &Arc<Registry>) -> Vec<R>
+where
+    OP: Fn(BroadcastContext<'_>) -> R + Sync,
+    R: Send,
+{
+    let f = move |injected: bool| {
+        debug_assert!(injected);
+        BroadcastContext::with(&op)
+    };
+
+    let n_threads = registry.num_threads();
+    let current_thread = WorkerThread::current().as_ref();
+    let latch = CountLatch::with_count(n_threads, current_thread);
+    let jobs: Vec<_> = (0..n_threads)
+        .map(|_| StackJob::new(&f, LatchRef::new(&latch)))
+        .collect();
+    let job_refs = jobs.iter().map(|job| job.as_job_ref());
+
+    registry.inject_broadcast(job_refs);
+
+    // Wait for all jobs to complete, then collect the results, maybe propagating a panic.
+    latch.wait(current_thread);
+    jobs.into_iter().map(|job| job.into_result()).collect()
+}
+
+/// Execute `op` on every thread in the pool. It will be executed on each
+/// thread when they have nothing else to do locally, before they try to
+/// steal work from other threads. This function returns immediately after
+/// injecting the jobs.
+///
+/// Unsafe because `registry` must not yet have terminated.
+pub(super) unsafe fn spawn_broadcast_in<OP>(op: OP, registry: &Arc<Registry>)
+where
+    OP: Fn(BroadcastContext<'_>) + Send + Sync + 'static,
+{
+    let job = ArcJob::new({
+        let registry = Arc::clone(registry);
+        move || {
+            registry.catch_unwind(|| BroadcastContext::with(&op));
+            registry.terminate(); // (*) permit registry to terminate now
+        }
+    });
+
+    let n_threads = registry.num_threads();
+    let job_refs = (0..n_threads).map(|_| {
+        // Ensure that registry cannot terminate until this job has executed
+        // on each thread. This ref is decremented at the (*) above.
+        registry.increment_terminate_count();
+
+        ArcJob::as_static_job_ref(&job)
+    });
+
+    registry.inject_broadcast(job_refs);
+}
+
\ No newline at end of file diff --git a/src/rayon_core/compile_fail/mod.rs.html b/src/rayon_core/compile_fail/mod.rs.html new file mode 100644 index 0000000000..35e896fd26 --- /dev/null +++ b/src/rayon_core/compile_fail/mod.rs.html @@ -0,0 +1,17 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+
// These modules contain `compile_fail` doc tests.
+mod quicksort_race1;
+mod quicksort_race2;
+mod quicksort_race3;
+mod rc_return;
+mod rc_upvar;
+mod scope_join_bad;
+
\ No newline at end of file diff --git a/src/rayon_core/compile_fail/quicksort_race1.rs.html b/src/rayon_core/compile_fail/quicksort_race1.rs.html new file mode 100644 index 0000000000..ac47777117 --- /dev/null +++ b/src/rayon_core/compile_fail/quicksort_race1.rs.html @@ -0,0 +1,59 @@ +quicksort_race1.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
/*! ```compile_fail,E0524
+
+fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
+    if v.len() <= 1 {
+        return;
+    }
+
+    let mid = partition(v);
+    let (lo, _hi) = v.split_at_mut(mid);
+    rayon_core::join(|| quick_sort(lo), || quick_sort(lo)); //~ ERROR
+}
+
+fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
+    let pivot = v.len() - 1;
+    let mut i = 0;
+    for j in 0..pivot {
+        if v[j] <= v[pivot] {
+            v.swap(i, j);
+            i += 1;
+        }
+    }
+    v.swap(i, pivot);
+    i
+}
+
+fn main() { }
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon_core/compile_fail/quicksort_race2.rs.html b/src/rayon_core/compile_fail/quicksort_race2.rs.html new file mode 100644 index 0000000000..901945fb5b --- /dev/null +++ b/src/rayon_core/compile_fail/quicksort_race2.rs.html @@ -0,0 +1,59 @@ +quicksort_race2.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
/*! ```compile_fail,E0500
+
+fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
+    if v.len() <= 1 {
+        return;
+    }
+
+    let mid = partition(v);
+    let (lo, _hi) = v.split_at_mut(mid);
+    rayon_core::join(|| quick_sort(lo), || quick_sort(v)); //~ ERROR
+}
+
+fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
+    let pivot = v.len() - 1;
+    let mut i = 0;
+    for j in 0..pivot {
+        if v[j] <= v[pivot] {
+            v.swap(i, j);
+            i += 1;
+        }
+    }
+    v.swap(i, pivot);
+    i
+}
+
+fn main() { }
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon_core/compile_fail/quicksort_race3.rs.html b/src/rayon_core/compile_fail/quicksort_race3.rs.html new file mode 100644 index 0000000000..aa843352d4 --- /dev/null +++ b/src/rayon_core/compile_fail/quicksort_race3.rs.html @@ -0,0 +1,59 @@ +quicksort_race3.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
/*! ```compile_fail,E0524
+
+fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
+    if v.len() <= 1 {
+        return;
+    }
+
+    let mid = partition(v);
+    let (_lo, hi) = v.split_at_mut(mid);
+    rayon_core::join(|| quick_sort(hi), || quick_sort(hi)); //~ ERROR
+}
+
+fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
+    let pivot = v.len() - 1;
+    let mut i = 0;
+    for j in 0..pivot {
+        if v[j] <= v[pivot] {
+            v.swap(i, j);
+            i += 1;
+        }
+    }
+    v.swap(i, pivot);
+    i
+}
+
+fn main() { }
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon_core/compile_fail/rc_return.rs.html b/src/rayon_core/compile_fail/rc_return.rs.html new file mode 100644 index 0000000000..f098ee6307 --- /dev/null +++ b/src/rayon_core/compile_fail/rc_return.rs.html @@ -0,0 +1,37 @@ +rc_return.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+
/** ```compile_fail,E0277
+
+use std::rc::Rc;
+
+rayon_core::join(|| Rc::new(22), || ()); //~ ERROR
+
+``` */
+mod left {}
+
+/** ```compile_fail,E0277
+
+use std::rc::Rc;
+
+rayon_core::join(|| (), || Rc::new(23)); //~ ERROR
+
+``` */
+mod right {}
+
\ No newline at end of file diff --git a/src/rayon_core/compile_fail/rc_upvar.rs.html b/src/rayon_core/compile_fail/rc_upvar.rs.html new file mode 100644 index 0000000000..0f68838772 --- /dev/null +++ b/src/rayon_core/compile_fail/rc_upvar.rs.html @@ -0,0 +1,21 @@ +rc_upvar.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+
/*! ```compile_fail,E0277
+
+use std::rc::Rc;
+
+let r = Rc::new(22);
+rayon_core::join(|| r.clone(), || r.clone());
+//~^ ERROR
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon_core/compile_fail/scope_join_bad.rs.html b/src/rayon_core/compile_fail/scope_join_bad.rs.html new file mode 100644 index 0000000000..0e91f76a48 --- /dev/null +++ b/src/rayon_core/compile_fail/scope_join_bad.rs.html @@ -0,0 +1,51 @@ +scope_join_bad.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+
/*! ```compile_fail,E0373
+
+fn bad_scope<F>(f: F)
+    where F: FnOnce(&i32) + Send,
+{
+    rayon_core::scope(|s| {
+        let x = 22;
+        s.spawn(|_| f(&x)); //~ ERROR `x` does not live long enough
+    });
+}
+
+fn good_scope<F>(f: F)
+    where F: FnOnce(&i32) + Send,
+{
+    let x = 22;
+    rayon_core::scope(|s| {
+        s.spawn(|_| f(&x));
+    });
+}
+
+fn main() {
+}
+
+``` */
+
\ No newline at end of file diff --git a/src/rayon_core/job.rs.html b/src/rayon_core/job.rs.html new file mode 100644 index 0000000000..c816c90f77 --- /dev/null +++ b/src/rayon_core/job.rs.html @@ -0,0 +1,543 @@ +job.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+
use crate::latch::Latch;
+use crate::unwind;
+use crossbeam_deque::{Injector, Steal};
+use std::any::Any;
+use std::cell::UnsafeCell;
+use std::mem;
+use std::sync::Arc;
+
+pub(super) enum JobResult<T> {
+    None,
+    Ok(T),
+    Panic(Box<dyn Any + Send>),
+}
+
+/// A `Job` is used to advertise work for other threads that they may
+/// want to steal. In accordance with time honored tradition, jobs are
+/// arranged in a deque, so that thieves can take from the top of the
+/// deque while the main worker manages the bottom of the deque. This
+/// deque is managed by the `thread_pool` module.
+pub(super) trait Job {
+    /// Unsafe: this may be called from a different thread than the one
+    /// which scheduled the job, so the implementer must ensure the
+    /// appropriate traits are met, whether `Send`, `Sync`, or both.
+    unsafe fn execute(this: *const ());
+}
+
+/// Effectively a Job trait object. Each JobRef **must** be executed
+/// exactly once, or else data may leak.
+///
+/// Internally, we store the job's data in a `*const ()` pointer.  The
+/// true type is something like `*const StackJob<...>`, but we hide
+/// it. We also carry the "execute fn" from the `Job` trait.
+pub(super) struct JobRef {
+    pointer: *const (),
+    execute_fn: unsafe fn(*const ()),
+}
+
+unsafe impl Send for JobRef {}
+unsafe impl Sync for JobRef {}
+
+impl JobRef {
+    /// Unsafe: caller asserts that `data` will remain valid until the
+    /// job is executed.
+    pub(super) unsafe fn new<T>(data: *const T) -> JobRef
+    where
+        T: Job,
+    {
+        // erase types:
+        JobRef {
+            pointer: data as *const (),
+            execute_fn: <T as Job>::execute,
+        }
+    }
+
+    /// Returns an opaque handle that can be saved and compared,
+    /// without making `JobRef` itself `Copy + Eq`.
+    #[inline]
+    pub(super) fn id(&self) -> impl Eq {
+        (self.pointer, self.execute_fn)
+    }
+
+    #[inline]
+    pub(super) unsafe fn execute(self) {
+        (self.execute_fn)(self.pointer)
+    }
+}
+
+/// A job that will be owned by a stack slot. This means that when it
+/// executes it need not free any heap data, the cleanup occurs when
+/// the stack frame is later popped.  The function parameter indicates
+/// `true` if the job was stolen -- executed on a different thread.
+pub(super) struct StackJob<L, F, R>
+where
+    L: Latch + Sync,
+    F: FnOnce(bool) -> R + Send,
+    R: Send,
+{
+    pub(super) latch: L,
+    func: UnsafeCell<Option<F>>,
+    result: UnsafeCell<JobResult<R>>,
+}
+
+impl<L, F, R> StackJob<L, F, R>
+where
+    L: Latch + Sync,
+    F: FnOnce(bool) -> R + Send,
+    R: Send,
+{
+    pub(super) fn new(func: F, latch: L) -> StackJob<L, F, R> {
+        StackJob {
+            latch,
+            func: UnsafeCell::new(Some(func)),
+            result: UnsafeCell::new(JobResult::None),
+        }
+    }
+
+    pub(super) unsafe fn as_job_ref(&self) -> JobRef {
+        JobRef::new(self)
+    }
+
+    pub(super) unsafe fn run_inline(self, stolen: bool) -> R {
+        self.func.into_inner().unwrap()(stolen)
+    }
+
+    pub(super) unsafe fn into_result(self) -> R {
+        self.result.into_inner().into_return_value()
+    }
+}
+
+impl<L, F, R> Job for StackJob<L, F, R>
+where
+    L: Latch + Sync,
+    F: FnOnce(bool) -> R + Send,
+    R: Send,
+{
+    unsafe fn execute(this: *const ()) {
+        let this = &*(this as *const Self);
+        let abort = unwind::AbortIfPanic;
+        let func = (*this.func.get()).take().unwrap();
+        (*this.result.get()) = JobResult::call(func);
+        Latch::set(&this.latch);
+        mem::forget(abort);
+    }
+}
+
+/// Represents a job stored in the heap. Used to implement
+/// `scope`. Unlike `StackJob`, when executed, `HeapJob` simply
+/// invokes a closure, which then triggers the appropriate logic to
+/// signal that the job executed.
+///
+/// (Probably `StackJob` should be refactored in a similar fashion.)
+pub(super) struct HeapJob<BODY>
+where
+    BODY: FnOnce() + Send,
+{
+    job: BODY,
+}
+
+impl<BODY> HeapJob<BODY>
+where
+    BODY: FnOnce() + Send,
+{
+    pub(super) fn new(job: BODY) -> Box<Self> {
+        Box::new(HeapJob { job })
+    }
+
+    /// Creates a `JobRef` from this job -- note that this hides all
+    /// lifetimes, so it is up to you to ensure that this JobRef
+    /// doesn't outlive any data that it closes over.
+    pub(super) unsafe fn into_job_ref(self: Box<Self>) -> JobRef {
+        JobRef::new(Box::into_raw(self))
+    }
+
+    /// Creates a static `JobRef` from this job.
+    pub(super) fn into_static_job_ref(self: Box<Self>) -> JobRef
+    where
+        BODY: 'static,
+    {
+        unsafe { self.into_job_ref() }
+    }
+}
+
+impl<BODY> Job for HeapJob<BODY>
+where
+    BODY: FnOnce() + Send,
+{
+    unsafe fn execute(this: *const ()) {
+        let this = Box::from_raw(this as *mut Self);
+        (this.job)();
+    }
+}
+
+/// Represents a job stored in an `Arc` -- like `HeapJob`, but may
+/// be turned into multiple `JobRef`s and called multiple times.
+pub(super) struct ArcJob<BODY>
+where
+    BODY: Fn() + Send + Sync,
+{
+    job: BODY,
+}
+
+impl<BODY> ArcJob<BODY>
+where
+    BODY: Fn() + Send + Sync,
+{
+    pub(super) fn new(job: BODY) -> Arc<Self> {
+        Arc::new(ArcJob { job })
+    }
+
+    /// Creates a `JobRef` from this job -- note that this hides all
+    /// lifetimes, so it is up to you to ensure that this JobRef
+    /// doesn't outlive any data that it closes over.
+    pub(super) unsafe fn as_job_ref(this: &Arc<Self>) -> JobRef {
+        JobRef::new(Arc::into_raw(Arc::clone(this)))
+    }
+
+    /// Creates a static `JobRef` from this job.
+    pub(super) fn as_static_job_ref(this: &Arc<Self>) -> JobRef
+    where
+        BODY: 'static,
+    {
+        unsafe { Self::as_job_ref(this) }
+    }
+}
+
+impl<BODY> Job for ArcJob<BODY>
+where
+    BODY: Fn() + Send + Sync,
+{
+    unsafe fn execute(this: *const ()) {
+        let this = Arc::from_raw(this as *mut Self);
+        (this.job)();
+    }
+}
+
+impl<T> JobResult<T> {
+    fn call(func: impl FnOnce(bool) -> T) -> Self {
+        match unwind::halt_unwinding(|| func(true)) {
+            Ok(x) => JobResult::Ok(x),
+            Err(x) => JobResult::Panic(x),
+        }
+    }
+
+    /// Convert the `JobResult` for a job that has finished (and hence
+    /// its JobResult is populated) into its return value.
+    ///
+    /// NB. This will panic if the job panicked.
+    pub(super) fn into_return_value(self) -> T {
+        match self {
+            JobResult::None => unreachable!(),
+            JobResult::Ok(x) => x,
+            JobResult::Panic(x) => unwind::resume_unwinding(x),
+        }
+    }
+}
+
+/// Indirect queue to provide FIFO job priority.
+pub(super) struct JobFifo {
+    inner: Injector<JobRef>,
+}
+
+impl JobFifo {
+    pub(super) fn new() -> Self {
+        JobFifo {
+            inner: Injector::new(),
+        }
+    }
+
+    pub(super) unsafe fn push(&self, job_ref: JobRef) -> JobRef {
+        // A little indirection ensures that spawns are always prioritized in FIFO order.  The
+        // jobs in a thread's deque may be popped from the back (LIFO) or stolen from the front
+        // (FIFO), but either way they will end up popping from the front of this queue.
+        self.inner.push(job_ref);
+        JobRef::new(self)
+    }
+}
+
+impl Job for JobFifo {
+    unsafe fn execute(this: *const ()) {
+        // We "execute" a queue by executing its first job, FIFO.
+        let this = &*(this as *const Self);
+        loop {
+            match this.inner.steal() {
+                Steal::Success(job_ref) => break job_ref.execute(),
+                Steal::Empty => panic!("FIFO is empty"),
+                Steal::Retry => {}
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/join/mod.rs.html b/src/rayon_core/join/mod.rs.html new file mode 100644 index 0000000000..360208a030 --- /dev/null +++ b/src/rayon_core/join/mod.rs.html @@ -0,0 +1,379 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+
use crate::job::StackJob;
+use crate::latch::SpinLatch;
+use crate::registry::{self, WorkerThread};
+use crate::unwind;
+use std::any::Any;
+
+use crate::FnContext;
+
+#[cfg(test)]
+mod test;
+
+/// Takes two closures and *potentially* runs them in parallel. It
+/// returns a pair of the results from those closures.
+///
+/// Conceptually, calling `join()` is similar to spawning two threads,
+/// one executing each of the two closures. However, the
+/// implementation is quite different and incurs very low
+/// overhead. The underlying technique is called "work stealing": the
+/// Rayon runtime uses a fixed pool of worker threads and attempts to
+/// only execute code in parallel when there are idle CPUs to handle
+/// it.
+///
+/// When `join` is called from outside the thread pool, the calling
+/// thread will block while the closures execute in the pool.  When
+/// `join` is called within the pool, the calling thread still actively
+/// participates in the thread pool. It will begin by executing closure
+/// A (on the current thread). While it is doing that, it will advertise
+/// closure B as being available for other threads to execute. Once closure A
+/// has completed, the current thread will try to execute closure B;
+/// if however closure B has been stolen, then it will look for other work
+/// while waiting for the thief to fully execute closure B. (This is the
+/// typical work-stealing strategy).
+///
+/// # Examples
+///
+/// This example uses join to perform a quick-sort (note this is not a
+/// particularly optimized implementation: if you **actually** want to
+/// sort for real, you should prefer [the `par_sort` method] offered
+/// by Rayon).
+///
+/// [the `par_sort` method]: ../rayon/slice/trait.ParallelSliceMut.html#method.par_sort
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// let mut v = vec![5, 1, 8, 22, 0, 44];
+/// quick_sort(&mut v);
+/// assert_eq!(v, vec![0, 1, 5, 8, 22, 44]);
+///
+/// fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
+///    if v.len() > 1 {
+///        let mid = partition(v);
+///        let (lo, hi) = v.split_at_mut(mid);
+///        rayon::join(|| quick_sort(lo),
+///                    || quick_sort(hi));
+///    }
+/// }
+///
+/// // Partition rearranges all items `<=` to the pivot
+/// // item (arbitrary selected to be the last item in the slice)
+/// // to the first half of the slice. It then returns the
+/// // "dividing point" where the pivot is placed.
+/// fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
+///     let pivot = v.len() - 1;
+///     let mut i = 0;
+///     for j in 0..pivot {
+///         if v[j] <= v[pivot] {
+///             v.swap(i, j);
+///             i += 1;
+///         }
+///     }
+///     v.swap(i, pivot);
+///     i
+/// }
+/// ```
+///
+/// # Warning about blocking I/O
+///
+/// The assumption is that the closures given to `join()` are
+/// CPU-bound tasks that do not perform I/O or other blocking
+/// operations. If you do perform I/O, and that I/O should block
+/// (e.g., waiting for a network request), the overall performance may
+/// be poor.  Moreover, if you cause one closure to be blocked waiting
+/// on another (for example, using a channel), that could lead to a
+/// deadlock.
+///
+/// # Panics
+///
+/// No matter what happens, both closures will always be executed.  If
+/// a single closure panics, whether it be the first or second
+/// closure, that panic will be propagated and hence `join()` will
+/// panic with the same panic value. If both closures panic, `join()`
+/// will panic with the panic value from the first closure.
+pub fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
+where
+    A: FnOnce() -> RA + Send,
+    B: FnOnce() -> RB + Send,
+    RA: Send,
+    RB: Send,
+{
+    #[inline]
+    fn call<R>(f: impl FnOnce() -> R) -> impl FnOnce(FnContext) -> R {
+        move |_| f()
+    }
+
+    join_context(call(oper_a), call(oper_b))
+}
+
+/// Identical to `join`, except that the closures have a parameter
+/// that provides context for the way the closure has been called,
+/// especially indicating whether they're executing on a different
+/// thread than where `join_context` was called.  This will occur if
+/// the second job is stolen by a different thread, or if
+/// `join_context` was called from outside the thread pool to begin
+/// with.
+pub fn join_context<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
+where
+    A: FnOnce(FnContext) -> RA + Send,
+    B: FnOnce(FnContext) -> RB + Send,
+    RA: Send,
+    RB: Send,
+{
+    #[inline]
+    fn call_a<R>(f: impl FnOnce(FnContext) -> R, injected: bool) -> impl FnOnce() -> R {
+        move || f(FnContext::new(injected))
+    }
+
+    #[inline]
+    fn call_b<R>(f: impl FnOnce(FnContext) -> R) -> impl FnOnce(bool) -> R {
+        move |migrated| f(FnContext::new(migrated))
+    }
+
+    registry::in_worker(|worker_thread, injected| unsafe {
+        // Create virtual wrapper for task b; this all has to be
+        // done here so that the stack frame can keep it all live
+        // long enough.
+        let job_b = StackJob::new(call_b(oper_b), SpinLatch::new(worker_thread));
+        let job_b_ref = job_b.as_job_ref();
+        let job_b_id = job_b_ref.id();
+        worker_thread.push(job_b_ref);
+
+        // Execute task a; hopefully b gets stolen in the meantime.
+        let status_a = unwind::halt_unwinding(call_a(oper_a, injected));
+        let result_a = match status_a {
+            Ok(v) => v,
+            Err(err) => join_recover_from_panic(worker_thread, &job_b.latch, err),
+        };
+
+        // Now that task A has finished, try to pop job B from the
+        // local stack.  It may already have been popped by job A; it
+        // may also have been stolen. There may also be some tasks
+        // pushed on top of it in the stack, and we will have to pop
+        // those off to get to it.
+        while !job_b.latch.probe() {
+            if let Some(job) = worker_thread.take_local_job() {
+                if job_b_id == job.id() {
+                    // Found it! Let's run it.
+                    //
+                    // Note that this could panic, but it's ok if we unwind here.
+                    let result_b = job_b.run_inline(injected);
+                    return (result_a, result_b);
+                } else {
+                    worker_thread.execute(job);
+                }
+            } else {
+                // Local deque is empty. Time to steal from other
+                // threads.
+                worker_thread.wait_until(&job_b.latch);
+                debug_assert!(job_b.latch.probe());
+                break;
+            }
+        }
+
+        (result_a, job_b.into_result())
+    })
+}
+
+/// If job A panics, we still cannot return until we are sure that job
+/// B is complete. This is because it may contain references into the
+/// enclosing stack frame(s).
+#[cold] // cold path
+unsafe fn join_recover_from_panic(
+    worker_thread: &WorkerThread,
+    job_b_latch: &SpinLatch<'_>,
+    err: Box<dyn Any + Send>,
+) -> ! {
+    worker_thread.wait_until(job_b_latch);
+    unwind::resume_unwinding(err)
+}
+
\ No newline at end of file diff --git a/src/rayon_core/latch.rs.html b/src/rayon_core/latch.rs.html new file mode 100644 index 0000000000..1d3d87daee --- /dev/null +++ b/src/rayon_core/latch.rs.html @@ -0,0 +1,925 @@ +latch.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+
use std::marker::PhantomData;
+use std::ops::Deref;
+use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::Arc;
+use std::usize;
+
+use crate::registry::{Registry, WorkerThread};
+use crate::sync::{Condvar, Mutex};
+
+/// We define various kinds of latches, which are all a primitive signaling
+/// mechanism. A latch starts as false. Eventually someone calls `set()` and
+/// it becomes true. You can test if it has been set by calling `probe()`.
+///
+/// Some kinds of latches, but not all, support a `wait()` operation
+/// that will wait until the latch is set, blocking efficiently. That
+/// is not part of the trait since it is not possibly to do with all
+/// latches.
+///
+/// The intention is that `set()` is called once, but `probe()` may be
+/// called any number of times. Once `probe()` returns true, the memory
+/// effects that occurred before `set()` become visible.
+///
+/// It'd probably be better to refactor the API into two paired types,
+/// but that's a bit of work, and this is not a public API.
+///
+/// ## Memory ordering
+///
+/// Latches need to guarantee two things:
+///
+/// - Once `probe()` returns true, all memory effects from the `set()`
+///   are visible (in other words, the set should synchronize-with
+///   the probe).
+/// - Once `set()` occurs, the next `probe()` *will* observe it.  This
+///   typically requires a seq-cst ordering. See [the "tickle-then-get-sleepy" scenario in the sleep
+///   README](/src/sleep/README.md#tickle-then-get-sleepy) for details.
+pub(super) trait Latch {
+    /// Set the latch, signalling others.
+    ///
+    /// # WARNING
+    ///
+    /// Setting a latch triggers other threads to wake up and (in some
+    /// cases) complete. This may, in turn, cause memory to be
+    /// deallocated and so forth. One must be very careful about this,
+    /// and it's typically better to read all the fields you will need
+    /// to access *before* a latch is set!
+    ///
+    /// This function operates on `*const Self` instead of `&self` to allow it
+    /// to become dangling during this call. The caller must ensure that the
+    /// pointer is valid upon entry, and not invalidated during the call by any
+    /// actions other than `set` itself.
+    unsafe fn set(this: *const Self);
+}
+
+pub(super) trait AsCoreLatch {
+    fn as_core_latch(&self) -> &CoreLatch;
+}
+
+/// Latch is not set, owning thread is awake
+const UNSET: usize = 0;
+
+/// Latch is not set, owning thread is going to sleep on this latch
+/// (but has not yet fallen asleep).
+const SLEEPY: usize = 1;
+
+/// Latch is not set, owning thread is asleep on this latch and
+/// must be awoken.
+const SLEEPING: usize = 2;
+
+/// Latch is set.
+const SET: usize = 3;
+
+/// Spin latches are the simplest, most efficient kind, but they do
+/// not support a `wait()` operation. They just have a boolean flag
+/// that becomes true when `set()` is called.
+#[derive(Debug)]
+pub(super) struct CoreLatch {
+    state: AtomicUsize,
+}
+
+impl CoreLatch {
+    #[inline]
+    fn new() -> Self {
+        Self {
+            state: AtomicUsize::new(0),
+        }
+    }
+
+    /// Invoked by owning thread as it prepares to sleep. Returns true
+    /// if the owning thread may proceed to fall asleep, false if the
+    /// latch was set in the meantime.
+    #[inline]
+    pub(super) fn get_sleepy(&self) -> bool {
+        self.state
+            .compare_exchange(UNSET, SLEEPY, Ordering::SeqCst, Ordering::Relaxed)
+            .is_ok()
+    }
+
+    /// Invoked by owning thread as it falls asleep sleep. Returns
+    /// true if the owning thread should block, or false if the latch
+    /// was set in the meantime.
+    #[inline]
+    pub(super) fn fall_asleep(&self) -> bool {
+        self.state
+            .compare_exchange(SLEEPY, SLEEPING, Ordering::SeqCst, Ordering::Relaxed)
+            .is_ok()
+    }
+
+    /// Invoked by owning thread as it falls asleep sleep. Returns
+    /// true if the owning thread should block, or false if the latch
+    /// was set in the meantime.
+    #[inline]
+    pub(super) fn wake_up(&self) {
+        if !self.probe() {
+            let _ =
+                self.state
+                    .compare_exchange(SLEEPING, UNSET, Ordering::SeqCst, Ordering::Relaxed);
+        }
+    }
+
+    /// Set the latch. If this returns true, the owning thread was sleeping
+    /// and must be awoken.
+    ///
+    /// This is private because, typically, setting a latch involves
+    /// doing some wakeups; those are encapsulated in the surrounding
+    /// latch code.
+    #[inline]
+    unsafe fn set(this: *const Self) -> bool {
+        let old_state = (*this).state.swap(SET, Ordering::AcqRel);
+        old_state == SLEEPING
+    }
+
+    /// Test if this latch has been set.
+    #[inline]
+    pub(super) fn probe(&self) -> bool {
+        self.state.load(Ordering::Acquire) == SET
+    }
+}
+
+impl AsCoreLatch for CoreLatch {
+    #[inline]
+    fn as_core_latch(&self) -> &CoreLatch {
+        self
+    }
+}
+
+/// Spin latches are the simplest, most efficient kind, but they do
+/// not support a `wait()` operation. They just have a boolean flag
+/// that becomes true when `set()` is called.
+pub(super) struct SpinLatch<'r> {
+    core_latch: CoreLatch,
+    registry: &'r Arc<Registry>,
+    target_worker_index: usize,
+    cross: bool,
+}
+
+impl<'r> SpinLatch<'r> {
+    /// Creates a new spin latch that is owned by `thread`. This means
+    /// that `thread` is the only thread that should be blocking on
+    /// this latch -- it also means that when the latch is set, we
+    /// will wake `thread` if it is sleeping.
+    #[inline]
+    pub(super) fn new(thread: &'r WorkerThread) -> SpinLatch<'r> {
+        SpinLatch {
+            core_latch: CoreLatch::new(),
+            registry: thread.registry(),
+            target_worker_index: thread.index(),
+            cross: false,
+        }
+    }
+
+    /// Creates a new spin latch for cross-threadpool blocking.  Notably, we
+    /// need to make sure the registry is kept alive after setting, so we can
+    /// safely call the notification.
+    #[inline]
+    pub(super) fn cross(thread: &'r WorkerThread) -> SpinLatch<'r> {
+        SpinLatch {
+            cross: true,
+            ..SpinLatch::new(thread)
+        }
+    }
+
+    #[inline]
+    pub(super) fn probe(&self) -> bool {
+        self.core_latch.probe()
+    }
+}
+
+impl<'r> AsCoreLatch for SpinLatch<'r> {
+    #[inline]
+    fn as_core_latch(&self) -> &CoreLatch {
+        &self.core_latch
+    }
+}
+
+impl<'r> Latch for SpinLatch<'r> {
+    #[inline]
+    unsafe fn set(this: *const Self) {
+        let cross_registry;
+
+        let registry: &Registry = if (*this).cross {
+            // Ensure the registry stays alive while we notify it.
+            // Otherwise, it would be possible that we set the spin
+            // latch and the other thread sees it and exits, causing
+            // the registry to be deallocated, all before we get a
+            // chance to invoke `registry.notify_worker_latch_is_set`.
+            cross_registry = Arc::clone((*this).registry);
+            &cross_registry
+        } else {
+            // If this is not a "cross-registry" spin-latch, then the
+            // thread which is performing `set` is itself ensuring
+            // that the registry stays alive. However, that doesn't
+            // include this *particular* `Arc` handle if the waiting
+            // thread then exits, so we must completely dereference it.
+            (*this).registry
+        };
+        let target_worker_index = (*this).target_worker_index;
+
+        // NOTE: Once we `set`, the target may proceed and invalidate `this`!
+        if CoreLatch::set(&(*this).core_latch) {
+            // Subtle: at this point, we can no longer read from
+            // `self`, because the thread owning this spin latch may
+            // have awoken and deallocated the latch. Therefore, we
+            // only use fields whose values we already read.
+            registry.notify_worker_latch_is_set(target_worker_index);
+        }
+    }
+}
+
+/// A Latch starts as false and eventually becomes true. You can block
+/// until it becomes true.
+#[derive(Debug)]
+pub(super) struct LockLatch {
+    m: Mutex<bool>,
+    v: Condvar,
+}
+
+impl LockLatch {
+    #[inline]
+    pub(super) fn new() -> LockLatch {
+        LockLatch {
+            m: Mutex::new(false),
+            v: Condvar::new(),
+        }
+    }
+
+    /// Block until latch is set, then resets this lock latch so it can be reused again.
+    pub(super) fn wait_and_reset(&self) {
+        let mut guard = self.m.lock().unwrap();
+        while !*guard {
+            guard = self.v.wait(guard).unwrap();
+        }
+        *guard = false;
+    }
+
+    /// Block until latch is set.
+    pub(super) fn wait(&self) {
+        let mut guard = self.m.lock().unwrap();
+        while !*guard {
+            guard = self.v.wait(guard).unwrap();
+        }
+    }
+}
+
+impl Latch for LockLatch {
+    #[inline]
+    unsafe fn set(this: *const Self) {
+        let mut guard = (*this).m.lock().unwrap();
+        *guard = true;
+        (*this).v.notify_all();
+    }
+}
+
+/// Once latches are used to implement one-time blocking, primarily
+/// for the termination flag of the threads in the pool.
+///
+/// Note: like a `SpinLatch`, once-latches are always associated with
+/// some registry that is probing them, which must be tickled when
+/// they are set. *Unlike* a `SpinLatch`, they don't themselves hold a
+/// reference to that registry. This is because in some cases the
+/// registry owns the once-latch, and that would create a cycle. So a
+/// `OnceLatch` must be given a reference to its owning registry when
+/// it is set. For this reason, it does not implement the `Latch`
+/// trait (but it doesn't have to, as it is not used in those generic
+/// contexts).
+#[derive(Debug)]
+pub(super) struct OnceLatch {
+    core_latch: CoreLatch,
+}
+
+impl OnceLatch {
+    #[inline]
+    pub(super) fn new() -> OnceLatch {
+        Self {
+            core_latch: CoreLatch::new(),
+        }
+    }
+
+    /// Set the latch, then tickle the specific worker thread,
+    /// which should be the one that owns this latch.
+    #[inline]
+    pub(super) unsafe fn set_and_tickle_one(
+        this: *const Self,
+        registry: &Registry,
+        target_worker_index: usize,
+    ) {
+        if CoreLatch::set(&(*this).core_latch) {
+            registry.notify_worker_latch_is_set(target_worker_index);
+        }
+    }
+}
+
+impl AsCoreLatch for OnceLatch {
+    #[inline]
+    fn as_core_latch(&self) -> &CoreLatch {
+        &self.core_latch
+    }
+}
+
+/// Counting latches are used to implement scopes. They track a
+/// counter. Unlike other latches, calling `set()` does not
+/// necessarily make the latch be considered `set()`; instead, it just
+/// decrements the counter. The latch is only "set" (in the sense that
+/// `probe()` returns true) once the counter reaches zero.
+#[derive(Debug)]
+pub(super) struct CountLatch {
+    counter: AtomicUsize,
+    kind: CountLatchKind,
+}
+
+enum CountLatchKind {
+    /// A latch for scopes created on a rayon thread which will participate in work-
+    /// stealing while it waits for completion. This thread is not necessarily part
+    /// of the same registry as the scope itself!
+    Stealing {
+        latch: CoreLatch,
+        /// If a worker thread in registry A calls `in_place_scope` on a ThreadPool
+        /// with registry B, when a job completes in a thread of registry B, we may
+        /// need to call `notify_worker_latch_is_set()` to wake the thread in registry A.
+        /// That means we need a reference to registry A (since at that point we will
+        /// only have a reference to registry B), so we stash it here.
+        registry: Arc<Registry>,
+        /// The index of the worker to wake in `registry`
+        worker_index: usize,
+    },
+
+    /// A latch for scopes created on a non-rayon thread which will block to wait.
+    Blocking { latch: LockLatch },
+}
+
+impl std::fmt::Debug for CountLatchKind {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            CountLatchKind::Stealing { latch, .. } => {
+                f.debug_tuple("Stealing").field(latch).finish()
+            }
+            CountLatchKind::Blocking { latch, .. } => {
+                f.debug_tuple("Blocking").field(latch).finish()
+            }
+        }
+    }
+}
+
+impl CountLatch {
+    pub(super) fn new(owner: Option<&WorkerThread>) -> Self {
+        Self::with_count(1, owner)
+    }
+
+    pub(super) fn with_count(count: usize, owner: Option<&WorkerThread>) -> Self {
+        Self {
+            counter: AtomicUsize::new(count),
+            kind: match owner {
+                Some(owner) => CountLatchKind::Stealing {
+                    latch: CoreLatch::new(),
+                    registry: Arc::clone(owner.registry()),
+                    worker_index: owner.index(),
+                },
+                None => CountLatchKind::Blocking {
+                    latch: LockLatch::new(),
+                },
+            },
+        }
+    }
+
+    #[inline]
+    pub(super) fn increment(&self) {
+        let old_counter = self.counter.fetch_add(1, Ordering::Relaxed);
+        debug_assert!(old_counter != 0);
+    }
+
+    pub(super) fn wait(&self, owner: Option<&WorkerThread>) {
+        match &self.kind {
+            CountLatchKind::Stealing {
+                latch,
+                registry,
+                worker_index,
+            } => unsafe {
+                let owner = owner.expect("owner thread");
+                debug_assert_eq!(registry.id(), owner.registry().id());
+                debug_assert_eq!(*worker_index, owner.index());
+                owner.wait_until(latch);
+            },
+            CountLatchKind::Blocking { latch } => latch.wait(),
+        }
+    }
+}
+
+impl Latch for CountLatch {
+    #[inline]
+    unsafe fn set(this: *const Self) {
+        if (*this).counter.fetch_sub(1, Ordering::SeqCst) == 1 {
+            // NOTE: Once we call `set` on the internal `latch`,
+            // the target may proceed and invalidate `this`!
+            match (*this).kind {
+                CountLatchKind::Stealing {
+                    ref latch,
+                    ref registry,
+                    worker_index,
+                } => {
+                    let registry = Arc::clone(registry);
+                    if CoreLatch::set(latch) {
+                        registry.notify_worker_latch_is_set(worker_index);
+                    }
+                }
+                CountLatchKind::Blocking { ref latch } => LockLatch::set(latch),
+            }
+        }
+    }
+}
+
+/// `&L` without any implication of `dereferenceable` for `Latch::set`
+pub(super) struct LatchRef<'a, L> {
+    inner: *const L,
+    marker: PhantomData<&'a L>,
+}
+
+impl<L> LatchRef<'_, L> {
+    pub(super) fn new(inner: &L) -> LatchRef<'_, L> {
+        LatchRef {
+            inner,
+            marker: PhantomData,
+        }
+    }
+}
+
+unsafe impl<L: Sync> Sync for LatchRef<'_, L> {}
+
+impl<L> Deref for LatchRef<'_, L> {
+    type Target = L;
+
+    fn deref(&self) -> &L {
+        // SAFETY: if we have &self, the inner latch is still alive
+        unsafe { &*self.inner }
+    }
+}
+
+impl<L: Latch> Latch for LatchRef<'_, L> {
+    #[inline]
+    unsafe fn set(this: *const Self) {
+        L::set((*this).inner);
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/lib.rs.html b/src/rayon_core/lib.rs.html new file mode 100644 index 0000000000..59c6cfb336 --- /dev/null +++ b/src/rayon_core/lib.rs.html @@ -0,0 +1,1753 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+
//! Rayon-core houses the core stable APIs of Rayon.
+//!
+//! These APIs have been mirrored in the Rayon crate and it is recommended to use these from there.
+//!
+//! [`join`] is used to take two closures and potentially run them in parallel.
+//!   - It will run in parallel if task B gets stolen before task A can finish.
+//!   - It will run sequentially if task A finishes before task B is stolen and can continue on task B.
+//!
+//! [`scope`] creates a scope in which you can run any number of parallel tasks.
+//! These tasks can spawn nested tasks and scopes, but given the nature of work stealing, the order of execution can not be guaranteed.
+//! The scope will exist until all tasks spawned within the scope have been completed.
+//!
+//! [`spawn`] add a task into the 'static' or 'global' scope, or a local scope created by the [`scope()`] function.
+//!
+//! [`ThreadPool`] can be used to create your own thread pools (using [`ThreadPoolBuilder`]) or to customize the global one.
+//! Tasks spawned within the pool (using [`install()`], [`join()`], etc.) will be added to a deque,
+//! where it becomes available for work stealing from other threads in the local threadpool.
+//!
+//! [`join`]: fn.join.html
+//! [`scope`]: fn.scope.html
+//! [`scope()`]: fn.scope.html
+//! [`spawn`]: fn.spawn.html
+//! [`ThreadPool`]: struct.threadpool.html
+//! [`install()`]: struct.ThreadPool.html#method.install
+//! [`spawn()`]: struct.ThreadPool.html#method.spawn
+//! [`join()`]: struct.ThreadPool.html#method.join
+//! [`ThreadPoolBuilder`]: struct.ThreadPoolBuilder.html
+//!
+//! # Global fallback when threading is unsupported
+//!
+//! Rayon uses `std` APIs for threading, but some targets have incomplete implementations that
+//! always return `Unsupported` errors. The WebAssembly `wasm32-unknown-unknown` and `wasm32-wasi`
+//! targets are notable examples of this. Rather than panicking on the unsupported error when
+//! creating the implicit global threadpool, Rayon configures a fallback mode instead.
+//!
+//! This fallback mode mostly functions as if it were using a single-threaded "pool", like setting
+//! `RAYON_NUM_THREADS=1`. For example, `join` will execute its two closures sequentially, since
+//! there is no other thread to share the work. However, since the pool is not running independent
+//! of the main thread, non-blocking calls like `spawn` may not execute at all, unless a lower-
+//! priority call like `broadcast` gives them an opening. The fallback mode does not try to emulate
+//! anything like thread preemption or `async` task switching, but `yield_now` or `yield_local`
+//! can also volunteer execution time.
+//!
+//! Explicit `ThreadPoolBuilder` methods always report their error without any fallback.
+//!
+//! # Restricting multiple versions
+//!
+//! In order to ensure proper coordination between threadpools, and especially
+//! to make sure there's only one global threadpool, `rayon-core` is actively
+//! restricted from building multiple versions of itself into a single target.
+//! You may see a build error like this in violation:
+//!
+//! ```text
+//! error: native library `rayon-core` is being linked to by more
+//! than one package, and can only be linked to by one package
+//! ```
+//!
+//! While we strive to keep `rayon-core` semver-compatible, it's still
+//! possible to arrive at this situation if different crates have overly
+//! restrictive tilde or inequality requirements for `rayon-core`.  The
+//! conflicting requirements will need to be resolved before the build will
+//! succeed.
+
+#![deny(missing_debug_implementations)]
+#![deny(missing_docs)]
+#![deny(unreachable_pub)]
+#![warn(rust_2018_idioms)]
+
+use std::any::Any;
+use std::env;
+use std::error::Error;
+use std::fmt;
+use std::io;
+use std::marker::PhantomData;
+use std::str::FromStr;
+use std::thread;
+
+#[macro_use]
+mod private;
+
+mod broadcast;
+mod job;
+mod join;
+mod latch;
+mod registry;
+mod scope;
+mod sleep;
+mod spawn;
+mod thread_pool;
+mod unwind;
+
+mod compile_fail;
+mod test;
+
+pub use self::broadcast::{broadcast, spawn_broadcast, BroadcastContext};
+pub use self::join::{join, join_context};
+pub use self::registry::ThreadBuilder;
+pub use self::scope::{in_place_scope, scope, Scope};
+pub use self::scope::{in_place_scope_fifo, scope_fifo, ScopeFifo};
+pub use self::spawn::{spawn, spawn_fifo};
+pub use self::thread_pool::current_thread_has_pending_tasks;
+pub use self::thread_pool::current_thread_index;
+pub use self::thread_pool::ThreadPool;
+pub use self::thread_pool::{yield_local, yield_now, Yield};
+
+#[cfg(not(feature = "web_spin_lock"))]
+use std::sync;
+
+#[cfg(feature = "web_spin_lock")]
+use wasm_sync as sync;
+
+use self::registry::{CustomSpawn, DefaultSpawn, ThreadSpawn};
+
+/// Returns the maximum number of threads that Rayon supports in a single thread-pool.
+///
+/// If a higher thread count is requested by calling `ThreadPoolBuilder::num_threads` or by setting
+/// the `RAYON_NUM_THREADS` environment variable, then it will be reduced to this maximum.
+///
+/// The value may vary between different targets, and is subject to change in new Rayon versions.
+pub fn max_num_threads() -> usize {
+    // We are limited by the bits available in the sleep counter's `AtomicUsize`.
+    crate::sleep::THREADS_MAX
+}
+
+/// Returns the number of threads in the current registry. If this
+/// code is executing within a Rayon thread-pool, then this will be
+/// the number of threads for the thread-pool of the current
+/// thread. Otherwise, it will be the number of threads for the global
+/// thread-pool.
+///
+/// This can be useful when trying to judge how many times to split
+/// parallel work (the parallel iterator traits use this value
+/// internally for this purpose).
+///
+/// # Future compatibility note
+///
+/// Note that unless this thread-pool was created with a
+/// builder that specifies the number of threads, then this
+/// number may vary over time in future versions (see [the
+/// `num_threads()` method for details][snt]).
+///
+/// [snt]: struct.ThreadPoolBuilder.html#method.num_threads
+pub fn current_num_threads() -> usize {
+    crate::registry::Registry::current_num_threads()
+}
+
+/// Error when initializing a thread pool.
+#[derive(Debug)]
+pub struct ThreadPoolBuildError {
+    kind: ErrorKind,
+}
+
+#[derive(Debug)]
+enum ErrorKind {
+    GlobalPoolAlreadyInitialized,
+    CurrentThreadAlreadyInPool,
+    IOError(io::Error),
+}
+
+/// Used to create a new [`ThreadPool`] or to configure the global rayon thread pool.
+/// ## Creating a ThreadPool
+/// The following creates a thread pool with 22 threads.
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// let pool = rayon::ThreadPoolBuilder::new().num_threads(22).build().unwrap();
+/// ```
+///
+/// To instead configure the global thread pool, use [`build_global()`]:
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// rayon::ThreadPoolBuilder::new().num_threads(22).build_global().unwrap();
+/// ```
+///
+/// [`ThreadPool`]: struct.ThreadPool.html
+/// [`build_global()`]: struct.ThreadPoolBuilder.html#method.build_global
+pub struct ThreadPoolBuilder<S = DefaultSpawn> {
+    /// The number of threads in the rayon thread pool.
+    /// If zero will use the RAYON_NUM_THREADS environment variable.
+    /// If RAYON_NUM_THREADS is invalid or zero will use the default.
+    num_threads: usize,
+
+    /// The thread we're building *from* will also be part of the pool.
+    use_current_thread: bool,
+
+    /// Custom closure, if any, to handle a panic that we cannot propagate
+    /// anywhere else.
+    panic_handler: Option<Box<PanicHandler>>,
+
+    /// Closure to compute the name of a thread.
+    get_thread_name: Option<Box<dyn FnMut(usize) -> String>>,
+
+    /// The stack size for the created worker threads
+    stack_size: Option<usize>,
+
+    /// Closure invoked on worker thread start.
+    start_handler: Option<Box<StartHandler>>,
+
+    /// Closure invoked on worker thread exit.
+    exit_handler: Option<Box<ExitHandler>>,
+
+    /// Closure invoked to spawn threads.
+    spawn_handler: S,
+
+    /// If false, worker threads will execute spawned jobs in a
+    /// "depth-first" fashion. If true, they will do a "breadth-first"
+    /// fashion. Depth-first is the default.
+    breadth_first: bool,
+}
+
+/// Contains the rayon thread pool configuration. Use [`ThreadPoolBuilder`] instead.
+///
+/// [`ThreadPoolBuilder`]: struct.ThreadPoolBuilder.html
+#[deprecated(note = "Use `ThreadPoolBuilder`")]
+#[derive(Default)]
+pub struct Configuration {
+    builder: ThreadPoolBuilder,
+}
+
+/// The type for a panic handling closure. Note that this same closure
+/// may be invoked multiple times in parallel.
+type PanicHandler = dyn Fn(Box<dyn Any + Send>) + Send + Sync;
+
+/// The type for a closure that gets invoked when a thread starts. The
+/// closure is passed the index of the thread on which it is invoked.
+/// Note that this same closure may be invoked multiple times in parallel.
+type StartHandler = dyn Fn(usize) + Send + Sync;
+
+/// The type for a closure that gets invoked when a thread exits. The
+/// closure is passed the index of the thread on which is is invoked.
+/// Note that this same closure may be invoked multiple times in parallel.
+type ExitHandler = dyn Fn(usize) + Send + Sync;
+
+// NB: We can't `#[derive(Default)]` because `S` is left ambiguous.
+impl Default for ThreadPoolBuilder {
+    fn default() -> Self {
+        ThreadPoolBuilder {
+            num_threads: 0,
+            use_current_thread: false,
+            panic_handler: None,
+            get_thread_name: None,
+            stack_size: None,
+            start_handler: None,
+            exit_handler: None,
+            spawn_handler: DefaultSpawn,
+            breadth_first: false,
+        }
+    }
+}
+
+impl ThreadPoolBuilder {
+    /// Creates and returns a valid rayon thread pool builder, but does not initialize it.
+    pub fn new() -> Self {
+        Self::default()
+    }
+}
+
+/// Note: the `S: ThreadSpawn` constraint is an internal implementation detail for the
+/// default spawn and those set by [`spawn_handler`](#method.spawn_handler).
+impl<S> ThreadPoolBuilder<S>
+where
+    S: ThreadSpawn,
+{
+    /// Creates a new `ThreadPool` initialized using this configuration.
+    pub fn build(self) -> Result<ThreadPool, ThreadPoolBuildError> {
+        ThreadPool::build(self)
+    }
+
+    /// Initializes the global thread pool. This initialization is
+    /// **optional**.  If you do not call this function, the thread pool
+    /// will be automatically initialized with the default
+    /// configuration. Calling `build_global` is not recommended, except
+    /// in two scenarios:
+    ///
+    /// - You wish to change the default configuration.
+    /// - You are running a benchmark, in which case initializing may
+    ///   yield slightly more consistent results, since the worker threads
+    ///   will already be ready to go even in the first iteration.  But
+    ///   this cost is minimal.
+    ///
+    /// Initialization of the global thread pool happens exactly
+    /// once. Once started, the configuration cannot be
+    /// changed. Therefore, if you call `build_global` a second time, it
+    /// will return an error. An `Ok` result indicates that this
+    /// is the first initialization of the thread pool.
+    pub fn build_global(self) -> Result<(), ThreadPoolBuildError> {
+        let registry = registry::init_global_registry(self)?;
+        registry.wait_until_primed();
+        Ok(())
+    }
+}
+
+impl ThreadPoolBuilder {
+    /// Creates a scoped `ThreadPool` initialized using this configuration.
+    ///
+    /// This is a convenience function for building a pool using [`std::thread::scope`]
+    /// to spawn threads in a [`spawn_handler`](#method.spawn_handler).
+    /// The threads in this pool will start by calling `wrapper`, which should
+    /// do initialization and continue by calling `ThreadBuilder::run()`.
+    ///
+    /// [`std::thread::scope`]: https://doc.rust-lang.org/std/thread/fn.scope.html
+    ///
+    /// # Examples
+    ///
+    /// A scoped pool may be useful in combination with scoped thread-local variables.
+    ///
+    /// ```
+    /// # use rayon_core as rayon;
+    ///
+    /// scoped_tls::scoped_thread_local!(static POOL_DATA: Vec<i32>);
+    ///
+    /// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    ///     let pool_data = vec![1, 2, 3];
+    ///
+    ///     // We haven't assigned any TLS data yet.
+    ///     assert!(!POOL_DATA.is_set());
+    ///
+    ///     rayon::ThreadPoolBuilder::new()
+    ///         .build_scoped(
+    ///             // Borrow `pool_data` in TLS for each thread.
+    ///             |thread| POOL_DATA.set(&pool_data, || thread.run()),
+    ///             // Do some work that needs the TLS data.
+    ///             |pool| pool.install(|| assert!(POOL_DATA.is_set())),
+    ///         )?;
+    ///
+    ///     // Once we've returned, `pool_data` is no longer borrowed.
+    ///     drop(pool_data);
+    ///     Ok(())
+    /// }
+    /// ```
+    pub fn build_scoped<W, F, R>(self, wrapper: W, with_pool: F) -> Result<R, ThreadPoolBuildError>
+    where
+        W: Fn(ThreadBuilder) + Sync, // expected to call `run()`
+        F: FnOnce(&ThreadPool) -> R,
+    {
+        std::thread::scope(|scope| {
+            let pool = self
+                .spawn_handler(|thread| {
+                    let mut builder = std::thread::Builder::new();
+                    if let Some(name) = thread.name() {
+                        builder = builder.name(name.to_string());
+                    }
+                    if let Some(size) = thread.stack_size() {
+                        builder = builder.stack_size(size);
+                    }
+                    builder.spawn_scoped(scope, || wrapper(thread))?;
+                    Ok(())
+                })
+                .build()?;
+            Ok(with_pool(&pool))
+        })
+    }
+}
+
+impl<S> ThreadPoolBuilder<S> {
+    /// Sets a custom function for spawning threads.
+    ///
+    /// Note that the threads will not exit until after the pool is dropped. It
+    /// is up to the caller to wait for thread termination if that is important
+    /// for any invariants. For instance, threads created in [`std::thread::scope`]
+    /// will be joined before that scope returns, and this will block indefinitely
+    /// if the pool is leaked. Furthermore, the global thread pool doesn't terminate
+    /// until the entire process exits!
+    ///
+    /// # Examples
+    ///
+    /// A minimal spawn handler just needs to call `run()` from an independent thread.
+    ///
+    /// ```
+    /// # use rayon_core as rayon;
+    /// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    ///     let pool = rayon::ThreadPoolBuilder::new()
+    ///         .spawn_handler(|thread| {
+    ///             std::thread::spawn(|| thread.run());
+    ///             Ok(())
+    ///         })
+    ///         .build()?;
+    ///
+    ///     pool.install(|| println!("Hello from my custom thread!"));
+    ///     Ok(())
+    /// }
+    /// ```
+    ///
+    /// The default spawn handler sets the name and stack size if given, and propagates
+    /// any errors from the thread builder.
+    ///
+    /// ```
+    /// # use rayon_core as rayon;
+    /// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    ///     let pool = rayon::ThreadPoolBuilder::new()
+    ///         .spawn_handler(|thread| {
+    ///             let mut b = std::thread::Builder::new();
+    ///             if let Some(name) = thread.name() {
+    ///                 b = b.name(name.to_owned());
+    ///             }
+    ///             if let Some(stack_size) = thread.stack_size() {
+    ///                 b = b.stack_size(stack_size);
+    ///             }
+    ///             b.spawn(|| thread.run())?;
+    ///             Ok(())
+    ///         })
+    ///         .build()?;
+    ///
+    ///     pool.install(|| println!("Hello from my fully custom thread!"));
+    ///     Ok(())
+    /// }
+    /// ```
+    ///
+    /// This can also be used for a pool of scoped threads like [`crossbeam::scope`],
+    /// or [`std::thread::scope`] introduced in Rust 1.63, which is encapsulated in
+    /// [`build_scoped`](#method.build_scoped).
+    ///
+    /// [`crossbeam::scope`]: https://docs.rs/crossbeam/0.8/crossbeam/fn.scope.html
+    /// [`std::thread::scope`]: https://doc.rust-lang.org/std/thread/fn.scope.html
+    ///
+    /// ```
+    /// # use rayon_core as rayon;
+    /// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
+    ///     std::thread::scope(|scope| {
+    ///         let pool = rayon::ThreadPoolBuilder::new()
+    ///             .spawn_handler(|thread| {
+    ///                 let mut builder = std::thread::Builder::new();
+    ///                 if let Some(name) = thread.name() {
+    ///                     builder = builder.name(name.to_string());
+    ///                 }
+    ///                 if let Some(size) = thread.stack_size() {
+    ///                     builder = builder.stack_size(size);
+    ///                 }
+    ///                 builder.spawn_scoped(scope, || {
+    ///                     // Add any scoped initialization here, then run!
+    ///                     thread.run()
+    ///                 })?;
+    ///                 Ok(())
+    ///             })
+    ///             .build()?;
+    ///
+    ///         pool.install(|| println!("Hello from my custom scoped thread!"));
+    ///         Ok(())
+    ///     })
+    /// }
+    /// ```
+    pub fn spawn_handler<F>(self, spawn: F) -> ThreadPoolBuilder<CustomSpawn<F>>
+    where
+        F: FnMut(ThreadBuilder) -> io::Result<()>,
+    {
+        ThreadPoolBuilder {
+            spawn_handler: CustomSpawn::new(spawn),
+            // ..self
+            num_threads: self.num_threads,
+            use_current_thread: self.use_current_thread,
+            panic_handler: self.panic_handler,
+            get_thread_name: self.get_thread_name,
+            stack_size: self.stack_size,
+            start_handler: self.start_handler,
+            exit_handler: self.exit_handler,
+            breadth_first: self.breadth_first,
+        }
+    }
+
+    /// Returns a reference to the current spawn handler.
+    fn get_spawn_handler(&mut self) -> &mut S {
+        &mut self.spawn_handler
+    }
+
+    /// Get the number of threads that will be used for the thread
+    /// pool. See `num_threads()` for more information.
+    fn get_num_threads(&self) -> usize {
+        if self.num_threads > 0 {
+            self.num_threads
+        } else {
+            let default = || {
+                thread::available_parallelism()
+                    .map(|n| n.get())
+                    .unwrap_or(1)
+            };
+
+            match env::var("RAYON_NUM_THREADS")
+                .ok()
+                .and_then(|s| usize::from_str(&s).ok())
+            {
+                Some(x @ 1..) => return x,
+                Some(0) => return default(),
+                _ => {}
+            }
+
+            // Support for deprecated `RAYON_RS_NUM_CPUS`.
+            match env::var("RAYON_RS_NUM_CPUS")
+                .ok()
+                .and_then(|s| usize::from_str(&s).ok())
+            {
+                Some(x @ 1..) => x,
+                _ => default(),
+            }
+        }
+    }
+
+    /// Get the thread name for the thread with the given index.
+    fn get_thread_name(&mut self, index: usize) -> Option<String> {
+        let f = self.get_thread_name.as_mut()?;
+        Some(f(index))
+    }
+
+    /// Sets a closure which takes a thread index and returns
+    /// the thread's name.
+    pub fn thread_name<F>(mut self, closure: F) -> Self
+    where
+        F: FnMut(usize) -> String + 'static,
+    {
+        self.get_thread_name = Some(Box::new(closure));
+        self
+    }
+
+    /// Sets the number of threads to be used in the rayon threadpool.
+    ///
+    /// If you specify a non-zero number of threads using this
+    /// function, then the resulting thread-pools are guaranteed to
+    /// start at most this number of threads.
+    ///
+    /// If `num_threads` is 0, or you do not call this function, then
+    /// the Rayon runtime will select the number of threads
+    /// automatically. At present, this is based on the
+    /// `RAYON_NUM_THREADS` environment variable (if set),
+    /// or the number of logical CPUs (otherwise).
+    /// In the future, however, the default behavior may
+    /// change to dynamically add or remove threads as needed.
+    ///
+    /// **Future compatibility warning:** Given the default behavior
+    /// may change in the future, if you wish to rely on a fixed
+    /// number of threads, you should use this function to specify
+    /// that number. To reproduce the current default behavior, you
+    /// may wish to use [`std::thread::available_parallelism`]
+    /// to query the number of CPUs dynamically.
+    ///
+    /// **Old environment variable:** `RAYON_NUM_THREADS` is a one-to-one
+    /// replacement of the now deprecated `RAYON_RS_NUM_CPUS` environment
+    /// variable. If both variables are specified, `RAYON_NUM_THREADS` will
+    /// be preferred.
+    pub fn num_threads(mut self, num_threads: usize) -> Self {
+        self.num_threads = num_threads;
+        self
+    }
+
+    /// Use the current thread as one of the threads in the pool.
+    ///
+    /// The current thread is guaranteed to be at index 0, and since the thread is not managed by
+    /// rayon, the spawn and exit handlers do not run for that thread.
+    ///
+    /// Note that the current thread won't run the main work-stealing loop, so jobs spawned into
+    /// the thread-pool will generally not be picked up automatically by this thread unless you
+    /// yield to rayon in some way, like via [`yield_now()`], [`yield_local()`], or [`scope()`].
+    ///
+    /// # Local thread-pools
+    ///
+    /// Using this in a local thread-pool means the registry will be leaked. In future versions
+    /// there might be a way of cleaning up the current-thread state.
+    pub fn use_current_thread(mut self) -> Self {
+        self.use_current_thread = true;
+        self
+    }
+
+    /// Returns a copy of the current panic handler.
+    fn take_panic_handler(&mut self) -> Option<Box<PanicHandler>> {
+        self.panic_handler.take()
+    }
+
+    /// Normally, whenever Rayon catches a panic, it tries to
+    /// propagate it to someplace sensible, to try and reflect the
+    /// semantics of sequential execution. But in some cases,
+    /// particularly with the `spawn()` APIs, there is no
+    /// obvious place where we should propagate the panic to.
+    /// In that case, this panic handler is invoked.
+    ///
+    /// If no panic handler is set, the default is to abort the
+    /// process, under the principle that panics should not go
+    /// unobserved.
+    ///
+    /// If the panic handler itself panics, this will abort the
+    /// process. To prevent this, wrap the body of your panic handler
+    /// in a call to `std::panic::catch_unwind()`.
+    pub fn panic_handler<H>(mut self, panic_handler: H) -> Self
+    where
+        H: Fn(Box<dyn Any + Send>) + Send + Sync + 'static,
+    {
+        self.panic_handler = Some(Box::new(panic_handler));
+        self
+    }
+
+    /// Get the stack size of the worker threads
+    fn get_stack_size(&self) -> Option<usize> {
+        self.stack_size
+    }
+
+    /// Sets the stack size of the worker threads
+    pub fn stack_size(mut self, stack_size: usize) -> Self {
+        self.stack_size = Some(stack_size);
+        self
+    }
+
+    /// **(DEPRECATED)** Suggest to worker threads that they execute
+    /// spawned jobs in a "breadth-first" fashion.
+    ///
+    /// Typically, when a worker thread is idle or blocked, it will
+    /// attempt to execute the job from the *top* of its local deque of
+    /// work (i.e., the job most recently spawned). If this flag is set
+    /// to true, however, workers will prefer to execute in a
+    /// *breadth-first* fashion -- that is, they will search for jobs at
+    /// the *bottom* of their local deque. (At present, workers *always*
+    /// steal from the bottom of other workers' deques, regardless of
+    /// the setting of this flag.)
+    ///
+    /// If you think of the tasks as a tree, where a parent task
+    /// spawns its children in the tree, then this flag loosely
+    /// corresponds to doing a breadth-first traversal of the tree,
+    /// whereas the default would be to do a depth-first traversal.
+    ///
+    /// **Note that this is an "execution hint".** Rayon's task
+    /// execution is highly dynamic and the precise order in which
+    /// independent tasks are executed is not intended to be
+    /// guaranteed.
+    ///
+    /// This `breadth_first()` method is now deprecated per [RFC #1],
+    /// and in the future its effect may be removed. Consider using
+    /// [`scope_fifo()`] for a similar effect.
+    ///
+    /// [RFC #1]: https://github.com/rayon-rs/rfcs/blob/master/accepted/rfc0001-scope-scheduling.md
+    /// [`scope_fifo()`]: fn.scope_fifo.html
+    #[deprecated(note = "use `scope_fifo` and `spawn_fifo` for similar effect")]
+    pub fn breadth_first(mut self) -> Self {
+        self.breadth_first = true;
+        self
+    }
+
+    fn get_breadth_first(&self) -> bool {
+        self.breadth_first
+    }
+
+    /// Takes the current thread start callback, leaving `None`.
+    fn take_start_handler(&mut self) -> Option<Box<StartHandler>> {
+        self.start_handler.take()
+    }
+
+    /// Sets a callback to be invoked on thread start.
+    ///
+    /// The closure is passed the index of the thread on which it is invoked.
+    /// Note that this same closure may be invoked multiple times in parallel.
+    /// If this closure panics, the panic will be passed to the panic handler.
+    /// If that handler returns, then startup will continue normally.
+    pub fn start_handler<H>(mut self, start_handler: H) -> Self
+    where
+        H: Fn(usize) + Send + Sync + 'static,
+    {
+        self.start_handler = Some(Box::new(start_handler));
+        self
+    }
+
+    /// Returns a current thread exit callback, leaving `None`.
+    fn take_exit_handler(&mut self) -> Option<Box<ExitHandler>> {
+        self.exit_handler.take()
+    }
+
+    /// Sets a callback to be invoked on thread exit.
+    ///
+    /// The closure is passed the index of the thread on which it is invoked.
+    /// Note that this same closure may be invoked multiple times in parallel.
+    /// If this closure panics, the panic will be passed to the panic handler.
+    /// If that handler returns, then the thread will exit normally.
+    pub fn exit_handler<H>(mut self, exit_handler: H) -> Self
+    where
+        H: Fn(usize) + Send + Sync + 'static,
+    {
+        self.exit_handler = Some(Box::new(exit_handler));
+        self
+    }
+}
+
+#[allow(deprecated)]
+impl Configuration {
+    /// Creates and return a valid rayon thread pool configuration, but does not initialize it.
+    pub fn new() -> Configuration {
+        Configuration {
+            builder: ThreadPoolBuilder::new(),
+        }
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::build`.
+    pub fn build(self) -> Result<ThreadPool, Box<dyn Error + 'static>> {
+        self.builder.build().map_err(Box::from)
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::thread_name`.
+    pub fn thread_name<F>(mut self, closure: F) -> Self
+    where
+        F: FnMut(usize) -> String + 'static,
+    {
+        self.builder = self.builder.thread_name(closure);
+        self
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::num_threads`.
+    pub fn num_threads(mut self, num_threads: usize) -> Configuration {
+        self.builder = self.builder.num_threads(num_threads);
+        self
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::panic_handler`.
+    pub fn panic_handler<H>(mut self, panic_handler: H) -> Configuration
+    where
+        H: Fn(Box<dyn Any + Send>) + Send + Sync + 'static,
+    {
+        self.builder = self.builder.panic_handler(panic_handler);
+        self
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::stack_size`.
+    pub fn stack_size(mut self, stack_size: usize) -> Self {
+        self.builder = self.builder.stack_size(stack_size);
+        self
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::breadth_first`.
+    pub fn breadth_first(mut self) -> Self {
+        self.builder = self.builder.breadth_first();
+        self
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::start_handler`.
+    pub fn start_handler<H>(mut self, start_handler: H) -> Configuration
+    where
+        H: Fn(usize) + Send + Sync + 'static,
+    {
+        self.builder = self.builder.start_handler(start_handler);
+        self
+    }
+
+    /// Deprecated in favor of `ThreadPoolBuilder::exit_handler`.
+    pub fn exit_handler<H>(mut self, exit_handler: H) -> Configuration
+    where
+        H: Fn(usize) + Send + Sync + 'static,
+    {
+        self.builder = self.builder.exit_handler(exit_handler);
+        self
+    }
+
+    /// Returns a ThreadPoolBuilder with identical parameters.
+    fn into_builder(self) -> ThreadPoolBuilder {
+        self.builder
+    }
+}
+
+impl ThreadPoolBuildError {
+    fn new(kind: ErrorKind) -> ThreadPoolBuildError {
+        ThreadPoolBuildError { kind }
+    }
+
+    fn is_unsupported(&self) -> bool {
+        matches!(&self.kind, ErrorKind::IOError(e) if e.kind() == io::ErrorKind::Unsupported)
+    }
+}
+
+const GLOBAL_POOL_ALREADY_INITIALIZED: &str =
+    "The global thread pool has already been initialized.";
+
+const CURRENT_THREAD_ALREADY_IN_POOL: &str =
+    "The current thread is already part of another thread pool.";
+
+impl Error for ThreadPoolBuildError {
+    #[allow(deprecated)]
+    fn description(&self) -> &str {
+        match self.kind {
+            ErrorKind::GlobalPoolAlreadyInitialized => GLOBAL_POOL_ALREADY_INITIALIZED,
+            ErrorKind::CurrentThreadAlreadyInPool => CURRENT_THREAD_ALREADY_IN_POOL,
+            ErrorKind::IOError(ref e) => e.description(),
+        }
+    }
+
+    fn source(&self) -> Option<&(dyn Error + 'static)> {
+        match &self.kind {
+            ErrorKind::GlobalPoolAlreadyInitialized | ErrorKind::CurrentThreadAlreadyInPool => None,
+            ErrorKind::IOError(e) => Some(e),
+        }
+    }
+}
+
+impl fmt::Display for ThreadPoolBuildError {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match &self.kind {
+            ErrorKind::CurrentThreadAlreadyInPool => CURRENT_THREAD_ALREADY_IN_POOL.fmt(f),
+            ErrorKind::GlobalPoolAlreadyInitialized => GLOBAL_POOL_ALREADY_INITIALIZED.fmt(f),
+            ErrorKind::IOError(e) => e.fmt(f),
+        }
+    }
+}
+
+/// Deprecated in favor of `ThreadPoolBuilder::build_global`.
+#[deprecated(note = "use `ThreadPoolBuilder::build_global`")]
+#[allow(deprecated)]
+pub fn initialize(config: Configuration) -> Result<(), Box<dyn Error>> {
+    config.into_builder().build_global().map_err(Box::from)
+}
+
+impl<S> fmt::Debug for ThreadPoolBuilder<S> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let ThreadPoolBuilder {
+            ref num_threads,
+            ref use_current_thread,
+            ref get_thread_name,
+            ref panic_handler,
+            ref stack_size,
+            ref start_handler,
+            ref exit_handler,
+            spawn_handler: _,
+            ref breadth_first,
+        } = *self;
+
+        // Just print `Some(<closure>)` or `None` to the debug
+        // output.
+        struct ClosurePlaceholder;
+        impl fmt::Debug for ClosurePlaceholder {
+            fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+                f.write_str("<closure>")
+            }
+        }
+        let get_thread_name = get_thread_name.as_ref().map(|_| ClosurePlaceholder);
+        let panic_handler = panic_handler.as_ref().map(|_| ClosurePlaceholder);
+        let start_handler = start_handler.as_ref().map(|_| ClosurePlaceholder);
+        let exit_handler = exit_handler.as_ref().map(|_| ClosurePlaceholder);
+
+        f.debug_struct("ThreadPoolBuilder")
+            .field("num_threads", num_threads)
+            .field("use_current_thread", use_current_thread)
+            .field("get_thread_name", &get_thread_name)
+            .field("panic_handler", &panic_handler)
+            .field("stack_size", &stack_size)
+            .field("start_handler", &start_handler)
+            .field("exit_handler", &exit_handler)
+            .field("breadth_first", &breadth_first)
+            .finish()
+    }
+}
+
+#[allow(deprecated)]
+impl fmt::Debug for Configuration {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        self.builder.fmt(f)
+    }
+}
+
+/// Provides the calling context to a closure called by `join_context`.
+#[derive(Debug)]
+pub struct FnContext {
+    migrated: bool,
+
+    /// disable `Send` and `Sync`, just for a little future-proofing.
+    _marker: PhantomData<*mut ()>,
+}
+
+impl FnContext {
+    #[inline]
+    fn new(migrated: bool) -> Self {
+        FnContext {
+            migrated,
+            _marker: PhantomData,
+        }
+    }
+}
+
+impl FnContext {
+    /// Returns `true` if the closure was called from a different thread
+    /// than it was provided from.
+    #[inline]
+    pub fn migrated(&self) -> bool {
+        self.migrated
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/private.rs.html b/src/rayon_core/private.rs.html new file mode 100644 index 0000000000..b90cec7adc --- /dev/null +++ b/src/rayon_core/private.rs.html @@ -0,0 +1,55 @@ +private.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
//! The public parts of this private module are used to create traits
+//! that cannot be implemented outside of our own crate.  This way we
+//! can feel free to extend those traits without worrying about it
+//! being a breaking change for other implementations.
+
+/// If this type is pub but not publicly reachable, third parties
+/// can't name it and can't implement traits using it.
+#[allow(missing_debug_implementations)]
+pub struct PrivateMarker;
+
+macro_rules! private_decl {
+    () => {
+        /// This trait is private; this method exists to make it
+        /// impossible to implement outside the crate.
+        #[doc(hidden)]
+        fn __rayon_private__(&self) -> crate::private::PrivateMarker;
+    };
+}
+
+macro_rules! private_impl {
+    () => {
+        fn __rayon_private__(&self) -> crate::private::PrivateMarker {
+            crate::private::PrivateMarker
+        }
+    };
+}
+
\ No newline at end of file diff --git a/src/rayon_core/registry.rs.html b/src/rayon_core/registry.rs.html new file mode 100644 index 0000000000..f07c6bd48f --- /dev/null +++ b/src/rayon_core/registry.rs.html @@ -0,0 +1,1995 @@ +registry.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+
use crate::job::{JobFifo, JobRef, StackJob};
+use crate::latch::{AsCoreLatch, CoreLatch, Latch, LatchRef, LockLatch, OnceLatch, SpinLatch};
+use crate::sleep::Sleep;
+use crate::sync::Mutex;
+use crate::unwind;
+use crate::{
+    ErrorKind, ExitHandler, PanicHandler, StartHandler, ThreadPoolBuildError, ThreadPoolBuilder,
+    Yield,
+};
+use crossbeam_deque::{Injector, Steal, Stealer, Worker};
+use std::cell::Cell;
+use std::collections::hash_map::DefaultHasher;
+use std::fmt;
+use std::hash::Hasher;
+use std::io;
+use std::mem;
+use std::ptr;
+use std::sync::atomic::{AtomicUsize, Ordering};
+use std::sync::{Arc, Once};
+use std::thread;
+use std::usize;
+
+/// Thread builder used for customization via
+/// [`ThreadPoolBuilder::spawn_handler`](struct.ThreadPoolBuilder.html#method.spawn_handler).
+pub struct ThreadBuilder {
+    name: Option<String>,
+    stack_size: Option<usize>,
+    worker: Worker<JobRef>,
+    stealer: Stealer<JobRef>,
+    registry: Arc<Registry>,
+    index: usize,
+}
+
+impl ThreadBuilder {
+    /// Gets the index of this thread in the pool, within `0..num_threads`.
+    pub fn index(&self) -> usize {
+        self.index
+    }
+
+    /// Gets the string that was specified by `ThreadPoolBuilder::name()`.
+    pub fn name(&self) -> Option<&str> {
+        self.name.as_deref()
+    }
+
+    /// Gets the value that was specified by `ThreadPoolBuilder::stack_size()`.
+    pub fn stack_size(&self) -> Option<usize> {
+        self.stack_size
+    }
+
+    /// Executes the main loop for this thread. This will not return until the
+    /// thread pool is dropped.
+    pub fn run(self) {
+        unsafe { main_loop(self) }
+    }
+}
+
+impl fmt::Debug for ThreadBuilder {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("ThreadBuilder")
+            .field("pool", &self.registry.id())
+            .field("index", &self.index)
+            .field("name", &self.name)
+            .field("stack_size", &self.stack_size)
+            .finish()
+    }
+}
+
+/// Generalized trait for spawning a thread in the `Registry`.
+///
+/// This trait is pub-in-private -- E0445 forces us to make it public,
+/// but we don't actually want to expose these details in the API.
+pub trait ThreadSpawn {
+    private_decl! {}
+
+    /// Spawn a thread with the `ThreadBuilder` parameters, and then
+    /// call `ThreadBuilder::run()`.
+    fn spawn(&mut self, thread: ThreadBuilder) -> io::Result<()>;
+}
+
+/// Spawns a thread in the "normal" way with `std::thread::Builder`.
+///
+/// This type is pub-in-private -- E0445 forces us to make it public,
+/// but we don't actually want to expose these details in the API.
+#[derive(Debug, Default)]
+pub struct DefaultSpawn;
+
+impl ThreadSpawn for DefaultSpawn {
+    private_impl! {}
+
+    fn spawn(&mut self, thread: ThreadBuilder) -> io::Result<()> {
+        let mut b = thread::Builder::new();
+        if let Some(name) = thread.name() {
+            b = b.name(name.to_owned());
+        }
+        if let Some(stack_size) = thread.stack_size() {
+            b = b.stack_size(stack_size);
+        }
+        b.spawn(|| thread.run())?;
+        Ok(())
+    }
+}
+
+/// Spawns a thread with a user's custom callback.
+///
+/// This type is pub-in-private -- E0445 forces us to make it public,
+/// but we don't actually want to expose these details in the API.
+#[derive(Debug)]
+pub struct CustomSpawn<F>(F);
+
+impl<F> CustomSpawn<F>
+where
+    F: FnMut(ThreadBuilder) -> io::Result<()>,
+{
+    pub(super) fn new(spawn: F) -> Self {
+        CustomSpawn(spawn)
+    }
+}
+
+impl<F> ThreadSpawn for CustomSpawn<F>
+where
+    F: FnMut(ThreadBuilder) -> io::Result<()>,
+{
+    private_impl! {}
+
+    #[inline]
+    fn spawn(&mut self, thread: ThreadBuilder) -> io::Result<()> {
+        (self.0)(thread)
+    }
+}
+
+pub(super) struct Registry {
+    thread_infos: Vec<ThreadInfo>,
+    sleep: Sleep,
+    injected_jobs: Injector<JobRef>,
+    broadcasts: Mutex<Vec<Worker<JobRef>>>,
+    panic_handler: Option<Box<PanicHandler>>,
+    start_handler: Option<Box<StartHandler>>,
+    exit_handler: Option<Box<ExitHandler>>,
+
+    // When this latch reaches 0, it means that all work on this
+    // registry must be complete. This is ensured in the following ways:
+    //
+    // - if this is the global registry, there is a ref-count that never
+    //   gets released.
+    // - if this is a user-created thread-pool, then so long as the thread-pool
+    //   exists, it holds a reference.
+    // - when we inject a "blocking job" into the registry with `ThreadPool::install()`,
+    //   no adjustment is needed; the `ThreadPool` holds the reference, and since we won't
+    //   return until the blocking job is complete, that ref will continue to be held.
+    // - when `join()` or `scope()` is invoked, similarly, no adjustments are needed.
+    //   These are always owned by some other job (e.g., one injected by `ThreadPool::install()`)
+    //   and that job will keep the pool alive.
+    terminate_count: AtomicUsize,
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// Initialization
+
+static mut THE_REGISTRY: Option<Arc<Registry>> = None;
+static THE_REGISTRY_SET: Once = Once::new();
+
+/// Starts the worker threads (if that has not already happened). If
+/// initialization has not already occurred, use the default
+/// configuration.
+pub(super) fn global_registry() -> &'static Arc<Registry> {
+    set_global_registry(default_global_registry)
+        .or_else(|err| unsafe { THE_REGISTRY.as_ref().ok_or(err) })
+        .expect("The global thread pool has not been initialized.")
+}
+
+/// Starts the worker threads (if that has not already happened) with
+/// the given builder.
+pub(super) fn init_global_registry<S>(
+    builder: ThreadPoolBuilder<S>,
+) -> Result<&'static Arc<Registry>, ThreadPoolBuildError>
+where
+    S: ThreadSpawn,
+{
+    set_global_registry(|| Registry::new(builder))
+}
+
+/// Starts the worker threads (if that has not already happened)
+/// by creating a registry with the given callback.
+fn set_global_registry<F>(registry: F) -> Result<&'static Arc<Registry>, ThreadPoolBuildError>
+where
+    F: FnOnce() -> Result<Arc<Registry>, ThreadPoolBuildError>,
+{
+    let mut result = Err(ThreadPoolBuildError::new(
+        ErrorKind::GlobalPoolAlreadyInitialized,
+    ));
+
+    THE_REGISTRY_SET.call_once(|| {
+        result = registry()
+            .map(|registry: Arc<Registry>| unsafe { &*THE_REGISTRY.get_or_insert(registry) })
+    });
+
+    result
+}
+
+fn default_global_registry() -> Result<Arc<Registry>, ThreadPoolBuildError> {
+    let result = Registry::new(ThreadPoolBuilder::new());
+
+    // If we're running in an environment that doesn't support threads at all, we can fall back to
+    // using the current thread alone. This is crude, and probably won't work for non-blocking
+    // calls like `spawn` or `broadcast_spawn`, but a lot of stuff does work fine.
+    //
+    // Notably, this allows current WebAssembly targets to work even though their threading support
+    // is stubbed out, and we won't have to change anything if they do add real threading.
+    let unsupported = matches!(&result, Err(e) if e.is_unsupported());
+    if unsupported && WorkerThread::current().is_null() {
+        let builder = ThreadPoolBuilder::new().num_threads(1).use_current_thread();
+        let fallback_result = Registry::new(builder);
+        if fallback_result.is_ok() {
+            return fallback_result;
+        }
+    }
+
+    result
+}
+
+struct Terminator<'a>(&'a Arc<Registry>);
+
+impl<'a> Drop for Terminator<'a> {
+    fn drop(&mut self) {
+        self.0.terminate()
+    }
+}
+
+impl Registry {
+    pub(super) fn new<S>(
+        mut builder: ThreadPoolBuilder<S>,
+    ) -> Result<Arc<Self>, ThreadPoolBuildError>
+    where
+        S: ThreadSpawn,
+    {
+        // Soft-limit the number of threads that we can actually support.
+        let n_threads = Ord::min(builder.get_num_threads(), crate::max_num_threads());
+
+        let breadth_first = builder.get_breadth_first();
+
+        let (workers, stealers): (Vec<_>, Vec<_>) = (0..n_threads)
+            .map(|_| {
+                let worker = if breadth_first {
+                    Worker::new_fifo()
+                } else {
+                    Worker::new_lifo()
+                };
+
+                let stealer = worker.stealer();
+                (worker, stealer)
+            })
+            .unzip();
+
+        let (broadcasts, broadcast_stealers): (Vec<_>, Vec<_>) = (0..n_threads)
+            .map(|_| {
+                let worker = Worker::new_fifo();
+                let stealer = worker.stealer();
+                (worker, stealer)
+            })
+            .unzip();
+
+        let registry = Arc::new(Registry {
+            thread_infos: stealers.into_iter().map(ThreadInfo::new).collect(),
+            sleep: Sleep::new(n_threads),
+            injected_jobs: Injector::new(),
+            broadcasts: Mutex::new(broadcasts),
+            terminate_count: AtomicUsize::new(1),
+            panic_handler: builder.take_panic_handler(),
+            start_handler: builder.take_start_handler(),
+            exit_handler: builder.take_exit_handler(),
+        });
+
+        // If we return early or panic, make sure to terminate existing threads.
+        let t1000 = Terminator(&registry);
+
+        for (index, (worker, stealer)) in workers.into_iter().zip(broadcast_stealers).enumerate() {
+            let thread = ThreadBuilder {
+                name: builder.get_thread_name(index),
+                stack_size: builder.get_stack_size(),
+                registry: Arc::clone(&registry),
+                worker,
+                stealer,
+                index,
+            };
+
+            if index == 0 && builder.use_current_thread {
+                if !WorkerThread::current().is_null() {
+                    return Err(ThreadPoolBuildError::new(
+                        ErrorKind::CurrentThreadAlreadyInPool,
+                    ));
+                }
+                // Rather than starting a new thread, we're just taking over the current thread
+                // *without* running the main loop, so we can still return from here.
+                // The WorkerThread is leaked, but we never shutdown the global pool anyway.
+                let worker_thread = Box::into_raw(Box::new(WorkerThread::from(thread)));
+
+                unsafe {
+                    WorkerThread::set_current(worker_thread);
+                    Latch::set(&registry.thread_infos[index].primed);
+                }
+                continue;
+            }
+
+            if let Err(e) = builder.get_spawn_handler().spawn(thread) {
+                return Err(ThreadPoolBuildError::new(ErrorKind::IOError(e)));
+            }
+        }
+
+        // Returning normally now, without termination.
+        mem::forget(t1000);
+
+        Ok(registry)
+    }
+
+    pub(super) fn current() -> Arc<Registry> {
+        unsafe {
+            let worker_thread = WorkerThread::current();
+            let registry = if worker_thread.is_null() {
+                global_registry()
+            } else {
+                &(*worker_thread).registry
+            };
+            Arc::clone(registry)
+        }
+    }
+
+    /// Returns the number of threads in the current registry.  This
+    /// is better than `Registry::current().num_threads()` because it
+    /// avoids incrementing the `Arc`.
+    pub(super) fn current_num_threads() -> usize {
+        unsafe {
+            let worker_thread = WorkerThread::current();
+            if worker_thread.is_null() {
+                global_registry().num_threads()
+            } else {
+                (*worker_thread).registry.num_threads()
+            }
+        }
+    }
+
+    /// Returns the current `WorkerThread` if it's part of this `Registry`.
+    pub(super) fn current_thread(&self) -> Option<&WorkerThread> {
+        unsafe {
+            let worker = WorkerThread::current().as_ref()?;
+            if worker.registry().id() == self.id() {
+                Some(worker)
+            } else {
+                None
+            }
+        }
+    }
+
+    /// Returns an opaque identifier for this registry.
+    pub(super) fn id(&self) -> RegistryId {
+        // We can rely on `self` not to change since we only ever create
+        // registries that are boxed up in an `Arc` (see `new()` above).
+        RegistryId {
+            addr: self as *const Self as usize,
+        }
+    }
+
+    pub(super) fn num_threads(&self) -> usize {
+        self.thread_infos.len()
+    }
+
+    pub(super) fn catch_unwind(&self, f: impl FnOnce()) {
+        if let Err(err) = unwind::halt_unwinding(f) {
+            // If there is no handler, or if that handler itself panics, then we abort.
+            let abort_guard = unwind::AbortIfPanic;
+            if let Some(ref handler) = self.panic_handler {
+                handler(err);
+                mem::forget(abort_guard);
+            }
+        }
+    }
+
+    /// Waits for the worker threads to get up and running.  This is
+    /// meant to be used for benchmarking purposes, primarily, so that
+    /// you can get more consistent numbers by having everything
+    /// "ready to go".
+    pub(super) fn wait_until_primed(&self) {
+        for info in &self.thread_infos {
+            info.primed.wait();
+        }
+    }
+
+    /// Waits for the worker threads to stop. This is used for testing
+    /// -- so we can check that termination actually works.
+    #[cfg(test)]
+    pub(super) fn wait_until_stopped(&self) {
+        for info in &self.thread_infos {
+            info.stopped.wait();
+        }
+    }
+
+    /// ////////////////////////////////////////////////////////////////////////
+    /// MAIN LOOP
+    ///
+    /// So long as all of the worker threads are hanging out in their
+    /// top-level loop, there is no work to be done.
+
+    /// Push a job into the given `registry`. If we are running on a
+    /// worker thread for the registry, this will push onto the
+    /// deque. Else, it will inject from the outside (which is slower).
+    pub(super) fn inject_or_push(&self, job_ref: JobRef) {
+        let worker_thread = WorkerThread::current();
+        unsafe {
+            if !worker_thread.is_null() && (*worker_thread).registry().id() == self.id() {
+                (*worker_thread).push(job_ref);
+            } else {
+                self.inject(job_ref);
+            }
+        }
+    }
+
+    /// Push a job into the "external jobs" queue; it will be taken by
+    /// whatever worker has nothing to do. Use this if you know that
+    /// you are not on a worker of this registry.
+    pub(super) fn inject(&self, injected_job: JobRef) {
+        // It should not be possible for `state.terminate` to be true
+        // here. It is only set to true when the user creates (and
+        // drops) a `ThreadPool`; and, in that case, they cannot be
+        // calling `inject()` later, since they dropped their
+        // `ThreadPool`.
+        debug_assert_ne!(
+            self.terminate_count.load(Ordering::Acquire),
+            0,
+            "inject() sees state.terminate as true"
+        );
+
+        let queue_was_empty = self.injected_jobs.is_empty();
+
+        self.injected_jobs.push(injected_job);
+        self.sleep.new_injected_jobs(1, queue_was_empty);
+    }
+
+    fn has_injected_job(&self) -> bool {
+        !self.injected_jobs.is_empty()
+    }
+
+    fn pop_injected_job(&self) -> Option<JobRef> {
+        loop {
+            match self.injected_jobs.steal() {
+                Steal::Success(job) => return Some(job),
+                Steal::Empty => return None,
+                Steal::Retry => {}
+            }
+        }
+    }
+
+    /// Push a job into each thread's own "external jobs" queue; it will be
+    /// executed only on that thread, when it has nothing else to do locally,
+    /// before it tries to steal other work.
+    ///
+    /// **Panics** if not given exactly as many jobs as there are threads.
+    pub(super) fn inject_broadcast(&self, injected_jobs: impl ExactSizeIterator<Item = JobRef>) {
+        assert_eq!(self.num_threads(), injected_jobs.len());
+        {
+            let broadcasts = self.broadcasts.lock().unwrap();
+
+            // It should not be possible for `state.terminate` to be true
+            // here. It is only set to true when the user creates (and
+            // drops) a `ThreadPool`; and, in that case, they cannot be
+            // calling `inject_broadcast()` later, since they dropped their
+            // `ThreadPool`.
+            debug_assert_ne!(
+                self.terminate_count.load(Ordering::Acquire),
+                0,
+                "inject_broadcast() sees state.terminate as true"
+            );
+
+            assert_eq!(broadcasts.len(), injected_jobs.len());
+            for (worker, job_ref) in broadcasts.iter().zip(injected_jobs) {
+                worker.push(job_ref);
+            }
+        }
+        for i in 0..self.num_threads() {
+            self.sleep.notify_worker_latch_is_set(i);
+        }
+    }
+
+    /// If already in a worker-thread of this registry, just execute `op`.
+    /// Otherwise, inject `op` in this thread-pool. Either way, block until `op`
+    /// completes and return its return value. If `op` panics, that panic will
+    /// be propagated as well.  The second argument indicates `true` if injection
+    /// was performed, `false` if executed directly.
+    pub(super) fn in_worker<OP, R>(&self, op: OP) -> R
+    where
+        OP: FnOnce(&WorkerThread, bool) -> R + Send,
+        R: Send,
+    {
+        unsafe {
+            let worker_thread = WorkerThread::current();
+            if worker_thread.is_null() {
+                self.in_worker_cold(op)
+            } else if (*worker_thread).registry().id() != self.id() {
+                self.in_worker_cross(&*worker_thread, op)
+            } else {
+                // Perfectly valid to give them a `&T`: this is the
+                // current thread, so we know the data structure won't be
+                // invalidated until we return.
+                op(&*worker_thread, false)
+            }
+        }
+    }
+
+    #[cold]
+    unsafe fn in_worker_cold<OP, R>(&self, op: OP) -> R
+    where
+        OP: FnOnce(&WorkerThread, bool) -> R + Send,
+        R: Send,
+    {
+        thread_local!(static LOCK_LATCH: LockLatch = LockLatch::new());
+
+        LOCK_LATCH.with(|l| {
+            // This thread isn't a member of *any* thread pool, so just block.
+            debug_assert!(WorkerThread::current().is_null());
+            let job = StackJob::new(
+                |injected| {
+                    let worker_thread = WorkerThread::current();
+                    assert!(injected && !worker_thread.is_null());
+                    op(&*worker_thread, true)
+                },
+                LatchRef::new(l),
+            );
+            self.inject(job.as_job_ref());
+            job.latch.wait_and_reset(); // Make sure we can use the same latch again next time.
+
+            job.into_result()
+        })
+    }
+
+    #[cold]
+    unsafe fn in_worker_cross<OP, R>(&self, current_thread: &WorkerThread, op: OP) -> R
+    where
+        OP: FnOnce(&WorkerThread, bool) -> R + Send,
+        R: Send,
+    {
+        // This thread is a member of a different pool, so let it process
+        // other work while waiting for this `op` to complete.
+        debug_assert!(current_thread.registry().id() != self.id());
+        let latch = SpinLatch::cross(current_thread);
+        let job = StackJob::new(
+            |injected| {
+                let worker_thread = WorkerThread::current();
+                assert!(injected && !worker_thread.is_null());
+                op(&*worker_thread, true)
+            },
+            latch,
+        );
+        self.inject(job.as_job_ref());
+        current_thread.wait_until(&job.latch);
+        job.into_result()
+    }
+
+    /// Increments the terminate counter. This increment should be
+    /// balanced by a call to `terminate`, which will decrement. This
+    /// is used when spawning asynchronous work, which needs to
+    /// prevent the registry from terminating so long as it is active.
+    ///
+    /// Note that blocking functions such as `join` and `scope` do not
+    /// need to concern themselves with this fn; their context is
+    /// responsible for ensuring the current thread-pool will not
+    /// terminate until they return.
+    ///
+    /// The global thread-pool always has an outstanding reference
+    /// (the initial one). Custom thread-pools have one outstanding
+    /// reference that is dropped when the `ThreadPool` is dropped:
+    /// since installing the thread-pool blocks until any joins/scopes
+    /// complete, this ensures that joins/scopes are covered.
+    ///
+    /// The exception is `::spawn()`, which can create a job outside
+    /// of any blocking scope. In that case, the job itself holds a
+    /// terminate count and is responsible for invoking `terminate()`
+    /// when finished.
+    pub(super) fn increment_terminate_count(&self) {
+        let previous = self.terminate_count.fetch_add(1, Ordering::AcqRel);
+        debug_assert!(previous != 0, "registry ref count incremented from zero");
+        assert!(
+            previous != std::usize::MAX,
+            "overflow in registry ref count"
+        );
+    }
+
+    /// Signals that the thread-pool which owns this registry has been
+    /// dropped. The worker threads will gradually terminate, once any
+    /// extant work is completed.
+    pub(super) fn terminate(&self) {
+        if self.terminate_count.fetch_sub(1, Ordering::AcqRel) == 1 {
+            for (i, thread_info) in self.thread_infos.iter().enumerate() {
+                unsafe { OnceLatch::set_and_tickle_one(&thread_info.terminate, self, i) };
+            }
+        }
+    }
+
+    /// Notify the worker that the latch they are sleeping on has been "set".
+    pub(super) fn notify_worker_latch_is_set(&self, target_worker_index: usize) {
+        self.sleep.notify_worker_latch_is_set(target_worker_index);
+    }
+}
+
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+pub(super) struct RegistryId {
+    addr: usize,
+}
+
+struct ThreadInfo {
+    /// Latch set once thread has started and we are entering into the
+    /// main loop. Used to wait for worker threads to become primed,
+    /// primarily of interest for benchmarking.
+    primed: LockLatch,
+
+    /// Latch is set once worker thread has completed. Used to wait
+    /// until workers have stopped; only used for tests.
+    stopped: LockLatch,
+
+    /// The latch used to signal that terminated has been requested.
+    /// This latch is *set* by the `terminate` method on the
+    /// `Registry`, once the registry's main "terminate" counter
+    /// reaches zero.
+    terminate: OnceLatch,
+
+    /// the "stealer" half of the worker's deque
+    stealer: Stealer<JobRef>,
+}
+
+impl ThreadInfo {
+    fn new(stealer: Stealer<JobRef>) -> ThreadInfo {
+        ThreadInfo {
+            primed: LockLatch::new(),
+            stopped: LockLatch::new(),
+            terminate: OnceLatch::new(),
+            stealer,
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+/// WorkerThread identifiers
+
+pub(super) struct WorkerThread {
+    /// the "worker" half of our local deque
+    worker: Worker<JobRef>,
+
+    /// the "stealer" half of the worker's broadcast deque
+    stealer: Stealer<JobRef>,
+
+    /// local queue used for `spawn_fifo` indirection
+    fifo: JobFifo,
+
+    index: usize,
+
+    /// A weak random number generator.
+    rng: XorShift64Star,
+
+    registry: Arc<Registry>,
+}
+
+// This is a bit sketchy, but basically: the WorkerThread is
+// allocated on the stack of the worker on entry and stored into this
+// thread local variable. So it will remain valid at least until the
+// worker is fully unwound. Using an unsafe pointer avoids the need
+// for a RefCell<T> etc.
+thread_local! {
+    static WORKER_THREAD_STATE: Cell<*const WorkerThread> = const { Cell::new(ptr::null()) };
+}
+
+impl From<ThreadBuilder> for WorkerThread {
+    fn from(thread: ThreadBuilder) -> Self {
+        Self {
+            worker: thread.worker,
+            stealer: thread.stealer,
+            fifo: JobFifo::new(),
+            index: thread.index,
+            rng: XorShift64Star::new(),
+            registry: thread.registry,
+        }
+    }
+}
+
+impl Drop for WorkerThread {
+    fn drop(&mut self) {
+        // Undo `set_current`
+        WORKER_THREAD_STATE.with(|t| {
+            assert!(t.get().eq(&(self as *const _)));
+            t.set(ptr::null());
+        });
+    }
+}
+
+impl WorkerThread {
+    /// Gets the `WorkerThread` index for the current thread; returns
+    /// NULL if this is not a worker thread. This pointer is valid
+    /// anywhere on the current thread.
+    #[inline]
+    pub(super) fn current() -> *const WorkerThread {
+        WORKER_THREAD_STATE.with(Cell::get)
+    }
+
+    /// Sets `self` as the worker thread index for the current thread.
+    /// This is done during worker thread startup.
+    unsafe fn set_current(thread: *const WorkerThread) {
+        WORKER_THREAD_STATE.with(|t| {
+            assert!(t.get().is_null());
+            t.set(thread);
+        });
+    }
+
+    /// Returns the registry that owns this worker thread.
+    #[inline]
+    pub(super) fn registry(&self) -> &Arc<Registry> {
+        &self.registry
+    }
+
+    /// Our index amongst the worker threads (ranges from `0..self.num_threads()`).
+    #[inline]
+    pub(super) fn index(&self) -> usize {
+        self.index
+    }
+
+    #[inline]
+    pub(super) unsafe fn push(&self, job: JobRef) {
+        let queue_was_empty = self.worker.is_empty();
+        self.worker.push(job);
+        self.registry.sleep.new_internal_jobs(1, queue_was_empty);
+    }
+
+    #[inline]
+    pub(super) unsafe fn push_fifo(&self, job: JobRef) {
+        self.push(self.fifo.push(job));
+    }
+
+    #[inline]
+    pub(super) fn local_deque_is_empty(&self) -> bool {
+        self.worker.is_empty()
+    }
+
+    /// Attempts to obtain a "local" job -- typically this means
+    /// popping from the top of the stack, though if we are configured
+    /// for breadth-first execution, it would mean dequeuing from the
+    /// bottom.
+    #[inline]
+    pub(super) fn take_local_job(&self) -> Option<JobRef> {
+        let popped_job = self.worker.pop();
+
+        if popped_job.is_some() {
+            return popped_job;
+        }
+
+        loop {
+            match self.stealer.steal() {
+                Steal::Success(job) => return Some(job),
+                Steal::Empty => return None,
+                Steal::Retry => {}
+            }
+        }
+    }
+
+    fn has_injected_job(&self) -> bool {
+        !self.stealer.is_empty() || self.registry.has_injected_job()
+    }
+
+    /// Wait until the latch is set. Try to keep busy by popping and
+    /// stealing tasks as necessary.
+    #[inline]
+    pub(super) unsafe fn wait_until<L: AsCoreLatch + ?Sized>(&self, latch: &L) {
+        let latch = latch.as_core_latch();
+        if !latch.probe() {
+            self.wait_until_cold(latch);
+        }
+    }
+
+    #[cold]
+    unsafe fn wait_until_cold(&self, latch: &CoreLatch) {
+        // the code below should swallow all panics and hence never
+        // unwind; but if something does wrong, we want to abort,
+        // because otherwise other code in rayon may assume that the
+        // latch has been signaled, and that can lead to random memory
+        // accesses, which would be *very bad*
+        let abort_guard = unwind::AbortIfPanic;
+
+        'outer: while !latch.probe() {
+            // Check for local work *before* we start marking ourself idle,
+            // especially to avoid modifying shared sleep state.
+            if let Some(job) = self.take_local_job() {
+                self.execute(job);
+                continue;
+            }
+
+            let mut idle_state = self.registry.sleep.start_looking(self.index);
+            while !latch.probe() {
+                if let Some(job) = self.find_work() {
+                    self.registry.sleep.work_found();
+                    self.execute(job);
+                    // The job might have injected local work, so go back to the outer loop.
+                    continue 'outer;
+                } else {
+                    self.registry
+                        .sleep
+                        .no_work_found(&mut idle_state, latch, || self.has_injected_job())
+                }
+            }
+
+            // If we were sleepy, we are not anymore. We "found work" --
+            // whatever the surrounding thread was doing before it had to wait.
+            self.registry.sleep.work_found();
+            break;
+        }
+
+        mem::forget(abort_guard); // successful execution, do not abort
+    }
+
+    unsafe fn wait_until_out_of_work(&self) {
+        debug_assert_eq!(self as *const _, WorkerThread::current());
+        let registry = &*self.registry;
+        let index = self.index;
+
+        self.wait_until(&registry.thread_infos[index].terminate);
+
+        // Should not be any work left in our queue.
+        debug_assert!(self.take_local_job().is_none());
+
+        // Let registry know we are done
+        Latch::set(&registry.thread_infos[index].stopped);
+    }
+
+    fn find_work(&self) -> Option<JobRef> {
+        // Try to find some work to do. We give preference first
+        // to things in our local deque, then in other workers
+        // deques, and finally to injected jobs from the
+        // outside. The idea is to finish what we started before
+        // we take on something new.
+        self.take_local_job()
+            .or_else(|| self.steal())
+            .or_else(|| self.registry.pop_injected_job())
+    }
+
+    pub(super) fn yield_now(&self) -> Yield {
+        match self.find_work() {
+            Some(job) => unsafe {
+                self.execute(job);
+                Yield::Executed
+            },
+            None => Yield::Idle,
+        }
+    }
+
+    pub(super) fn yield_local(&self) -> Yield {
+        match self.take_local_job() {
+            Some(job) => unsafe {
+                self.execute(job);
+                Yield::Executed
+            },
+            None => Yield::Idle,
+        }
+    }
+
+    #[inline]
+    pub(super) unsafe fn execute(&self, job: JobRef) {
+        job.execute();
+    }
+
+    /// Try to steal a single job and return it.
+    ///
+    /// This should only be done as a last resort, when there is no
+    /// local work to do.
+    fn steal(&self) -> Option<JobRef> {
+        // we only steal when we don't have any work to do locally
+        debug_assert!(self.local_deque_is_empty());
+
+        // otherwise, try to steal
+        let thread_infos = &self.registry.thread_infos.as_slice();
+        let num_threads = thread_infos.len();
+        if num_threads <= 1 {
+            return None;
+        }
+
+        loop {
+            let mut retry = false;
+            let start = self.rng.next_usize(num_threads);
+            let job = (start..num_threads)
+                .chain(0..start)
+                .filter(move |&i| i != self.index)
+                .find_map(|victim_index| {
+                    let victim = &thread_infos[victim_index];
+                    match victim.stealer.steal() {
+                        Steal::Success(job) => Some(job),
+                        Steal::Empty => None,
+                        Steal::Retry => {
+                            retry = true;
+                            None
+                        }
+                    }
+                });
+            if job.is_some() || !retry {
+                return job;
+            }
+        }
+    }
+}
+
+/// ////////////////////////////////////////////////////////////////////////
+
+unsafe fn main_loop(thread: ThreadBuilder) {
+    let worker_thread = &WorkerThread::from(thread);
+    WorkerThread::set_current(worker_thread);
+    let registry = &*worker_thread.registry;
+    let index = worker_thread.index;
+
+    // let registry know we are ready to do work
+    Latch::set(&registry.thread_infos[index].primed);
+
+    // Worker threads should not panic. If they do, just abort, as the
+    // internal state of the threadpool is corrupted. Note that if
+    // **user code** panics, we should catch that and redirect.
+    let abort_guard = unwind::AbortIfPanic;
+
+    // Inform a user callback that we started a thread.
+    if let Some(ref handler) = registry.start_handler {
+        registry.catch_unwind(|| handler(index));
+    }
+
+    worker_thread.wait_until_out_of_work();
+
+    // Normal termination, do not abort.
+    mem::forget(abort_guard);
+
+    // Inform a user callback that we exited a thread.
+    if let Some(ref handler) = registry.exit_handler {
+        registry.catch_unwind(|| handler(index));
+        // We're already exiting the thread, there's nothing else to do.
+    }
+}
+
+/// If already in a worker-thread, just execute `op`.  Otherwise,
+/// execute `op` in the default thread-pool. Either way, block until
+/// `op` completes and return its return value. If `op` panics, that
+/// panic will be propagated as well.  The second argument indicates
+/// `true` if injection was performed, `false` if executed directly.
+pub(super) fn in_worker<OP, R>(op: OP) -> R
+where
+    OP: FnOnce(&WorkerThread, bool) -> R + Send,
+    R: Send,
+{
+    unsafe {
+        let owner_thread = WorkerThread::current();
+        if !owner_thread.is_null() {
+            // Perfectly valid to give them a `&T`: this is the
+            // current thread, so we know the data structure won't be
+            // invalidated until we return.
+            op(&*owner_thread, false)
+        } else {
+            global_registry().in_worker(op)
+        }
+    }
+}
+
+/// [xorshift*] is a fast pseudorandom number generator which will
+/// even tolerate weak seeding, as long as it's not zero.
+///
+/// [xorshift*]: https://en.wikipedia.org/wiki/Xorshift#xorshift*
+struct XorShift64Star {
+    state: Cell<u64>,
+}
+
+impl XorShift64Star {
+    fn new() -> Self {
+        // Any non-zero seed will do -- this uses the hash of a global counter.
+        let mut seed = 0;
+        while seed == 0 {
+            let mut hasher = DefaultHasher::new();
+            static COUNTER: AtomicUsize = AtomicUsize::new(0);
+            hasher.write_usize(COUNTER.fetch_add(1, Ordering::Relaxed));
+            seed = hasher.finish();
+        }
+
+        XorShift64Star {
+            state: Cell::new(seed),
+        }
+    }
+
+    fn next(&self) -> u64 {
+        let mut x = self.state.get();
+        debug_assert_ne!(x, 0);
+        x ^= x >> 12;
+        x ^= x << 25;
+        x ^= x >> 27;
+        self.state.set(x);
+        x.wrapping_mul(0x2545_f491_4f6c_dd1d)
+    }
+
+    /// Return a value from `0..n`.
+    fn next_usize(&self, n: usize) -> usize {
+        (self.next() % n as u64) as usize
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/scope/mod.rs.html b/src/rayon_core/scope/mod.rs.html new file mode 100644 index 0000000000..d257ba8f4d --- /dev/null +++ b/src/rayon_core/scope/mod.rs.html @@ -0,0 +1,1541 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+
//! Methods for custom fork-join scopes, created by the [`scope()`]
+//! and [`in_place_scope()`] functions. These are a more flexible alternative to [`join()`].
+//!
+//! [`scope()`]: fn.scope.html
+//! [`in_place_scope()`]: fn.in_place_scope.html
+//! [`join()`]: ../join/join.fn.html
+
+use crate::broadcast::BroadcastContext;
+use crate::job::{ArcJob, HeapJob, JobFifo, JobRef};
+use crate::latch::{CountLatch, Latch};
+use crate::registry::{global_registry, in_worker, Registry, WorkerThread};
+use crate::unwind;
+use std::any::Any;
+use std::fmt;
+use std::marker::PhantomData;
+use std::mem::ManuallyDrop;
+use std::ptr;
+use std::sync::atomic::{AtomicPtr, Ordering};
+use std::sync::Arc;
+
+#[cfg(test)]
+mod test;
+
+/// Represents a fork-join scope which can be used to spawn any number of tasks.
+/// See [`scope()`] for more information.
+///
+///[`scope()`]: fn.scope.html
+pub struct Scope<'scope> {
+    base: ScopeBase<'scope>,
+}
+
+/// Represents a fork-join scope which can be used to spawn any number of tasks.
+/// Those spawned from the same thread are prioritized in relative FIFO order.
+/// See [`scope_fifo()`] for more information.
+///
+///[`scope_fifo()`]: fn.scope_fifo.html
+pub struct ScopeFifo<'scope> {
+    base: ScopeBase<'scope>,
+    fifos: Vec<JobFifo>,
+}
+
+struct ScopeBase<'scope> {
+    /// thread registry where `scope()` was executed or where `in_place_scope()`
+    /// should spawn jobs.
+    registry: Arc<Registry>,
+
+    /// if some job panicked, the error is stored here; it will be
+    /// propagated to the one who created the scope
+    panic: AtomicPtr<Box<dyn Any + Send + 'static>>,
+
+    /// latch to track job counts
+    job_completed_latch: CountLatch,
+
+    /// You can think of a scope as containing a list of closures to execute,
+    /// all of which outlive `'scope`.  They're not actually required to be
+    /// `Sync`, but it's still safe to let the `Scope` implement `Sync` because
+    /// the closures are only *moved* across threads to be executed.
+    marker: PhantomData<Box<dyn FnOnce(&Scope<'scope>) + Send + Sync + 'scope>>,
+}
+
+/// Creates a "fork-join" scope `s` and invokes the closure with a
+/// reference to `s`. This closure can then spawn asynchronous tasks
+/// into `s`. Those tasks may run asynchronously with respect to the
+/// closure; they may themselves spawn additional tasks into `s`. When
+/// the closure returns, it will block until all tasks that have been
+/// spawned into `s` complete.
+///
+/// `scope()` is a more flexible building block compared to `join()`,
+/// since a loop can be used to spawn any number of tasks without
+/// recursing. However, that flexibility comes at a performance price:
+/// tasks spawned using `scope()` must be allocated onto the heap,
+/// whereas `join()` can make exclusive use of the stack. **Prefer
+/// `join()` (or, even better, parallel iterators) where possible.**
+///
+/// # Example
+///
+/// The Rayon `join()` function launches two closures and waits for them
+/// to stop. One could implement `join()` using a scope like so, although
+/// it would be less efficient than the real implementation:
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// pub fn join<A,B,RA,RB>(oper_a: A, oper_b: B) -> (RA, RB)
+///     where A: FnOnce() -> RA + Send,
+///           B: FnOnce() -> RB + Send,
+///           RA: Send,
+///           RB: Send,
+/// {
+///     let mut result_a: Option<RA> = None;
+///     let mut result_b: Option<RB> = None;
+///     rayon::scope(|s| {
+///         s.spawn(|_| result_a = Some(oper_a()));
+///         s.spawn(|_| result_b = Some(oper_b()));
+///     });
+///     (result_a.unwrap(), result_b.unwrap())
+/// }
+/// ```
+///
+/// # A note on threading
+///
+/// The closure given to `scope()` executes in the Rayon thread-pool,
+/// as do those given to `spawn()`. This means that you can't access
+/// thread-local variables (well, you can, but they may have
+/// unexpected values).
+///
+/// # Task execution
+///
+/// Task execution potentially starts as soon as `spawn()` is called.
+/// The task will end sometime before `scope()` returns. Note that the
+/// *closure* given to scope may return much earlier. In general
+/// the lifetime of a scope created like `scope(body)` goes something like this:
+///
+/// - Scope begins when `scope(body)` is called
+/// - Scope body `body()` is invoked
+///     - Scope tasks may be spawned
+/// - Scope body returns
+/// - Scope tasks execute, possibly spawning more tasks
+/// - Once all tasks are done, scope ends and `scope()` returns
+///
+/// To see how and when tasks are joined, consider this example:
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// // point start
+/// rayon::scope(|s| {
+///     s.spawn(|s| { // task s.1
+///         s.spawn(|s| { // task s.1.1
+///             rayon::scope(|t| {
+///                 t.spawn(|_| ()); // task t.1
+///                 t.spawn(|_| ()); // task t.2
+///             });
+///         });
+///     });
+///     s.spawn(|s| { // task s.2
+///     });
+///     // point mid
+/// });
+/// // point end
+/// ```
+///
+/// The various tasks that are run will execute roughly like so:
+///
+/// ```notrust
+/// | (start)
+/// |
+/// | (scope `s` created)
+/// +-----------------------------------------------+ (task s.2)
+/// +-------+ (task s.1)                            |
+/// |       |                                       |
+/// |       +---+ (task s.1.1)                      |
+/// |       |   |                                   |
+/// |       |   | (scope `t` created)               |
+/// |       |   +----------------+ (task t.2)       |
+/// |       |   +---+ (task t.1) |                  |
+/// | (mid) |   |   |            |                  |
+/// :       |   + <-+------------+ (scope `t` ends) |
+/// :       |   |                                   |
+/// |<------+---+-----------------------------------+ (scope `s` ends)
+/// |
+/// | (end)
+/// ```
+///
+/// The point here is that everything spawned into scope `s` will
+/// terminate (at latest) at the same point -- right before the
+/// original call to `rayon::scope` returns. This includes new
+/// subtasks created by other subtasks (e.g., task `s.1.1`). If a new
+/// scope is created (such as `t`), the things spawned into that scope
+/// will be joined before that scope returns, which in turn occurs
+/// before the creating task (task `s.1.1` in this case) finishes.
+///
+/// There is no guaranteed order of execution for spawns in a scope,
+/// given that other threads may steal tasks at any time. However, they
+/// are generally prioritized in a LIFO order on the thread from which
+/// they were spawned. So in this example, absent any stealing, we can
+/// expect `s.2` to execute before `s.1`, and `t.2` before `t.1`. Other
+/// threads always steal from the other end of the deque, like FIFO
+/// order.  The idea is that "recent" tasks are most likely to be fresh
+/// in the local CPU's cache, while other threads can steal older
+/// "stale" tasks.  For an alternate approach, consider
+/// [`scope_fifo()`] instead.
+///
+/// [`scope_fifo()`]: fn.scope_fifo.html
+///
+/// # Accessing stack data
+///
+/// In general, spawned tasks may access stack data in place that
+/// outlives the scope itself. Other data must be fully owned by the
+/// spawned task.
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// let ok: Vec<i32> = vec![1, 2, 3];
+/// rayon::scope(|s| {
+///     let bad: Vec<i32> = vec![4, 5, 6];
+///     s.spawn(|_| {
+///         // We can access `ok` because outlives the scope `s`.
+///         println!("ok: {:?}", ok);
+///
+///         // If we just try to use `bad` here, the closure will borrow `bad`
+///         // (because we are just printing it out, and that only requires a
+///         // borrow), which will result in a compilation error. Read on
+///         // for options.
+///         // println!("bad: {:?}", bad);
+///    });
+/// });
+/// ```
+///
+/// As the comments example above suggest, to reference `bad` we must
+/// take ownership of it. One way to do this is to detach the closure
+/// from the surrounding stack frame, using the `move` keyword. This
+/// will cause it to take ownership of *all* the variables it touches,
+/// in this case including both `ok` *and* `bad`:
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// let ok: Vec<i32> = vec![1, 2, 3];
+/// rayon::scope(|s| {
+///     let bad: Vec<i32> = vec![4, 5, 6];
+///     s.spawn(move |_| {
+///         println!("ok: {:?}", ok);
+///         println!("bad: {:?}", bad);
+///     });
+///
+///     // That closure is fine, but now we can't use `ok` anywhere else,
+///     // since it is owned by the previous task:
+///     // s.spawn(|_| println!("ok: {:?}", ok));
+/// });
+/// ```
+///
+/// While this works, it could be a problem if we want to use `ok` elsewhere.
+/// There are two choices. We can keep the closure as a `move` closure, but
+/// instead of referencing the variable `ok`, we create a shadowed variable that
+/// is a borrow of `ok` and capture *that*:
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// let ok: Vec<i32> = vec![1, 2, 3];
+/// rayon::scope(|s| {
+///     let bad: Vec<i32> = vec![4, 5, 6];
+///     let ok: &Vec<i32> = &ok; // shadow the original `ok`
+///     s.spawn(move |_| {
+///         println!("ok: {:?}", ok); // captures the shadowed version
+///         println!("bad: {:?}", bad);
+///     });
+///
+///     // Now we too can use the shadowed `ok`, since `&Vec<i32>` references
+///     // can be shared freely. Note that we need a `move` closure here though,
+///     // because otherwise we'd be trying to borrow the shadowed `ok`,
+///     // and that doesn't outlive `scope`.
+///     s.spawn(move |_| println!("ok: {:?}", ok));
+/// });
+/// ```
+///
+/// Another option is not to use the `move` keyword but instead to take ownership
+/// of individual variables:
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// let ok: Vec<i32> = vec![1, 2, 3];
+/// rayon::scope(|s| {
+///     let bad: Vec<i32> = vec![4, 5, 6];
+///     s.spawn(|_| {
+///         // Transfer ownership of `bad` into a local variable (also named `bad`).
+///         // This will force the closure to take ownership of `bad` from the environment.
+///         let bad = bad;
+///         println!("ok: {:?}", ok); // `ok` is only borrowed.
+///         println!("bad: {:?}", bad); // refers to our local variable, above.
+///     });
+///
+///     s.spawn(|_| println!("ok: {:?}", ok)); // we too can borrow `ok`
+/// });
+/// ```
+///
+/// # Panics
+///
+/// If a panic occurs, either in the closure given to `scope()` or in
+/// any of the spawned jobs, that panic will be propagated and the
+/// call to `scope()` will panic. If multiple panics occurs, it is
+/// non-deterministic which of their panic values will propagate.
+/// Regardless, once a task is spawned using `scope.spawn()`, it will
+/// execute, even if the spawning task should later panic. `scope()`
+/// returns once all spawned jobs have completed, and any panics are
+/// propagated at that point.
+pub fn scope<'scope, OP, R>(op: OP) -> R
+where
+    OP: FnOnce(&Scope<'scope>) -> R + Send,
+    R: Send,
+{
+    in_worker(|owner_thread, _| {
+        let scope = Scope::<'scope>::new(Some(owner_thread), None);
+        scope.base.complete(Some(owner_thread), || op(&scope))
+    })
+}
+
+/// Creates a "fork-join" scope `s` with FIFO order, and invokes the
+/// closure with a reference to `s`. This closure can then spawn
+/// asynchronous tasks into `s`. Those tasks may run asynchronously with
+/// respect to the closure; they may themselves spawn additional tasks
+/// into `s`. When the closure returns, it will block until all tasks
+/// that have been spawned into `s` complete.
+///
+/// # Task execution
+///
+/// Tasks in a `scope_fifo()` run similarly to [`scope()`], but there's a
+/// difference in the order of execution. Consider a similar example:
+///
+/// [`scope()`]: fn.scope.html
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// // point start
+/// rayon::scope_fifo(|s| {
+///     s.spawn_fifo(|s| { // task s.1
+///         s.spawn_fifo(|s| { // task s.1.1
+///             rayon::scope_fifo(|t| {
+///                 t.spawn_fifo(|_| ()); // task t.1
+///                 t.spawn_fifo(|_| ()); // task t.2
+///             });
+///         });
+///     });
+///     s.spawn_fifo(|s| { // task s.2
+///     });
+///     // point mid
+/// });
+/// // point end
+/// ```
+///
+/// The various tasks that are run will execute roughly like so:
+///
+/// ```notrust
+/// | (start)
+/// |
+/// | (FIFO scope `s` created)
+/// +--------------------+ (task s.1)
+/// +-------+ (task s.2) |
+/// |       |            +---+ (task s.1.1)
+/// |       |            |   |
+/// |       |            |   | (FIFO scope `t` created)
+/// |       |            |   +----------------+ (task t.1)
+/// |       |            |   +---+ (task t.2) |
+/// | (mid) |            |   |   |            |
+/// :       |            |   + <-+------------+ (scope `t` ends)
+/// :       |            |   |
+/// |<------+------------+---+ (scope `s` ends)
+/// |
+/// | (end)
+/// ```
+///
+/// Under `scope_fifo()`, the spawns are prioritized in a FIFO order on
+/// the thread from which they were spawned, as opposed to `scope()`'s
+/// LIFO.  So in this example, we can expect `s.1` to execute before
+/// `s.2`, and `t.1` before `t.2`. Other threads also steal tasks in
+/// FIFO order, as usual. Overall, this has roughly the same order as
+/// the now-deprecated [`breadth_first`] option, except the effect is
+/// isolated to a particular scope. If spawns are intermingled from any
+/// combination of `scope()` and `scope_fifo()`, or from different
+/// threads, their order is only specified with respect to spawns in the
+/// same scope and thread.
+///
+/// For more details on this design, see Rayon [RFC #1].
+///
+/// [`breadth_first`]: struct.ThreadPoolBuilder.html#method.breadth_first
+/// [RFC #1]: https://github.com/rayon-rs/rfcs/blob/master/accepted/rfc0001-scope-scheduling.md
+///
+/// # Panics
+///
+/// If a panic occurs, either in the closure given to `scope_fifo()` or
+/// in any of the spawned jobs, that panic will be propagated and the
+/// call to `scope_fifo()` will panic. If multiple panics occurs, it is
+/// non-deterministic which of their panic values will propagate.
+/// Regardless, once a task is spawned using `scope.spawn_fifo()`, it
+/// will execute, even if the spawning task should later panic.
+/// `scope_fifo()` returns once all spawned jobs have completed, and any
+/// panics are propagated at that point.
+pub fn scope_fifo<'scope, OP, R>(op: OP) -> R
+where
+    OP: FnOnce(&ScopeFifo<'scope>) -> R + Send,
+    R: Send,
+{
+    in_worker(|owner_thread, _| {
+        let scope = ScopeFifo::<'scope>::new(Some(owner_thread), None);
+        scope.base.complete(Some(owner_thread), || op(&scope))
+    })
+}
+
+/// Creates a "fork-join" scope `s` and invokes the closure with a
+/// reference to `s`. This closure can then spawn asynchronous tasks
+/// into `s`. Those tasks may run asynchronously with respect to the
+/// closure; they may themselves spawn additional tasks into `s`. When
+/// the closure returns, it will block until all tasks that have been
+/// spawned into `s` complete.
+///
+/// This is just like `scope()` except the closure runs on the same thread
+/// that calls `in_place_scope()`. Only work that it spawns runs in the
+/// thread pool.
+///
+/// # Panics
+///
+/// If a panic occurs, either in the closure given to `in_place_scope()` or in
+/// any of the spawned jobs, that panic will be propagated and the
+/// call to `in_place_scope()` will panic. If multiple panics occurs, it is
+/// non-deterministic which of their panic values will propagate.
+/// Regardless, once a task is spawned using `scope.spawn()`, it will
+/// execute, even if the spawning task should later panic. `in_place_scope()`
+/// returns once all spawned jobs have completed, and any panics are
+/// propagated at that point.
+pub fn in_place_scope<'scope, OP, R>(op: OP) -> R
+where
+    OP: FnOnce(&Scope<'scope>) -> R,
+{
+    do_in_place_scope(None, op)
+}
+
+pub(crate) fn do_in_place_scope<'scope, OP, R>(registry: Option<&Arc<Registry>>, op: OP) -> R
+where
+    OP: FnOnce(&Scope<'scope>) -> R,
+{
+    let thread = unsafe { WorkerThread::current().as_ref() };
+    let scope = Scope::<'scope>::new(thread, registry);
+    scope.base.complete(thread, || op(&scope))
+}
+
+/// Creates a "fork-join" scope `s` with FIFO order, and invokes the
+/// closure with a reference to `s`. This closure can then spawn
+/// asynchronous tasks into `s`. Those tasks may run asynchronously with
+/// respect to the closure; they may themselves spawn additional tasks
+/// into `s`. When the closure returns, it will block until all tasks
+/// that have been spawned into `s` complete.
+///
+/// This is just like `scope_fifo()` except the closure runs on the same thread
+/// that calls `in_place_scope_fifo()`. Only work that it spawns runs in the
+/// thread pool.
+///
+/// # Panics
+///
+/// If a panic occurs, either in the closure given to `in_place_scope_fifo()` or in
+/// any of the spawned jobs, that panic will be propagated and the
+/// call to `in_place_scope_fifo()` will panic. If multiple panics occurs, it is
+/// non-deterministic which of their panic values will propagate.
+/// Regardless, once a task is spawned using `scope.spawn_fifo()`, it will
+/// execute, even if the spawning task should later panic. `in_place_scope_fifo()`
+/// returns once all spawned jobs have completed, and any panics are
+/// propagated at that point.
+pub fn in_place_scope_fifo<'scope, OP, R>(op: OP) -> R
+where
+    OP: FnOnce(&ScopeFifo<'scope>) -> R,
+{
+    do_in_place_scope_fifo(None, op)
+}
+
+pub(crate) fn do_in_place_scope_fifo<'scope, OP, R>(registry: Option<&Arc<Registry>>, op: OP) -> R
+where
+    OP: FnOnce(&ScopeFifo<'scope>) -> R,
+{
+    let thread = unsafe { WorkerThread::current().as_ref() };
+    let scope = ScopeFifo::<'scope>::new(thread, registry);
+    scope.base.complete(thread, || op(&scope))
+}
+
+impl<'scope> Scope<'scope> {
+    fn new(owner: Option<&WorkerThread>, registry: Option<&Arc<Registry>>) -> Self {
+        let base = ScopeBase::new(owner, registry);
+        Scope { base }
+    }
+
+    /// Spawns a job into the fork-join scope `self`. This job will
+    /// execute sometime before the fork-join scope completes.  The
+    /// job is specified as a closure, and this closure receives its
+    /// own reference to the scope `self` as argument. This can be
+    /// used to inject new jobs into `self`.
+    ///
+    /// # Returns
+    ///
+    /// Nothing. The spawned closures cannot pass back values to the
+    /// caller directly, though they can write to local variables on
+    /// the stack (if those variables outlive the scope) or
+    /// communicate through shared channels.
+    ///
+    /// (The intention is to eventually integrate with Rust futures to
+    /// support spawns of functions that compute a value.)
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use rayon_core as rayon;
+    /// let mut value_a = None;
+    /// let mut value_b = None;
+    /// let mut value_c = None;
+    /// rayon::scope(|s| {
+    ///     s.spawn(|s1| {
+    ///           // ^ this is the same scope as `s`; this handle `s1`
+    ///           //   is intended for use by the spawned task,
+    ///           //   since scope handles cannot cross thread boundaries.
+    ///
+    ///         value_a = Some(22);
+    ///
+    ///         // the scope `s` will not end until all these tasks are done
+    ///         s1.spawn(|_| {
+    ///             value_b = Some(44);
+    ///         });
+    ///     });
+    ///
+    ///     s.spawn(|_| {
+    ///         value_c = Some(66);
+    ///     });
+    /// });
+    /// assert_eq!(value_a, Some(22));
+    /// assert_eq!(value_b, Some(44));
+    /// assert_eq!(value_c, Some(66));
+    /// ```
+    ///
+    /// # See also
+    ///
+    /// The [`scope` function] has more extensive documentation about
+    /// task spawning.
+    ///
+    /// [`scope` function]: fn.scope.html
+    pub fn spawn<BODY>(&self, body: BODY)
+    where
+        BODY: FnOnce(&Scope<'scope>) + Send + 'scope,
+    {
+        let scope_ptr = ScopePtr(self);
+        let job = HeapJob::new(move || unsafe {
+            // SAFETY: this job will execute before the scope ends.
+            let scope = scope_ptr.as_ref();
+            ScopeBase::execute_job(&scope.base, move || body(scope))
+        });
+        let job_ref = self.base.heap_job_ref(job);
+
+        // Since `Scope` implements `Sync`, we can't be sure that we're still in a
+        // thread of this pool, so we can't just push to the local worker thread.
+        // Also, this might be an in-place scope.
+        self.base.registry.inject_or_push(job_ref);
+    }
+
+    /// Spawns a job into every thread of the fork-join scope `self`. This job will
+    /// execute on each thread sometime before the fork-join scope completes.  The
+    /// job is specified as a closure, and this closure receives its own reference
+    /// to the scope `self` as argument, as well as a `BroadcastContext`.
+    pub fn spawn_broadcast<BODY>(&self, body: BODY)
+    where
+        BODY: Fn(&Scope<'scope>, BroadcastContext<'_>) + Send + Sync + 'scope,
+    {
+        let scope_ptr = ScopePtr(self);
+        let job = ArcJob::new(move || unsafe {
+            // SAFETY: this job will execute before the scope ends.
+            let scope = scope_ptr.as_ref();
+            let body = &body;
+            let func = move || BroadcastContext::with(move |ctx| body(scope, ctx));
+            ScopeBase::execute_job(&scope.base, func)
+        });
+        self.base.inject_broadcast(job)
+    }
+}
+
+impl<'scope> ScopeFifo<'scope> {
+    fn new(owner: Option<&WorkerThread>, registry: Option<&Arc<Registry>>) -> Self {
+        let base = ScopeBase::new(owner, registry);
+        let num_threads = base.registry.num_threads();
+        let fifos = (0..num_threads).map(|_| JobFifo::new()).collect();
+        ScopeFifo { base, fifos }
+    }
+
+    /// Spawns a job into the fork-join scope `self`. This job will
+    /// execute sometime before the fork-join scope completes.  The
+    /// job is specified as a closure, and this closure receives its
+    /// own reference to the scope `self` as argument. This can be
+    /// used to inject new jobs into `self`.
+    ///
+    /// # See also
+    ///
+    /// This method is akin to [`Scope::spawn()`], but with a FIFO
+    /// priority.  The [`scope_fifo` function] has more details about
+    /// this distinction.
+    ///
+    /// [`Scope::spawn()`]: struct.Scope.html#method.spawn
+    /// [`scope_fifo` function]: fn.scope_fifo.html
+    pub fn spawn_fifo<BODY>(&self, body: BODY)
+    where
+        BODY: FnOnce(&ScopeFifo<'scope>) + Send + 'scope,
+    {
+        let scope_ptr = ScopePtr(self);
+        let job = HeapJob::new(move || unsafe {
+            // SAFETY: this job will execute before the scope ends.
+            let scope = scope_ptr.as_ref();
+            ScopeBase::execute_job(&scope.base, move || body(scope))
+        });
+        let job_ref = self.base.heap_job_ref(job);
+
+        // If we're in the pool, use our scope's private fifo for this thread to execute
+        // in a locally-FIFO order. Otherwise, just use the pool's global injector.
+        match self.base.registry.current_thread() {
+            Some(worker) => {
+                let fifo = &self.fifos[worker.index()];
+                // SAFETY: this job will execute before the scope ends.
+                unsafe { worker.push(fifo.push(job_ref)) };
+            }
+            None => self.base.registry.inject(job_ref),
+        }
+    }
+
+    /// Spawns a job into every thread of the fork-join scope `self`. This job will
+    /// execute on each thread sometime before the fork-join scope completes.  The
+    /// job is specified as a closure, and this closure receives its own reference
+    /// to the scope `self` as argument, as well as a `BroadcastContext`.
+    pub fn spawn_broadcast<BODY>(&self, body: BODY)
+    where
+        BODY: Fn(&ScopeFifo<'scope>, BroadcastContext<'_>) + Send + Sync + 'scope,
+    {
+        let scope_ptr = ScopePtr(self);
+        let job = ArcJob::new(move || unsafe {
+            // SAFETY: this job will execute before the scope ends.
+            let scope = scope_ptr.as_ref();
+            let body = &body;
+            let func = move || BroadcastContext::with(move |ctx| body(scope, ctx));
+            ScopeBase::execute_job(&scope.base, func)
+        });
+        self.base.inject_broadcast(job)
+    }
+}
+
+impl<'scope> ScopeBase<'scope> {
+    /// Creates the base of a new scope for the given registry
+    fn new(owner: Option<&WorkerThread>, registry: Option<&Arc<Registry>>) -> Self {
+        let registry = registry.unwrap_or_else(|| match owner {
+            Some(owner) => owner.registry(),
+            None => global_registry(),
+        });
+
+        ScopeBase {
+            registry: Arc::clone(registry),
+            panic: AtomicPtr::new(ptr::null_mut()),
+            job_completed_latch: CountLatch::new(owner),
+            marker: PhantomData,
+        }
+    }
+
+    fn heap_job_ref<FUNC>(&self, job: Box<HeapJob<FUNC>>) -> JobRef
+    where
+        FUNC: FnOnce() + Send + 'scope,
+    {
+        unsafe {
+            self.job_completed_latch.increment();
+            job.into_job_ref()
+        }
+    }
+
+    fn inject_broadcast<FUNC>(&self, job: Arc<ArcJob<FUNC>>)
+    where
+        FUNC: Fn() + Send + Sync + 'scope,
+    {
+        let n_threads = self.registry.num_threads();
+        let job_refs = (0..n_threads).map(|_| unsafe {
+            self.job_completed_latch.increment();
+            ArcJob::as_job_ref(&job)
+        });
+
+        self.registry.inject_broadcast(job_refs);
+    }
+
+    /// Executes `func` as a job, either aborting or executing as
+    /// appropriate.
+    fn complete<FUNC, R>(&self, owner: Option<&WorkerThread>, func: FUNC) -> R
+    where
+        FUNC: FnOnce() -> R,
+    {
+        let result = unsafe { Self::execute_job_closure(self, func) };
+        self.job_completed_latch.wait(owner);
+        self.maybe_propagate_panic();
+        result.unwrap() // only None if `op` panicked, and that would have been propagated
+    }
+
+    /// Executes `func` as a job, either aborting or executing as
+    /// appropriate.
+    unsafe fn execute_job<FUNC>(this: *const Self, func: FUNC)
+    where
+        FUNC: FnOnce(),
+    {
+        let _: Option<()> = Self::execute_job_closure(this, func);
+    }
+
+    /// Executes `func` as a job in scope. Adjusts the "job completed"
+    /// counters and also catches any panic and stores it into
+    /// `scope`.
+    unsafe fn execute_job_closure<FUNC, R>(this: *const Self, func: FUNC) -> Option<R>
+    where
+        FUNC: FnOnce() -> R,
+    {
+        let result = match unwind::halt_unwinding(func) {
+            Ok(r) => Some(r),
+            Err(err) => {
+                (*this).job_panicked(err);
+                None
+            }
+        };
+        Latch::set(&(*this).job_completed_latch);
+        result
+    }
+
+    fn job_panicked(&self, err: Box<dyn Any + Send + 'static>) {
+        // capture the first error we see, free the rest
+        if self.panic.load(Ordering::Relaxed).is_null() {
+            let nil = ptr::null_mut();
+            let mut err = ManuallyDrop::new(Box::new(err)); // box up the fat ptr
+            let err_ptr: *mut Box<dyn Any + Send + 'static> = &mut **err;
+            if self
+                .panic
+                .compare_exchange(nil, err_ptr, Ordering::Release, Ordering::Relaxed)
+                .is_ok()
+            {
+                // ownership now transferred into self.panic
+            } else {
+                // another panic raced in ahead of us, so drop ours
+                let _: Box<Box<_>> = ManuallyDrop::into_inner(err);
+            }
+        }
+    }
+
+    fn maybe_propagate_panic(&self) {
+        // propagate panic, if any occurred; at this point, all
+        // outstanding jobs have completed, so we can use a relaxed
+        // ordering:
+        let panic = self.panic.swap(ptr::null_mut(), Ordering::Relaxed);
+        if !panic.is_null() {
+            let value = unsafe { Box::from_raw(panic) };
+            unwind::resume_unwinding(*value);
+        }
+    }
+}
+
+impl<'scope> fmt::Debug for Scope<'scope> {
+    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt.debug_struct("Scope")
+            .field("pool_id", &self.base.registry.id())
+            .field("panic", &self.base.panic)
+            .field("job_completed_latch", &self.base.job_completed_latch)
+            .finish()
+    }
+}
+
+impl<'scope> fmt::Debug for ScopeFifo<'scope> {
+    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt.debug_struct("ScopeFifo")
+            .field("num_fifos", &self.fifos.len())
+            .field("pool_id", &self.base.registry.id())
+            .field("panic", &self.base.panic)
+            .field("job_completed_latch", &self.base.job_completed_latch)
+            .finish()
+    }
+}
+
+/// Used to capture a scope `&Self` pointer in jobs, without faking a lifetime.
+///
+/// Unsafe code is still required to dereference the pointer, but that's fine in
+/// scope jobs that are guaranteed to execute before the scope ends.
+struct ScopePtr<T>(*const T);
+
+// SAFETY: !Send for raw pointers is not for safety, just as a lint
+unsafe impl<T: Sync> Send for ScopePtr<T> {}
+
+// SAFETY: !Sync for raw pointers is not for safety, just as a lint
+unsafe impl<T: Sync> Sync for ScopePtr<T> {}
+
+impl<T> ScopePtr<T> {
+    // Helper to avoid disjoint captures of `scope_ptr.0`
+    unsafe fn as_ref(&self) -> &T {
+        &*self.0
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/sleep/counters.rs.html b/src/rayon_core/sleep/counters.rs.html new file mode 100644 index 0000000000..75ca3a1751 --- /dev/null +++ b/src/rayon_core/sleep/counters.rs.html @@ -0,0 +1,557 @@ +counters.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+
use std::sync::atomic::{AtomicUsize, Ordering};
+
+pub(super) struct AtomicCounters {
+    /// Packs together a number of counters. The counters are ordered as
+    /// follows, from least to most significant bits (here, we assuming
+    /// that [`THREADS_BITS`] is equal to 10):
+    ///
+    /// * Bits 0..10: Stores the number of **sleeping threads**
+    /// * Bits 10..20: Stores the number of **inactive threads**
+    /// * Bits 20..: Stores the **job event counter** (JEC)
+    ///
+    /// This uses 10 bits ([`THREADS_BITS`]) to encode the number of threads. Note
+    /// that the total number of bits (and hence the number of bits used for the
+    /// JEC) will depend on whether we are using a 32- or 64-bit architecture.
+    value: AtomicUsize,
+}
+
+#[derive(Copy, Clone)]
+pub(super) struct Counters {
+    word: usize,
+}
+
+/// A value read from the **Jobs Event Counter**.
+/// See the [`README.md`](README.md) for more
+/// coverage of how the jobs event counter works.
+#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
+pub(super) struct JobsEventCounter(usize);
+
+impl JobsEventCounter {
+    pub(super) const DUMMY: JobsEventCounter = JobsEventCounter(std::usize::MAX);
+
+    #[inline]
+    pub(super) fn as_usize(self) -> usize {
+        self.0
+    }
+
+    /// The JEC "is sleepy" if the last thread to increment it was in the
+    /// process of becoming sleepy. This is indicated by its value being *even*.
+    /// When new jobs are posted, they check if the JEC is sleepy, and if so
+    /// they incremented it.
+    #[inline]
+    pub(super) fn is_sleepy(self) -> bool {
+        (self.as_usize() & 1) == 0
+    }
+
+    /// The JEC "is active" if the last thread to increment it was posting new
+    /// work. This is indicated by its value being *odd*. When threads get
+    /// sleepy, they will check if the JEC is active, and increment it.
+    #[inline]
+    pub(super) fn is_active(self) -> bool {
+        !self.is_sleepy()
+    }
+}
+
+/// Number of bits used for the thread counters.
+#[cfg(target_pointer_width = "64")]
+const THREADS_BITS: usize = 16;
+
+#[cfg(target_pointer_width = "32")]
+const THREADS_BITS: usize = 8;
+
+/// Bits to shift to select the sleeping threads
+/// (used with `select_bits`).
+#[allow(clippy::erasing_op)]
+const SLEEPING_SHIFT: usize = 0 * THREADS_BITS;
+
+/// Bits to shift to select the inactive threads
+/// (used with `select_bits`).
+#[allow(clippy::identity_op)]
+const INACTIVE_SHIFT: usize = 1 * THREADS_BITS;
+
+/// Bits to shift to select the JEC
+/// (use JOBS_BITS).
+const JEC_SHIFT: usize = 2 * THREADS_BITS;
+
+/// Max value for the thread counters.
+pub(crate) const THREADS_MAX: usize = (1 << THREADS_BITS) - 1;
+
+/// Constant that can be added to add one sleeping thread.
+const ONE_SLEEPING: usize = 1;
+
+/// Constant that can be added to add one inactive thread.
+/// An inactive thread is either idle, sleepy, or sleeping.
+const ONE_INACTIVE: usize = 1 << INACTIVE_SHIFT;
+
+/// Constant that can be added to add one to the JEC.
+const ONE_JEC: usize = 1 << JEC_SHIFT;
+
+impl AtomicCounters {
+    #[inline]
+    pub(super) fn new() -> AtomicCounters {
+        AtomicCounters {
+            value: AtomicUsize::new(0),
+        }
+    }
+
+    /// Load and return the current value of the various counters.
+    /// This value can then be given to other method which will
+    /// attempt to update the counters via compare-and-swap.
+    #[inline]
+    pub(super) fn load(&self, ordering: Ordering) -> Counters {
+        Counters::new(self.value.load(ordering))
+    }
+
+    #[inline]
+    fn try_exchange(&self, old_value: Counters, new_value: Counters, ordering: Ordering) -> bool {
+        self.value
+            .compare_exchange(old_value.word, new_value.word, ordering, Ordering::Relaxed)
+            .is_ok()
+    }
+
+    /// Adds an inactive thread. This cannot fail.
+    ///
+    /// This should be invoked when a thread enters its idle loop looking
+    /// for work. It is decremented when work is found. Note that it is
+    /// not decremented if the thread transitions from idle to sleepy or sleeping;
+    /// so the number of inactive threads is always greater-than-or-equal
+    /// to the number of sleeping threads.
+    #[inline]
+    pub(super) fn add_inactive_thread(&self) {
+        self.value.fetch_add(ONE_INACTIVE, Ordering::SeqCst);
+    }
+
+    /// Increments the jobs event counter if `increment_when`, when applied to
+    /// the current value, is true. Used to toggle the JEC from even (sleepy) to
+    /// odd (active) or vice versa. Returns the final value of the counters, for
+    /// which `increment_when` is guaranteed to return false.
+    pub(super) fn increment_jobs_event_counter_if(
+        &self,
+        increment_when: impl Fn(JobsEventCounter) -> bool,
+    ) -> Counters {
+        loop {
+            let old_value = self.load(Ordering::SeqCst);
+            if increment_when(old_value.jobs_counter()) {
+                let new_value = old_value.increment_jobs_counter();
+                if self.try_exchange(old_value, new_value, Ordering::SeqCst) {
+                    return new_value;
+                }
+            } else {
+                return old_value;
+            }
+        }
+    }
+
+    /// Subtracts an inactive thread. This cannot fail. It is invoked
+    /// when a thread finds work and hence becomes active. It returns the
+    /// number of sleeping threads to wake up (if any).
+    ///
+    /// See `add_inactive_thread`.
+    #[inline]
+    pub(super) fn sub_inactive_thread(&self) -> usize {
+        let old_value = Counters::new(self.value.fetch_sub(ONE_INACTIVE, Ordering::SeqCst));
+        debug_assert!(
+            old_value.inactive_threads() > 0,
+            "sub_inactive_thread: old_value {:?} has no inactive threads",
+            old_value,
+        );
+        debug_assert!(
+            old_value.sleeping_threads() <= old_value.inactive_threads(),
+            "sub_inactive_thread: old_value {:?} had {} sleeping threads and {} inactive threads",
+            old_value,
+            old_value.sleeping_threads(),
+            old_value.inactive_threads(),
+        );
+
+        // Current heuristic: whenever an inactive thread goes away, if
+        // there are any sleeping threads, wake 'em up.
+        let sleeping_threads = old_value.sleeping_threads();
+        std::cmp::min(sleeping_threads, 2)
+    }
+
+    /// Subtracts a sleeping thread. This cannot fail, but it is only
+    /// safe to do if you you know the number of sleeping threads is
+    /// non-zero (i.e., because you have just awoken a sleeping
+    /// thread).
+    #[inline]
+    pub(super) fn sub_sleeping_thread(&self) {
+        let old_value = Counters::new(self.value.fetch_sub(ONE_SLEEPING, Ordering::SeqCst));
+        debug_assert!(
+            old_value.sleeping_threads() > 0,
+            "sub_sleeping_thread: old_value {:?} had no sleeping threads",
+            old_value,
+        );
+        debug_assert!(
+            old_value.sleeping_threads() <= old_value.inactive_threads(),
+            "sub_sleeping_thread: old_value {:?} had {} sleeping threads and {} inactive threads",
+            old_value,
+            old_value.sleeping_threads(),
+            old_value.inactive_threads(),
+        );
+    }
+
+    #[inline]
+    pub(super) fn try_add_sleeping_thread(&self, old_value: Counters) -> bool {
+        debug_assert!(
+            old_value.inactive_threads() > 0,
+            "try_add_sleeping_thread: old_value {:?} has no inactive threads",
+            old_value,
+        );
+        debug_assert!(
+            old_value.sleeping_threads() < THREADS_MAX,
+            "try_add_sleeping_thread: old_value {:?} has too many sleeping threads",
+            old_value,
+        );
+
+        let mut new_value = old_value;
+        new_value.word += ONE_SLEEPING;
+
+        self.try_exchange(old_value, new_value, Ordering::SeqCst)
+    }
+}
+
+#[inline]
+fn select_thread(word: usize, shift: usize) -> usize {
+    (word >> shift) & THREADS_MAX
+}
+
+#[inline]
+fn select_jec(word: usize) -> usize {
+    word >> JEC_SHIFT
+}
+
+impl Counters {
+    #[inline]
+    fn new(word: usize) -> Counters {
+        Counters { word }
+    }
+
+    #[inline]
+    fn increment_jobs_counter(self) -> Counters {
+        // We can freely add to JEC because it occupies the most significant bits.
+        // Thus it doesn't overflow into the other counters, just wraps itself.
+        Counters {
+            word: self.word.wrapping_add(ONE_JEC),
+        }
+    }
+
+    #[inline]
+    pub(super) fn jobs_counter(self) -> JobsEventCounter {
+        JobsEventCounter(select_jec(self.word))
+    }
+
+    /// The number of threads that are not actively
+    /// executing work. They may be idle, sleepy, or asleep.
+    #[inline]
+    pub(super) fn inactive_threads(self) -> usize {
+        select_thread(self.word, INACTIVE_SHIFT)
+    }
+
+    #[inline]
+    pub(super) fn awake_but_idle_threads(self) -> usize {
+        debug_assert!(
+            self.sleeping_threads() <= self.inactive_threads(),
+            "sleeping threads: {} > raw idle threads {}",
+            self.sleeping_threads(),
+            self.inactive_threads()
+        );
+        self.inactive_threads() - self.sleeping_threads()
+    }
+
+    #[inline]
+    pub(super) fn sleeping_threads(self) -> usize {
+        select_thread(self.word, SLEEPING_SHIFT)
+    }
+}
+
+impl std::fmt::Debug for Counters {
+    fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        let word = format!("{:016x}", self.word);
+        fmt.debug_struct("Counters")
+            .field("word", &word)
+            .field("jobs", &self.jobs_counter().0)
+            .field("inactive", &self.inactive_threads())
+            .field("sleeping", &self.sleeping_threads())
+            .finish()
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/sleep/mod.rs.html b/src/rayon_core/sleep/mod.rs.html new file mode 100644 index 0000000000..ddf735727e --- /dev/null +++ b/src/rayon_core/sleep/mod.rs.html @@ -0,0 +1,653 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+
//! Code that decides when workers should go to sleep. See README.md
+//! for an overview.
+
+use crate::latch::CoreLatch;
+use crate::sync::{Condvar, Mutex};
+use crossbeam_utils::CachePadded;
+use std::sync::atomic::Ordering;
+use std::thread;
+use std::usize;
+
+mod counters;
+pub(crate) use self::counters::THREADS_MAX;
+use self::counters::{AtomicCounters, JobsEventCounter};
+
+/// The `Sleep` struct is embedded into each registry. It governs the waking and sleeping
+/// of workers. It has callbacks that are invoked periodically at significant events,
+/// such as when workers are looping and looking for work, when latches are set, or when
+/// jobs are published, and it either blocks threads or wakes them in response to these
+/// events. See the [`README.md`] in this module for more details.
+///
+/// [`README.md`] README.md
+pub(super) struct Sleep {
+    /// One "sleep state" per worker. Used to track if a worker is sleeping and to have
+    /// them block.
+    worker_sleep_states: Vec<CachePadded<WorkerSleepState>>,
+
+    counters: AtomicCounters,
+}
+
+/// An instance of this struct is created when a thread becomes idle.
+/// It is consumed when the thread finds work, and passed by `&mut`
+/// reference for operations that preserve the idle state. (In other
+/// words, producing one of these structs is evidence the thread is
+/// idle.) It tracks state such as how long the thread has been idle.
+pub(super) struct IdleState {
+    /// What is worker index of the idle thread?
+    worker_index: usize,
+
+    /// How many rounds have we been circling without sleeping?
+    rounds: u32,
+
+    /// Once we become sleepy, what was the sleepy counter value?
+    /// Set to `INVALID_SLEEPY_COUNTER` otherwise.
+    jobs_counter: JobsEventCounter,
+}
+
+/// The "sleep state" for an individual worker.
+#[derive(Default)]
+struct WorkerSleepState {
+    /// Set to true when the worker goes to sleep; set to false when
+    /// the worker is notified or when it wakes.
+    is_blocked: Mutex<bool>,
+
+    condvar: Condvar,
+}
+
+const ROUNDS_UNTIL_SLEEPY: u32 = 32;
+const ROUNDS_UNTIL_SLEEPING: u32 = ROUNDS_UNTIL_SLEEPY + 1;
+
+impl Sleep {
+    pub(super) fn new(n_threads: usize) -> Sleep {
+        assert!(n_threads <= THREADS_MAX);
+        Sleep {
+            worker_sleep_states: (0..n_threads).map(|_| Default::default()).collect(),
+            counters: AtomicCounters::new(),
+        }
+    }
+
+    #[inline]
+    pub(super) fn start_looking(&self, worker_index: usize) -> IdleState {
+        self.counters.add_inactive_thread();
+
+        IdleState {
+            worker_index,
+            rounds: 0,
+            jobs_counter: JobsEventCounter::DUMMY,
+        }
+    }
+
+    #[inline]
+    pub(super) fn work_found(&self) {
+        // If we were the last idle thread and other threads are still sleeping,
+        // then we should wake up another thread.
+        let threads_to_wake = self.counters.sub_inactive_thread();
+        self.wake_any_threads(threads_to_wake as u32);
+    }
+
+    #[inline]
+    pub(super) fn no_work_found(
+        &self,
+        idle_state: &mut IdleState,
+        latch: &CoreLatch,
+        has_injected_jobs: impl FnOnce() -> bool,
+    ) {
+        if idle_state.rounds < ROUNDS_UNTIL_SLEEPY {
+            thread::yield_now();
+            idle_state.rounds += 1;
+        } else if idle_state.rounds == ROUNDS_UNTIL_SLEEPY {
+            idle_state.jobs_counter = self.announce_sleepy();
+            idle_state.rounds += 1;
+            thread::yield_now();
+        } else if idle_state.rounds < ROUNDS_UNTIL_SLEEPING {
+            idle_state.rounds += 1;
+            thread::yield_now();
+        } else {
+            debug_assert_eq!(idle_state.rounds, ROUNDS_UNTIL_SLEEPING);
+            self.sleep(idle_state, latch, has_injected_jobs);
+        }
+    }
+
+    #[cold]
+    fn announce_sleepy(&self) -> JobsEventCounter {
+        self.counters
+            .increment_jobs_event_counter_if(JobsEventCounter::is_active)
+            .jobs_counter()
+    }
+
+    #[cold]
+    fn sleep(
+        &self,
+        idle_state: &mut IdleState,
+        latch: &CoreLatch,
+        has_injected_jobs: impl FnOnce() -> bool,
+    ) {
+        let worker_index = idle_state.worker_index;
+
+        if !latch.get_sleepy() {
+            return;
+        }
+
+        let sleep_state = &self.worker_sleep_states[worker_index];
+        let mut is_blocked = sleep_state.is_blocked.lock().unwrap();
+        debug_assert!(!*is_blocked);
+
+        // Our latch was signalled. We should wake back up fully as we
+        // will have some stuff to do.
+        if !latch.fall_asleep() {
+            idle_state.wake_fully();
+            return;
+        }
+
+        loop {
+            let counters = self.counters.load(Ordering::SeqCst);
+
+            // Check if the JEC has changed since we got sleepy.
+            debug_assert!(idle_state.jobs_counter.is_sleepy());
+            if counters.jobs_counter() != idle_state.jobs_counter {
+                // JEC has changed, so a new job was posted, but for some reason
+                // we didn't see it. We should return to just before the SLEEPY
+                // state so we can do another search and (if we fail to find
+                // work) go back to sleep.
+                idle_state.wake_partly();
+                latch.wake_up();
+                return;
+            }
+
+            // Otherwise, let's move from IDLE to SLEEPING.
+            if self.counters.try_add_sleeping_thread(counters) {
+                break;
+            }
+        }
+
+        // Successfully registered as asleep.
+
+        // We have one last check for injected jobs to do. This protects against
+        // deadlock in the very unlikely event that
+        //
+        // - an external job is being injected while we are sleepy
+        // - that job triggers the rollover over the JEC such that we don't see it
+        // - we are the last active worker thread
+        std::sync::atomic::fence(Ordering::SeqCst);
+        if has_injected_jobs() {
+            // If we see an externally injected job, then we have to 'wake
+            // ourselves up'. (Ordinarily, `sub_sleeping_thread` is invoked by
+            // the one that wakes us.)
+            self.counters.sub_sleeping_thread();
+        } else {
+            // If we don't see an injected job (the normal case), then flag
+            // ourselves as asleep and wait till we are notified.
+            //
+            // (Note that `is_blocked` is held under a mutex and the mutex was
+            // acquired *before* we incremented the "sleepy counter". This means
+            // that whomever is coming to wake us will have to wait until we
+            // release the mutex in the call to `wait`, so they will see this
+            // boolean as true.)
+            *is_blocked = true;
+            while *is_blocked {
+                is_blocked = sleep_state.condvar.wait(is_blocked).unwrap();
+            }
+        }
+
+        // Update other state:
+        idle_state.wake_fully();
+        latch.wake_up();
+    }
+
+    /// Notify the given thread that it should wake up (if it is
+    /// sleeping).  When this method is invoked, we typically know the
+    /// thread is asleep, though in rare cases it could have been
+    /// awoken by (e.g.) new work having been posted.
+    pub(super) fn notify_worker_latch_is_set(&self, target_worker_index: usize) {
+        self.wake_specific_thread(target_worker_index);
+    }
+
+    /// Signals that `num_jobs` new jobs were injected into the thread
+    /// pool from outside. This function will ensure that there are
+    /// threads available to process them, waking threads from sleep
+    /// if necessary.
+    ///
+    /// # Parameters
+    ///
+    /// - `num_jobs` -- lower bound on number of jobs available for stealing.
+    ///   We'll try to get at least one thread per job.
+    #[inline]
+    pub(super) fn new_injected_jobs(&self, num_jobs: u32, queue_was_empty: bool) {
+        // This fence is needed to guarantee that threads
+        // as they are about to fall asleep, observe any
+        // new jobs that may have been injected.
+        std::sync::atomic::fence(Ordering::SeqCst);
+
+        self.new_jobs(num_jobs, queue_was_empty)
+    }
+
+    /// Signals that `num_jobs` new jobs were pushed onto a thread's
+    /// local deque. This function will try to ensure that there are
+    /// threads available to process them, waking threads from sleep
+    /// if necessary. However, this is not guaranteed: under certain
+    /// race conditions, the function may fail to wake any new
+    /// threads; in that case the existing thread should eventually
+    /// pop the job.
+    ///
+    /// # Parameters
+    ///
+    /// - `num_jobs` -- lower bound on number of jobs available for stealing.
+    ///   We'll try to get at least one thread per job.
+    #[inline]
+    pub(super) fn new_internal_jobs(&self, num_jobs: u32, queue_was_empty: bool) {
+        self.new_jobs(num_jobs, queue_was_empty)
+    }
+
+    /// Common helper for `new_injected_jobs` and `new_internal_jobs`.
+    #[inline]
+    fn new_jobs(&self, num_jobs: u32, queue_was_empty: bool) {
+        // Read the counters and -- if sleepy workers have announced themselves
+        // -- announce that there is now work available. The final value of `counters`
+        // with which we exit the loop thus corresponds to a state when
+        let counters = self
+            .counters
+            .increment_jobs_event_counter_if(JobsEventCounter::is_sleepy);
+        let num_awake_but_idle = counters.awake_but_idle_threads();
+        let num_sleepers = counters.sleeping_threads();
+
+        if num_sleepers == 0 {
+            // nobody to wake
+            return;
+        }
+
+        // Promote from u16 to u32 so we can interoperate with
+        // num_jobs more easily.
+        let num_awake_but_idle = num_awake_but_idle as u32;
+        let num_sleepers = num_sleepers as u32;
+
+        // If the queue is non-empty, then we always wake up a worker
+        // -- clearly the existing idle jobs aren't enough. Otherwise,
+        // check to see if we have enough idle workers.
+        if !queue_was_empty {
+            let num_to_wake = std::cmp::min(num_jobs, num_sleepers);
+            self.wake_any_threads(num_to_wake);
+        } else if num_awake_but_idle < num_jobs {
+            let num_to_wake = std::cmp::min(num_jobs - num_awake_but_idle, num_sleepers);
+            self.wake_any_threads(num_to_wake);
+        }
+    }
+
+    #[cold]
+    fn wake_any_threads(&self, mut num_to_wake: u32) {
+        if num_to_wake > 0 {
+            for i in 0..self.worker_sleep_states.len() {
+                if self.wake_specific_thread(i) {
+                    num_to_wake -= 1;
+                    if num_to_wake == 0 {
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    fn wake_specific_thread(&self, index: usize) -> bool {
+        let sleep_state = &self.worker_sleep_states[index];
+
+        let mut is_blocked = sleep_state.is_blocked.lock().unwrap();
+        if *is_blocked {
+            *is_blocked = false;
+            sleep_state.condvar.notify_one();
+
+            // When the thread went to sleep, it will have incremented
+            // this value. When we wake it, its our job to decrement
+            // it. We could have the thread do it, but that would
+            // introduce a delay between when the thread was
+            // *notified* and when this counter was decremented. That
+            // might mislead people with new work into thinking that
+            // there are sleeping threads that they should try to
+            // wake, when in fact there is nothing left for them to
+            // do.
+            self.counters.sub_sleeping_thread();
+
+            true
+        } else {
+            false
+        }
+    }
+}
+
+impl IdleState {
+    fn wake_fully(&mut self) {
+        self.rounds = 0;
+        self.jobs_counter = JobsEventCounter::DUMMY;
+    }
+
+    fn wake_partly(&mut self) {
+        self.rounds = ROUNDS_UNTIL_SLEEPY;
+        self.jobs_counter = JobsEventCounter::DUMMY;
+    }
+}
+
\ No newline at end of file diff --git a/src/rayon_core/spawn/mod.rs.html b/src/rayon_core/spawn/mod.rs.html new file mode 100644 index 0000000000..e59217560a --- /dev/null +++ b/src/rayon_core/spawn/mod.rs.html @@ -0,0 +1,329 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+
use crate::job::*;
+use crate::registry::Registry;
+use crate::unwind;
+use std::mem;
+use std::sync::Arc;
+
+/// Puts the task into the Rayon threadpool's job queue in the "static"
+/// or "global" scope. Just like a standard thread, this task is not
+/// tied to the current stack frame, and hence it cannot hold any
+/// references other than those with `'static` lifetime. If you want
+/// to spawn a task that references stack data, use [the `scope()`
+/// function][scope] to create a scope.
+///
+/// [scope]: fn.scope.html
+///
+/// Since tasks spawned with this function cannot hold references into
+/// the enclosing stack frame, you almost certainly want to use a
+/// `move` closure as their argument (otherwise, the closure will
+/// typically hold references to any variables from the enclosing
+/// function that you happen to use).
+///
+/// This API assumes that the closure is executed purely for its
+/// side-effects (i.e., it might send messages, modify data protected
+/// by a mutex, or some such thing).
+///
+/// There is no guaranteed order of execution for spawns, given that
+/// other threads may steal tasks at any time. However, they are
+/// generally prioritized in a LIFO order on the thread from which
+/// they were spawned. Other threads always steal from the other end of
+/// the deque, like FIFO order.  The idea is that "recent" tasks are
+/// most likely to be fresh in the local CPU's cache, while other
+/// threads can steal older "stale" tasks.  For an alternate approach,
+/// consider [`spawn_fifo()`] instead.
+///
+/// [`spawn_fifo()`]: fn.spawn_fifo.html
+///
+/// # Panic handling
+///
+/// If this closure should panic, the resulting panic will be
+/// propagated to the panic handler registered in the `ThreadPoolBuilder`,
+/// if any.  See [`ThreadPoolBuilder::panic_handler()`][ph] for more
+/// details.
+///
+/// [ph]: struct.ThreadPoolBuilder.html#method.panic_handler
+///
+/// # Examples
+///
+/// This code creates a Rayon task that increments a global counter.
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
+///
+/// static GLOBAL_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
+///
+/// rayon::spawn(move || {
+///     GLOBAL_COUNTER.fetch_add(1, Ordering::SeqCst);
+/// });
+/// ```
+pub fn spawn<F>(func: F)
+where
+    F: FnOnce() + Send + 'static,
+{
+    // We assert that current registry has not terminated.
+    unsafe { spawn_in(func, &Registry::current()) }
+}
+
+/// Spawns an asynchronous job in `registry.`
+///
+/// Unsafe because `registry` must not yet have terminated.
+pub(super) unsafe fn spawn_in<F>(func: F, registry: &Arc<Registry>)
+where
+    F: FnOnce() + Send + 'static,
+{
+    // We assert that this does not hold any references (we know
+    // this because of the `'static` bound in the interface);
+    // moreover, we assert that the code below is not supposed to
+    // be able to panic, and hence the data won't leak but will be
+    // enqueued into some deque for later execution.
+    let abort_guard = unwind::AbortIfPanic; // just in case we are wrong, and code CAN panic
+    let job_ref = spawn_job(func, registry);
+    registry.inject_or_push(job_ref);
+    mem::forget(abort_guard);
+}
+
+unsafe fn spawn_job<F>(func: F, registry: &Arc<Registry>) -> JobRef
+where
+    F: FnOnce() + Send + 'static,
+{
+    // Ensure that registry cannot terminate until this job has
+    // executed. This ref is decremented at the (*) below.
+    registry.increment_terminate_count();
+
+    HeapJob::new({
+        let registry = Arc::clone(registry);
+        move || {
+            registry.catch_unwind(func);
+            registry.terminate(); // (*) permit registry to terminate now
+        }
+    })
+    .into_static_job_ref()
+}
+
+/// Fires off a task into the Rayon threadpool in the "static" or
+/// "global" scope.  Just like a standard thread, this task is not
+/// tied to the current stack frame, and hence it cannot hold any
+/// references other than those with `'static` lifetime. If you want
+/// to spawn a task that references stack data, use [the `scope_fifo()`
+/// function](fn.scope_fifo.html) to create a scope.
+///
+/// The behavior is essentially the same as [the `spawn`
+/// function](fn.spawn.html), except that calls from the same thread
+/// will be prioritized in FIFO order. This is similar to the now-
+/// deprecated [`breadth_first`] option, except the effect is isolated
+/// to relative `spawn_fifo` calls, not all threadpool tasks.
+///
+/// For more details on this design, see Rayon [RFC #1].
+///
+/// [`breadth_first`]: struct.ThreadPoolBuilder.html#method.breadth_first
+/// [RFC #1]: https://github.com/rayon-rs/rfcs/blob/master/accepted/rfc0001-scope-scheduling.md
+///
+/// # Panic handling
+///
+/// If this closure should panic, the resulting panic will be
+/// propagated to the panic handler registered in the `ThreadPoolBuilder`,
+/// if any.  See [`ThreadPoolBuilder::panic_handler()`][ph] for more
+/// details.
+///
+/// [ph]: struct.ThreadPoolBuilder.html#method.panic_handler
+pub fn spawn_fifo<F>(func: F)
+where
+    F: FnOnce() + Send + 'static,
+{
+    // We assert that current registry has not terminated.
+    unsafe { spawn_fifo_in(func, &Registry::current()) }
+}
+
+/// Spawns an asynchronous FIFO job in `registry.`
+///
+/// Unsafe because `registry` must not yet have terminated.
+pub(super) unsafe fn spawn_fifo_in<F>(func: F, registry: &Arc<Registry>)
+where
+    F: FnOnce() + Send + 'static,
+{
+    // We assert that this does not hold any references (we know
+    // this because of the `'static` bound in the interface);
+    // moreover, we assert that the code below is not supposed to
+    // be able to panic, and hence the data won't leak but will be
+    // enqueued into some deque for later execution.
+    let abort_guard = unwind::AbortIfPanic; // just in case we are wrong, and code CAN panic
+    let job_ref = spawn_job(func, registry);
+
+    // If we're in the pool, use our thread's private fifo for this thread to execute
+    // in a locally-FIFO order.  Otherwise, just use the pool's global injector.
+    match registry.current_thread() {
+        Some(worker) => worker.push_fifo(job_ref),
+        None => registry.inject(job_ref),
+    }
+    mem::forget(abort_guard);
+}
+
+#[cfg(test)]
+mod test;
+
\ No newline at end of file diff --git a/src/rayon_core/thread_pool/mod.rs.html b/src/rayon_core/thread_pool/mod.rs.html new file mode 100644 index 0000000000..4fb14a097b --- /dev/null +++ b/src/rayon_core/thread_pool/mod.rs.html @@ -0,0 +1,1019 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+
//! Contains support for user-managed thread pools, represented by the
+//! the [`ThreadPool`] type (see that struct for details).
+//!
+//! [`ThreadPool`]: struct.ThreadPool.html
+
+use crate::broadcast::{self, BroadcastContext};
+use crate::join;
+use crate::registry::{Registry, ThreadSpawn, WorkerThread};
+use crate::scope::{do_in_place_scope, do_in_place_scope_fifo};
+use crate::spawn;
+use crate::{scope, Scope};
+use crate::{scope_fifo, ScopeFifo};
+use crate::{ThreadPoolBuildError, ThreadPoolBuilder};
+use std::error::Error;
+use std::fmt;
+use std::sync::Arc;
+
+mod test;
+
+/// Represents a user created [thread-pool].
+///
+/// Use a [`ThreadPoolBuilder`] to specify the number and/or names of threads
+/// in the pool. After calling [`ThreadPoolBuilder::build()`], you can then
+/// execute functions explicitly within this [`ThreadPool`] using
+/// [`ThreadPool::install()`]. By contrast, top level rayon functions
+/// (like `join()`) will execute implicitly within the current thread-pool.
+///
+///
+/// ## Creating a ThreadPool
+///
+/// ```rust
+/// # use rayon_core as rayon;
+/// let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+/// ```
+///
+/// [`install()`][`ThreadPool::install()`] executes a closure in one of the `ThreadPool`'s
+/// threads. In addition, any other rayon operations called inside of `install()` will also
+/// execute in the context of the `ThreadPool`.
+///
+/// When the `ThreadPool` is dropped, that's a signal for the threads it manages to terminate,
+/// they will complete executing any remaining work that you have spawned, and automatically
+/// terminate.
+///
+///
+/// [thread-pool]: https://en.wikipedia.org/wiki/Thread_pool
+/// [`ThreadPool`]: struct.ThreadPool.html
+/// [`ThreadPool::new()`]: struct.ThreadPool.html#method.new
+/// [`ThreadPoolBuilder`]: struct.ThreadPoolBuilder.html
+/// [`ThreadPoolBuilder::build()`]: struct.ThreadPoolBuilder.html#method.build
+/// [`ThreadPool::install()`]: struct.ThreadPool.html#method.install
+pub struct ThreadPool {
+    registry: Arc<Registry>,
+}
+
+impl ThreadPool {
+    #[deprecated(note = "Use `ThreadPoolBuilder::build`")]
+    #[allow(deprecated)]
+    /// Deprecated in favor of `ThreadPoolBuilder::build`.
+    pub fn new(configuration: crate::Configuration) -> Result<ThreadPool, Box<dyn Error>> {
+        Self::build(configuration.into_builder()).map_err(Box::from)
+    }
+
+    pub(super) fn build<S>(
+        builder: ThreadPoolBuilder<S>,
+    ) -> Result<ThreadPool, ThreadPoolBuildError>
+    where
+        S: ThreadSpawn,
+    {
+        let registry = Registry::new(builder)?;
+        Ok(ThreadPool { registry })
+    }
+
+    /// Executes `op` within the threadpool. Any attempts to use
+    /// `join`, `scope`, or parallel iterators will then operate
+    /// within that threadpool.
+    ///
+    /// # Warning: thread-local data
+    ///
+    /// Because `op` is executing within the Rayon thread-pool,
+    /// thread-local data from the current thread will not be
+    /// accessible.
+    ///
+    /// # Warning: execution order
+    ///
+    /// If the current thread is part of a different thread pool, it will try to
+    /// keep busy while the `op` completes in its target pool, similar to
+    /// calling [`ThreadPool::yield_now()`] in a loop. Therefore, it may
+    /// potentially schedule other tasks to run on the current thread in the
+    /// meantime. For example
+    ///
+    /// ```rust
+    /// # use rayon_core as rayon;
+    /// fn main() {
+    ///     rayon::ThreadPoolBuilder::new().num_threads(1).build_global().unwrap();
+    ///     let pool = rayon_core::ThreadPoolBuilder::default().build().unwrap();
+    ///     let do_it = || {
+    ///         print!("one ");
+    ///         pool.install(||{});
+    ///         print!("two ");
+    ///     };
+    ///     rayon::join(|| do_it(), || do_it());
+    /// }
+    /// ```
+    ///
+    /// Since we configured just one thread in the global pool, one might
+    /// expect `do_it()` to run sequentially, producing:
+    ///
+    /// ```ascii
+    /// one two one two
+    /// ```
+    ///
+    /// However each call to `install()` yields implicitly, allowing rayon to
+    /// run multiple instances of `do_it()` concurrently on the single, global
+    /// thread. The following output would be equally valid:
+    ///
+    /// ```ascii
+    /// one one two two
+    /// ```
+    ///
+    /// # Panics
+    ///
+    /// If `op` should panic, that panic will be propagated.
+    ///
+    /// ## Using `install()`
+    ///
+    /// ```rust
+    ///    # use rayon_core as rayon;
+    ///    fn main() {
+    ///         let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
+    ///         let n = pool.install(|| fib(20));
+    ///         println!("{}", n);
+    ///    }
+    ///
+    ///    fn fib(n: usize) -> usize {
+    ///         if n == 0 || n == 1 {
+    ///             return n;
+    ///         }
+    ///         let (a, b) = rayon::join(|| fib(n - 1), || fib(n - 2)); // runs inside of `pool`
+    ///         return a + b;
+    ///     }
+    /// ```
+    pub fn install<OP, R>(&self, op: OP) -> R
+    where
+        OP: FnOnce() -> R + Send,
+        R: Send,
+    {
+        self.registry.in_worker(|_, _| op())
+    }
+
+    /// Executes `op` within every thread in the threadpool. Any attempts to use
+    /// `join`, `scope`, or parallel iterators will then operate within that
+    /// threadpool.
+    ///
+    /// Broadcasts are executed on each thread after they have exhausted their
+    /// local work queue, before they attempt work-stealing from other threads.
+    /// The goal of that strategy is to run everywhere in a timely manner
+    /// *without* being too disruptive to current work. There may be alternative
+    /// broadcast styles added in the future for more or less aggressive
+    /// injection, if the need arises.
+    ///
+    /// # Warning: thread-local data
+    ///
+    /// Because `op` is executing within the Rayon thread-pool,
+    /// thread-local data from the current thread will not be
+    /// accessible.
+    ///
+    /// # Panics
+    ///
+    /// If `op` should panic on one or more threads, exactly one panic
+    /// will be propagated, only after all threads have completed
+    /// (or panicked) their own `op`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    ///    # use rayon_core as rayon;
+    ///    use std::sync::atomic::{AtomicUsize, Ordering};
+    ///
+    ///    fn main() {
+    ///         let pool = rayon::ThreadPoolBuilder::new().num_threads(5).build().unwrap();
+    ///
+    ///         // The argument gives context, including the index of each thread.
+    ///         let v: Vec<usize> = pool.broadcast(|ctx| ctx.index() * ctx.index());
+    ///         assert_eq!(v, &[0, 1, 4, 9, 16]);
+    ///
+    ///         // The closure can reference the local stack
+    ///         let count = AtomicUsize::new(0);
+    ///         pool.broadcast(|_| count.fetch_add(1, Ordering::Relaxed));
+    ///         assert_eq!(count.into_inner(), 5);
+    ///    }
+    /// ```
+    pub fn broadcast<OP, R>(&self, op: OP) -> Vec<R>
+    where
+        OP: Fn(BroadcastContext<'_>) -> R + Sync,
+        R: Send,
+    {
+        // We assert that `self.registry` has not terminated.
+        unsafe { broadcast::broadcast_in(op, &self.registry) }
+    }
+
+    /// Returns the (current) number of threads in the thread pool.
+    ///
+    /// # Future compatibility note
+    ///
+    /// Note that unless this thread-pool was created with a
+    /// [`ThreadPoolBuilder`] that specifies the number of threads,
+    /// then this number may vary over time in future versions (see [the
+    /// `num_threads()` method for details][snt]).
+    ///
+    /// [snt]: struct.ThreadPoolBuilder.html#method.num_threads
+    /// [`ThreadPoolBuilder`]: struct.ThreadPoolBuilder.html
+    #[inline]
+    pub fn current_num_threads(&self) -> usize {
+        self.registry.num_threads()
+    }
+
+    /// If called from a Rayon worker thread in this thread-pool,
+    /// returns the index of that thread; if not called from a Rayon
+    /// thread, or called from a Rayon thread that belongs to a
+    /// different thread-pool, returns `None`.
+    ///
+    /// The index for a given thread will not change over the thread's
+    /// lifetime. However, multiple threads may share the same index if
+    /// they are in distinct thread-pools.
+    ///
+    /// # Future compatibility note
+    ///
+    /// Currently, every thread-pool (including the global
+    /// thread-pool) has a fixed number of threads, but this may
+    /// change in future Rayon versions (see [the `num_threads()` method
+    /// for details][snt]). In that case, the index for a
+    /// thread would not change during its lifetime, but thread
+    /// indices may wind up being reused if threads are terminated and
+    /// restarted.
+    ///
+    /// [snt]: struct.ThreadPoolBuilder.html#method.num_threads
+    #[inline]
+    pub fn current_thread_index(&self) -> Option<usize> {
+        let curr = self.registry.current_thread()?;
+        Some(curr.index())
+    }
+
+    /// Returns true if the current worker thread currently has "local
+    /// tasks" pending. This can be useful as part of a heuristic for
+    /// deciding whether to spawn a new task or execute code on the
+    /// current thread, particularly in breadth-first
+    /// schedulers. However, keep in mind that this is an inherently
+    /// racy check, as other worker threads may be actively "stealing"
+    /// tasks from our local deque.
+    ///
+    /// **Background:** Rayon's uses a [work-stealing] scheduler. The
+    /// key idea is that each thread has its own [deque] of
+    /// tasks. Whenever a new task is spawned -- whether through
+    /// `join()`, `Scope::spawn()`, or some other means -- that new
+    /// task is pushed onto the thread's *local* deque. Worker threads
+    /// have a preference for executing their own tasks; if however
+    /// they run out of tasks, they will go try to "steal" tasks from
+    /// other threads. This function therefore has an inherent race
+    /// with other active worker threads, which may be removing items
+    /// from the local deque.
+    ///
+    /// [work-stealing]: https://en.wikipedia.org/wiki/Work_stealing
+    /// [deque]: https://en.wikipedia.org/wiki/Double-ended_queue
+    #[inline]
+    pub fn current_thread_has_pending_tasks(&self) -> Option<bool> {
+        let curr = self.registry.current_thread()?;
+        Some(!curr.local_deque_is_empty())
+    }
+
+    /// Execute `oper_a` and `oper_b` in the thread-pool and return
+    /// the results. Equivalent to `self.install(|| join(oper_a,
+    /// oper_b))`.
+    pub fn join<A, B, RA, RB>(&self, oper_a: A, oper_b: B) -> (RA, RB)
+    where
+        A: FnOnce() -> RA + Send,
+        B: FnOnce() -> RB + Send,
+        RA: Send,
+        RB: Send,
+    {
+        self.install(|| join(oper_a, oper_b))
+    }
+
+    /// Creates a scope that executes within this thread-pool.
+    /// Equivalent to `self.install(|| scope(...))`.
+    ///
+    /// See also: [the `scope()` function][scope].
+    ///
+    /// [scope]: fn.scope.html
+    pub fn scope<'scope, OP, R>(&self, op: OP) -> R
+    where
+        OP: FnOnce(&Scope<'scope>) -> R + Send,
+        R: Send,
+    {
+        self.install(|| scope(op))
+    }
+
+    /// Creates a scope that executes within this thread-pool.
+    /// Spawns from the same thread are prioritized in relative FIFO order.
+    /// Equivalent to `self.install(|| scope_fifo(...))`.
+    ///
+    /// See also: [the `scope_fifo()` function][scope_fifo].
+    ///
+    /// [scope_fifo]: fn.scope_fifo.html
+    pub fn scope_fifo<'scope, OP, R>(&self, op: OP) -> R
+    where
+        OP: FnOnce(&ScopeFifo<'scope>) -> R + Send,
+        R: Send,
+    {
+        self.install(|| scope_fifo(op))
+    }
+
+    /// Creates a scope that spawns work into this thread-pool.
+    ///
+    /// See also: [the `in_place_scope()` function][in_place_scope].
+    ///
+    /// [in_place_scope]: fn.in_place_scope.html
+    pub fn in_place_scope<'scope, OP, R>(&self, op: OP) -> R
+    where
+        OP: FnOnce(&Scope<'scope>) -> R,
+    {
+        do_in_place_scope(Some(&self.registry), op)
+    }
+
+    /// Creates a scope that spawns work into this thread-pool in FIFO order.
+    ///
+    /// See also: [the `in_place_scope_fifo()` function][in_place_scope_fifo].
+    ///
+    /// [in_place_scope_fifo]: fn.in_place_scope_fifo.html
+    pub fn in_place_scope_fifo<'scope, OP, R>(&self, op: OP) -> R
+    where
+        OP: FnOnce(&ScopeFifo<'scope>) -> R,
+    {
+        do_in_place_scope_fifo(Some(&self.registry), op)
+    }
+
+    /// Spawns an asynchronous task in this thread-pool. This task will
+    /// run in the implicit, global scope, which means that it may outlast
+    /// the current stack frame -- therefore, it cannot capture any references
+    /// onto the stack (you will likely need a `move` closure).
+    ///
+    /// See also: [the `spawn()` function defined on scopes][spawn].
+    ///
+    /// [spawn]: struct.Scope.html#method.spawn
+    pub fn spawn<OP>(&self, op: OP)
+    where
+        OP: FnOnce() + Send + 'static,
+    {
+        // We assert that `self.registry` has not terminated.
+        unsafe { spawn::spawn_in(op, &self.registry) }
+    }
+
+    /// Spawns an asynchronous task in this thread-pool. This task will
+    /// run in the implicit, global scope, which means that it may outlast
+    /// the current stack frame -- therefore, it cannot capture any references
+    /// onto the stack (you will likely need a `move` closure).
+    ///
+    /// See also: [the `spawn_fifo()` function defined on scopes][spawn_fifo].
+    ///
+    /// [spawn_fifo]: struct.ScopeFifo.html#method.spawn_fifo
+    pub fn spawn_fifo<OP>(&self, op: OP)
+    where
+        OP: FnOnce() + Send + 'static,
+    {
+        // We assert that `self.registry` has not terminated.
+        unsafe { spawn::spawn_fifo_in(op, &self.registry) }
+    }
+
+    /// Spawns an asynchronous task on every thread in this thread-pool. This task
+    /// will run in the implicit, global scope, which means that it may outlast the
+    /// current stack frame -- therefore, it cannot capture any references onto the
+    /// stack (you will likely need a `move` closure).
+    pub fn spawn_broadcast<OP>(&self, op: OP)
+    where
+        OP: Fn(BroadcastContext<'_>) + Send + Sync + 'static,
+    {
+        // We assert that `self.registry` has not terminated.
+        unsafe { broadcast::spawn_broadcast_in(op, &self.registry) }
+    }
+
+    /// Cooperatively yields execution to Rayon.
+    ///
+    /// This is similar to the general [`yield_now()`], but only if the current
+    /// thread is part of *this* thread pool.
+    ///
+    /// Returns `Some(Yield::Executed)` if anything was executed, `Some(Yield::Idle)` if
+    /// nothing was available, or `None` if the current thread is not part this pool.
+    pub fn yield_now(&self) -> Option<Yield> {
+        let curr = self.registry.current_thread()?;
+        Some(curr.yield_now())
+    }
+
+    /// Cooperatively yields execution to local Rayon work.
+    ///
+    /// This is similar to the general [`yield_local()`], but only if the current
+    /// thread is part of *this* thread pool.
+    ///
+    /// Returns `Some(Yield::Executed)` if anything was executed, `Some(Yield::Idle)` if
+    /// nothing was available, or `None` if the current thread is not part this pool.
+    pub fn yield_local(&self) -> Option<Yield> {
+        let curr = self.registry.current_thread()?;
+        Some(curr.yield_local())
+    }
+}
+
+impl Drop for ThreadPool {
+    fn drop(&mut self) {
+        self.registry.terminate();
+    }
+}
+
+impl fmt::Debug for ThreadPool {
+    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt.debug_struct("ThreadPool")
+            .field("num_threads", &self.current_num_threads())
+            .field("id", &self.registry.id())
+            .finish()
+    }
+}
+
+/// If called from a Rayon worker thread, returns the index of that
+/// thread within its current pool; if not called from a Rayon thread,
+/// returns `None`.
+///
+/// The index for a given thread will not change over the thread's
+/// lifetime. However, multiple threads may share the same index if
+/// they are in distinct thread-pools.
+///
+/// See also: [the `ThreadPool::current_thread_index()` method].
+///
+/// [m]: struct.ThreadPool.html#method.current_thread_index
+///
+/// # Future compatibility note
+///
+/// Currently, every thread-pool (including the global
+/// thread-pool) has a fixed number of threads, but this may
+/// change in future Rayon versions (see [the `num_threads()` method
+/// for details][snt]). In that case, the index for a
+/// thread would not change during its lifetime, but thread
+/// indices may wind up being reused if threads are terminated and
+/// restarted.
+///
+/// [snt]: struct.ThreadPoolBuilder.html#method.num_threads
+#[inline]
+pub fn current_thread_index() -> Option<usize> {
+    unsafe {
+        let curr = WorkerThread::current().as_ref()?;
+        Some(curr.index())
+    }
+}
+
+/// If called from a Rayon worker thread, indicates whether that
+/// thread's local deque still has pending tasks. Otherwise, returns
+/// `None`. For more information, see [the
+/// `ThreadPool::current_thread_has_pending_tasks()` method][m].
+///
+/// [m]: struct.ThreadPool.html#method.current_thread_has_pending_tasks
+#[inline]
+pub fn current_thread_has_pending_tasks() -> Option<bool> {
+    unsafe {
+        let curr = WorkerThread::current().as_ref()?;
+        Some(!curr.local_deque_is_empty())
+    }
+}
+
+/// Cooperatively yields execution to Rayon.
+///
+/// If the current thread is part of a rayon thread pool, this looks for a
+/// single unit of pending work in the pool, then executes it. Completion of
+/// that work might include nested work or further work stealing.
+///
+/// This is similar to [`std::thread::yield_now()`], but does not literally make
+/// that call. If you are implementing a polling loop, you may want to also
+/// yield to the OS scheduler yourself if no Rayon work was found.
+///
+/// Returns `Some(Yield::Executed)` if anything was executed, `Some(Yield::Idle)` if
+/// nothing was available, or `None` if this thread is not part of any pool at all.
+pub fn yield_now() -> Option<Yield> {
+    unsafe {
+        let thread = WorkerThread::current().as_ref()?;
+        Some(thread.yield_now())
+    }
+}
+
+/// Cooperatively yields execution to local Rayon work.
+///
+/// If the current thread is part of a rayon thread pool, this looks for a
+/// single unit of pending work in this thread's queue, then executes it.
+/// Completion of that work might include nested work or further work stealing.
+///
+/// This is similar to [`yield_now()`], but does not steal from other threads.
+///
+/// Returns `Some(Yield::Executed)` if anything was executed, `Some(Yield::Idle)` if
+/// nothing was available, or `None` if this thread is not part of any pool at all.
+pub fn yield_local() -> Option<Yield> {
+    unsafe {
+        let thread = WorkerThread::current().as_ref()?;
+        Some(thread.yield_local())
+    }
+}
+
+/// Result of [`yield_now()`] or [`yield_local()`].
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum Yield {
+    /// Work was found and executed.
+    Executed,
+    /// No available work was found.
+    Idle,
+}
+
\ No newline at end of file diff --git a/src/rayon_core/unwind.rs.html b/src/rayon_core/unwind.rs.html new file mode 100644 index 0000000000..faa6e49328 --- /dev/null +++ b/src/rayon_core/unwind.rs.html @@ -0,0 +1,65 @@ +unwind.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
//! Package up unwind recovery. Note that if you are in some sensitive
+//! place, you can use the `AbortIfPanic` helper to protect against
+//! accidental panics in the rayon code itself.
+
+use std::any::Any;
+use std::panic::{self, AssertUnwindSafe};
+use std::thread;
+
+/// Executes `f` and captures any panic, translating that panic into a
+/// `Err` result. The assumption is that any panic will be propagated
+/// later with `resume_unwinding`, and hence `f` can be treated as
+/// exception safe.
+pub(super) fn halt_unwinding<F, R>(func: F) -> thread::Result<R>
+where
+    F: FnOnce() -> R,
+{
+    panic::catch_unwind(AssertUnwindSafe(func))
+}
+
+pub(super) fn resume_unwinding(payload: Box<dyn Any + Send>) -> ! {
+    panic::resume_unwind(payload)
+}
+
+pub(super) struct AbortIfPanic;
+
+impl Drop for AbortIfPanic {
+    fn drop(&mut self) {
+        eprintln!("Rayon: detected unexpected panic; aborting");
+        ::std::process::abort();
+    }
+}
+
\ No newline at end of file diff --git a/trait.impl/core/borrow/trait.Borrow.js b/trait.impl/core/borrow/trait.Borrow.js index abb9f00aa8..b71af3656a 100644 --- a/trait.impl/core/borrow/trait.Borrow.js +++ b/trait.impl/core/borrow/trait.Borrow.js @@ -1,4 +1,5 @@ (function() {var implementors = { +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> Borrow<T> for Owned<T>"]], "font_types":[["impl Borrow<[u8; 4]> for Tag"]], "smallvec":[["impl<A: Array> Borrow<[<A as Array>::Item]> for SmallVec<A>"]], "tinyvec":[["impl<'s, T> Borrow<[T]> for SliceVec<'s, T>"],["impl<A: Array> Borrow<[<A as Array>::Item]> for TinyVec<A>"],["impl<A: Array> Borrow<[<A as Array>::Item]> for ArrayVec<A>"]] diff --git a/trait.impl/core/borrow/trait.BorrowMut.js b/trait.impl/core/borrow/trait.BorrowMut.js index c25be95b1f..549cff07d3 100644 --- a/trait.impl/core/borrow/trait.BorrowMut.js +++ b/trait.impl/core/borrow/trait.BorrowMut.js @@ -1,4 +1,5 @@ (function() {var implementors = { +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> BorrowMut<T> for Owned<T>"]], "smallvec":[["impl<A: Array> BorrowMut<[<A as Array>::Item]> for SmallVec<A>"]], "tinyvec":[["impl<'s, T> BorrowMut<[T]> for SliceVec<'s, T>"],["impl<A: Array> BorrowMut<[<A as Array>::Item]> for TinyVec<A>"],["impl<A: Array> BorrowMut<[<A as Array>::Item]> for ArrayVec<A>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js index a19551cbd7..a49a2fc3df 100644 --- a/trait.impl/core/clone/trait.Clone.js +++ b/trait.impl/core/clone/trait.Clone.js @@ -1,6 +1,10 @@ (function() {var implementors = { "bytemuck":[["impl Clone for CheckedCastError"],["impl Clone for PodCastError"]], "cosmic_text":[["impl Clone for Action"],["impl Clone for Affinity"],["impl Clone for Align"],["impl Clone for FamilyOwned"],["impl Clone for LineEnding"],["impl Clone for Motion"],["impl Clone for Selection"],["impl Clone for Shaping"],["impl Clone for SubpixelBin"],["impl Clone for Wrap"],["impl Clone for AttrsList"],["impl Clone for AttrsOwned"],["impl Clone for Buffer"],["impl Clone for BufferLine"],["impl Clone for CacheKey"],["impl Clone for CacheKeyFlags"],["impl Clone for Change"],["impl Clone for ChangeItem"],["impl Clone for Color"],["impl Clone for Cursor"],["impl Clone for FontMatchAttrs"],["impl Clone for FontMatchKey"],["impl Clone for LayoutCursor"],["impl Clone for LayoutGlyph"],["impl Clone for LayoutLine"],["impl Clone for Metrics"],["impl Clone for PhysicalGlyph"],["impl Clone for Scroll"],["impl Clone for ShapeGlyph"],["impl Clone for ShapeLine"],["impl Clone for ShapeRunCache"],["impl Clone for ShapeRunKey"],["impl Clone for ShapeSpan"],["impl Clone for ShapeWord"],["impl<'a> Clone for Attrs<'a>"]], +"crossbeam_deque":[["impl<T> Clone for Stealer<T>"],["impl<T: Clone> Clone for Steal<T>"]], +"crossbeam_epoch":[["impl Clone for Collector"],["impl<T: Clone> Clone for Owned<T>"],["impl<T: ?Sized + Pointable> Clone for Atomic<T>"],["impl<T: ?Sized + Pointable> Clone for Shared<'_, T>"]], +"crossbeam_utils":[["impl Clone for Unparker"],["impl Clone for WaitGroup"],["impl<T: Clone> Clone for CachePadded<T>"]], +"either":[["impl<L: Clone, R: Clone> Clone for Either<L, R>"],["impl<L: Clone, R: Clone> Clone for IterEither<L, R>"]], "font_types":[["impl Clone for InvalidTag"],["impl Clone for PenCommand"],["impl Clone for F26Dot6"],["impl Clone for F2Dot14"],["impl Clone for FWord"],["impl Clone for Fixed"],["impl Clone for GlyphId"],["impl Clone for LongDateTime"],["impl Clone for MajorMinor"],["impl Clone for NameId"],["impl Clone for Offset16"],["impl Clone for Offset24"],["impl Clone for Offset32"],["impl Clone for Tag"],["impl Clone for UfWord"],["impl Clone for Uint24"],["impl Clone for Version16Dot16"],["impl<T: Clone + Scalar> Clone for BigEndian<T>
where\n T::Raw: Clone,
"],["impl<T: Clone> Clone for BoundingBox<T>"],["impl<T: Clone> Clone for Nullable<T>"],["impl<T: Clone> Clone for Point<T>"]], "fontconfig_parser":[["impl Clone for BinaryOp"],["impl Clone for ConfigPart"],["impl Clone for Constant"],["impl Clone for DirPrefix"],["impl Clone for EditBinding"],["impl Clone for EditMode"],["impl Clone for Expression"],["impl Clone for FontMatch"],["impl Clone for IntOrRange"],["impl Clone for ListOp"],["impl Clone for MatchTarget"],["impl Clone for Property"],["impl Clone for PropertyKind"],["impl Clone for PropertyTarget"],["impl Clone for TernaryOp"],["impl Clone for TestCompare"],["impl Clone for TestQual"],["impl Clone for TestTarget"],["impl Clone for UnaryOp"],["impl Clone for Value"],["impl Clone for Alias"],["impl Clone for CacheDir"],["impl Clone for Config"],["impl Clone for Dir"],["impl Clone for DirData"],["impl Clone for Edit"],["impl Clone for FontConfig"],["impl Clone for Include"],["impl Clone for Match"],["impl Clone for RemapDir"],["impl Clone for RemapDirData"],["impl Clone for SelectFont"],["impl Clone for Test"]], "fontdb":[["impl Clone for Source"],["impl Clone for Style"],["impl Clone for Database"],["impl Clone for FaceInfo"],["impl Clone for ID"],["impl Clone for Weight"],["impl<'a> Clone for Family<'a>"],["impl<'a> Clone for Query<'a>"]], @@ -9,6 +13,8 @@ "memmap2":[["impl Clone for Advice"],["impl Clone for UncheckedAdvice"],["impl Clone for MmapOptions"],["impl Clone for RemapOptions"]], "proc_macro2":[["impl Clone for Delimiter"],["impl Clone for Spacing"],["impl Clone for TokenTree"],["impl Clone for DelimSpan"],["impl Clone for Group"],["impl Clone for Ident"],["impl Clone for Literal"],["impl Clone for Punct"],["impl Clone for Span"],["impl Clone for TokenStream"],["impl Clone for IntoIter"]], "rangemap":[["impl<K: Clone, V: Clone> Clone for RangeMap<K, V>"],["impl<K: Clone, V: Clone, StepFnsT: Clone> Clone for RangeInclusiveMap<K, V, StepFnsT>"],["impl<T: Clone> Clone for RangeSet<T>"],["impl<T: Clone, StepFnsT: Clone> Clone for RangeInclusiveSet<T, StepFnsT>"]], +"rayon":[["impl<'a, K: Ord + Sync, V: Sync> Clone for Iter<'a, K, V>"],["impl<'a, K: Hash + Eq + Sync, V: Sync> Clone for Iter<'a, K, V>"],["impl<'a, T: Ord + Sync + 'a> Clone for Iter<'a, T>"],["impl<'a, T: Ord + Sync> Clone for Iter<'a, T>"],["impl<'a, T: Hash + Eq + Sync> Clone for Iter<'a, T>"],["impl<'a, T: Sync> Clone for Iter<'a, T>"],["impl<'a, T: Sync> Clone for Iter<'a, T>"],["impl<'a, T: Sync> Clone for Iter<'a, T>"],["impl<'a, T: Sync> Clone for Iter<'a, T>"],["impl<'ch> Clone for Bytes<'ch>"],["impl<'ch> Clone for CharIndices<'ch>"],["impl<'ch> Clone for Chars<'ch>"],["impl<'ch> Clone for EncodeUtf16<'ch>"],["impl<'ch> Clone for Lines<'ch>"],["impl<'ch> Clone for SplitAsciiWhitespace<'ch>"],["impl<'ch> Clone for SplitWhitespace<'ch>"],["impl<'ch, P: Clone + Pattern> Clone for MatchIndices<'ch, P>"],["impl<'ch, P: Clone + Pattern> Clone for Matches<'ch, P>"],["impl<'ch, P: Clone + Pattern> Clone for Split<'ch, P>"],["impl<'ch, P: Clone + Pattern> Clone for SplitInclusive<'ch, P>"],["impl<'ch, P: Clone + Pattern> Clone for SplitTerminator<'ch, P>"],["impl<'data, T, P: Clone> Clone for ChunkBy<'data, T, P>"],["impl<'data, T, P: Clone> Clone for Split<'data, T, P>"],["impl<'data, T, P: Clone> Clone for SplitInclusive<'data, T, P>"],["impl<'data, T: Sync> Clone for Chunks<'data, T>"],["impl<'data, T: Sync> Clone for ChunksExact<'data, T>"],["impl<'data, T: Sync> Clone for Iter<'data, T>"],["impl<'data, T: Sync> Clone for RChunks<'data, T>"],["impl<'data, T: Sync> Clone for RChunksExact<'data, T>"],["impl<'data, T: Sync> Clone for Windows<'data, T>"],["impl<A, B> Clone for Chain<A, B>
where\n A: ParallelIterator + Clone,\n B: ParallelIterator<Item = A::Item> + Clone,
"],["impl<A: Clone + IndexedParallelIterator, B: Clone + IndexedParallelIterator> Clone for Zip<A, B>"],["impl<A: Clone + IndexedParallelIterator, B: Clone + IndexedParallelIterator> Clone for ZipEq<A, B>"],["impl<D: Clone, S: Clone> Clone for Split<D, S>"],["impl<I> Clone for Chunks<I>"],["impl<I> Clone for Intersperse<I>
where\n I: ParallelIterator + Clone,\n I::Item: Clone + Clone,
"],["impl<I, ID: Clone, F: Clone> Clone for FoldChunks<I, ID, F>"],["impl<I, J> Clone for Interleave<I, J>"],["impl<I, J> Clone for InterleaveShortest<I, J>"],["impl<I, U: Clone, F: Clone> Clone for FoldChunksWith<I, U, F>"],["impl<I: Clone + IndexedParallelIterator> Clone for Enumerate<I>"],["impl<I: Clone + IndexedParallelIterator> Clone for MaxLen<I>"],["impl<I: Clone + IndexedParallelIterator> Clone for MinLen<I>"],["impl<I: Clone + IndexedParallelIterator> Clone for Rev<I>"],["impl<I: Clone + IndexedParallelIterator> Clone for StepBy<I>"],["impl<I: Clone + IndexedParallelIterator, P: Clone> Clone for Positions<I, P>"],["impl<I: Clone + ParallelIterator> Clone for Cloned<I>"],["impl<I: Clone + ParallelIterator> Clone for Copied<I>"],["impl<I: Clone + ParallelIterator> Clone for Flatten<I>"],["impl<I: Clone + ParallelIterator> Clone for FlattenIter<I>"],["impl<I: Clone + ParallelIterator> Clone for PanicFuse<I>"],["impl<I: Clone + ParallelIterator> Clone for SkipAny<I>"],["impl<I: Clone + ParallelIterator> Clone for TakeAny<I>"],["impl<I: Clone + ParallelIterator> Clone for WhileSome<I>"],["impl<I: Clone + ParallelIterator, F: Clone> Clone for FlatMap<I, F>"],["impl<I: Clone + ParallelIterator, F: Clone> Clone for FlatMapIter<I, F>"],["impl<I: Clone + ParallelIterator, F: Clone> Clone for Inspect<I, F>"],["impl<I: Clone + ParallelIterator, F: Clone> Clone for Map<I, F>"],["impl<I: Clone + ParallelIterator, F: Clone> Clone for Update<I, F>"],["impl<I: Clone + ParallelIterator, INIT: Clone, F: Clone> Clone for MapInit<I, INIT, F>"],["impl<I: Clone + ParallelIterator, P: Clone> Clone for Filter<I, P>"],["impl<I: Clone + ParallelIterator, P: Clone> Clone for FilterMap<I, P>"],["impl<I: Clone + ParallelIterator, P: Clone> Clone for SkipAnyWhile<I, P>"],["impl<I: Clone + ParallelIterator, P: Clone> Clone for TakeAnyWhile<I, P>"],["impl<I: Clone + ParallelIterator, T: Clone, F: Clone> Clone for MapWith<I, T, F>"],["impl<I: Clone> Clone for ExponentialBlocks<I>"],["impl<I: Clone> Clone for Skip<I>"],["impl<I: Clone> Clone for Take<I>"],["impl<I: Clone> Clone for UniformBlocks<I>"],["impl<I: Clone, ID: Clone, F: Clone> Clone for Fold<I, ID, F>"],["impl<I: Clone, U: Clone + Try, F: Clone> Clone for TryFoldWith<I, U, F>
where\n U::Output: Clone,
"],["impl<I: Clone, U: Clone, F: Clone> Clone for FoldWith<I, U, F>"],["impl<I: Clone, U: Clone, ID: Clone, F: Clone> Clone for TryFold<I, U, ID, F>"],["impl<Iter: Clone> Clone for IterBridge<Iter>"],["impl<T: Clone + Clone + Send> Clone for Repeat<T>"],["impl<T: Clone + Clone + Send> Clone for RepeatN<T>"],["impl<T: Clone + Ord + Send> Clone for IntoIter<T>"],["impl<T: Clone + Send> Clone for IntoIter<T>"],["impl<T: Clone + Send> Clone for IntoIter<T>"],["impl<T: Clone + Send> Clone for Once<T>"],["impl<T: Clone + Send> Clone for IntoIter<T>"],["impl<T: Clone + Send> Clone for IntoIter<T>"],["impl<T: Clone + Send> Clone for IntoIter<T>"],["impl<T: Clone + Send, const N: usize> Clone for IntoIter<T, N>"],["impl<T: Clone> Clone for MultiZip<T>"],["impl<T: Clone> Clone for Iter<T>"],["impl<T: Clone> Clone for Iter<T>"],["impl<T: Send> Clone for Empty<T>"]], +"rayon_core":[["impl Clone for Yield"]], "read_fonts":[["impl Clone for ReadError"],["impl Clone for BitmapDataFormat"],["impl Clone for BitmapMetrics"],["impl Clone for MapVariant"],["impl Clone for PlatformId"],["impl Clone for CompositeMode"],["impl Clone for Extend"],["impl Clone for GlyphClassDef"],["impl Clone for Opcode"],["impl Clone for Anchor"],["impl Clone for ToPathError"],["impl Clone for ToPathStyle"],["impl Clone for DeltaFormat"],["impl Clone for Encoding"],["impl Clone for Entry"],["impl Clone for Operator"],["impl Clone for Token"],["impl Clone for Error"],["impl Clone for Number"],["impl Clone for TableRecord"],["impl Clone for AxisValueMap"],["impl Clone for BaseLangSysRecord"],["impl Clone for BaseScriptRecord"],["impl Clone for FeatMinMaxRecord"],["impl Clone for BdtComponent"],["impl Clone for BigGlyphMetrics"],["impl Clone for BitmapFlags"],["impl Clone for BitmapLocation"],["impl Clone for BitmapSize"],["impl Clone for GlyphIdOffsetPair"],["impl Clone for SbitLineMetrics"],["impl Clone for SmallGlyphMetrics"],["impl Clone for ConstantMapGroup"],["impl Clone for EncodingRecord"],["impl Clone for SequentialMapGroup"],["impl Clone for SubHeader"],["impl Clone for UnicodeRange"],["impl Clone for UvsMapping"],["impl Clone for VariationSelector"],["impl Clone for BaseGlyph"],["impl Clone for BaseGlyphPaint"],["impl Clone for Clip"],["impl Clone for ColorIndex"],["impl Clone for ColorStop"],["impl Clone for Layer"],["impl Clone for VarColorIndex"],["impl Clone for VarColorStop"],["impl Clone for ColorRecord"],["impl Clone for PaletteType"],["impl Clone for CvtDelta"],["impl Clone for VariationAxisRecord"],["impl Clone for GaspRange"],["impl Clone for GaspRangeBehavior"],["impl Clone for DecodeError"],["impl Clone for Component"],["impl Clone for CompositeGlyphFlags"],["impl Clone for CurvePoint"],["impl Clone for PointFlags"],["impl Clone for PointMarker"],["impl Clone for SimpleGlyphFlags"],["impl Clone for Transform"],["impl Clone for Class2Record"],["impl Clone for EntryExitRecord"],["impl Clone for MarkRecord"],["impl Clone for PairValueRecord"],["impl Clone for ValueFormat"],["impl Clone for ValueRecord"],["impl Clone for GlyphDelta"],["impl Clone for GvarFlags"],["impl Clone for U16Or32"],["impl Clone for MacStyle"],["impl Clone for LongMetric"],["impl Clone for ClassRangeRecord"],["impl Clone for FeatureRecord"],["impl Clone for FeatureTableSubstitutionRecord"],["impl Clone for FeatureVariationRecord"],["impl Clone for LangSysRecord"],["impl Clone for LookupFlag"],["impl Clone for RangeRecord"],["impl Clone for ScriptRecord"],["impl Clone for SequenceLookupRecord"],["impl Clone for ValueRecord"],["impl Clone for LangTagRecord"],["impl Clone for NameRecord"],["impl Clone for SelectionFlags"],["impl Clone for Blues"],["impl Clone for StemSnaps"],["impl Clone for FdSelectRange3"],["impl Clone for FdSelectRange4"],["impl Clone for StringId"],["impl Clone for HeaderFlags"],["impl Clone for AxisRecord"],["impl Clone for AxisValueRecord"],["impl Clone for AxisValueTableFlags"],["impl Clone for DeltaSetIndex"],["impl Clone for EntryFormat"],["impl Clone for FloatItemDelta"],["impl Clone for RegionAxisCoordinates"],["impl Clone for TupleIndex"],["impl Clone for TupleVariationCount"],["impl<'a> Clone for FileRef<'a>"],["impl<'a> Clone for BaseCoord<'a>"],["impl<'a> Clone for BitmapContent<'a>"],["impl<'a> Clone for IndexSubtable<'a>"],["impl<'a> Clone for CmapSubtable<'a>"],["impl<'a> Clone for ClipBox<'a>"],["impl<'a> Clone for Paint<'a>"],["impl<'a> Clone for CaretValue<'a>"],["impl<'a> Clone for Glyph<'a>"],["impl<'a> Clone for AnchorTable<'a>"],["impl<'a> Clone for PairPos<'a>"],["impl<'a> Clone for SinglePos<'a>"],["impl<'a> Clone for SingleSubst<'a>"],["impl<'a> Clone for ChainedSequenceContext<'a>"],["impl<'a> Clone for ClassDef<'a>"],["impl<'a> Clone for CoverageTable<'a>"],["impl<'a> Clone for DeviceOrVariationIndex<'a>"],["impl<'a> Clone for SequenceContext<'a>"],["impl<'a> Clone for Loca<'a>"],["impl<'a> Clone for FdSelect<'a>"],["impl<'a> Clone for Index<'a>"],["impl<'a> Clone for AxisValue<'a>"],["impl<'a> Clone for DeltaSetIndexMap<'a>"],["impl<'a> Clone for CollectionRef<'a>"],["impl<'a> Clone for FontData<'a>"],["impl<'a> Clone for FontRef<'a>"],["impl<'a> Clone for SegmentMaps<'a>"],["impl<'a> Clone for BitmapData<'a>"],["impl<'a> Clone for Cff<'a>"],["impl<'a> Clone for Cff2<'a>"],["impl<'a> Clone for Cmap12Iter<'a>"],["impl<'a> Clone for Cmap14Iter<'a>"],["impl<'a> Clone for Cmap4Iter<'a>"],["impl<'a> Clone for InstanceRecord<'a>"],["impl<'a> Clone for Decoder<'a>"],["impl<'a> Clone for InlineOperands<'a>"],["impl<'a> Clone for Instruction<'a>"],["impl<'a> Clone for BaseRecord<'a>"],["impl<'a> Clone for Class1Record<'a>"],["impl<'a> Clone for ComponentRecord<'a>"],["impl<'a> Clone for Mark2Record<'a>"],["impl<'a> Clone for CharIter<'a>"],["impl<'a> Clone for NameString<'a>"],["impl<'a> Clone for PString<'a>"],["impl<'a> Clone for Latin1String<'a>"],["impl<'a> Clone for DeltaRunIter<'a>"],["impl<'a> Clone for PackedDeltas<'a>"],["impl<'a> Clone for PackedPointNumbers<'a>"],["impl<'a> Clone for PackedPointNumbersIter<'a>"],["impl<'a> Clone for Tuple<'a>"],["impl<'a> Clone for VariationRegion<'a>"],["impl<'a, T: Clone + ReadArgs> Clone for ComputedArray<'a, T>
where\n T::Args: Clone,
"],["impl<'a, T: Clone + ReadArgs, O: Clone + Scalar> Clone for ArrayOfNullableOffsets<'a, T, O>
where\n T::Args: Clone,
"],["impl<'a, T: Clone + ReadArgs, O: Clone + Scalar> Clone for ArrayOfOffsets<'a, T, O>
where\n T::Args: Clone,
"],["impl<'a, T: Clone> Clone for TableRef<'a, T>"],["impl<'a, T: Clone> Clone for TupleDeltaIter<'a, T>"],["impl<'a, T: Clone> Clone for TupleVariation<'a, T>"],["impl<'a, T: Clone> Clone for TupleVariationData<'a, T>"]], "roxmltree":[["impl Clone for Error"],["impl Clone for NodeType"],["impl Clone for NodeId"],["impl Clone for ParsingOptions"],["impl Clone for TextPos"],["impl<'a, 'b> Clone for ExpandedName<'a, 'b>"],["impl<'a, 'input> Clone for Attributes<'a, 'input>"],["impl<'a, 'input> Clone for Descendants<'a, 'input>"],["impl<'a, 'input> Clone for NamespaceIter<'a, 'input>"],["impl<'a, 'input: 'a> Clone for Attribute<'a, 'input>"],["impl<'a, 'input: 'a> Clone for AxisIter<'a, 'input>"],["impl<'a, 'input: 'a> Clone for Children<'a, 'input>"],["impl<'a, 'input: 'a> Clone for Node<'a, 'input>"],["impl<'input> Clone for StringStorage<'input>"],["impl<'input> Clone for Namespace<'input>"],["impl<'input> Clone for PI<'input>"]], "rustybuzz":[["impl Clone for BufferClusterLevel"],["impl Clone for Direction"],["impl Clone for BufferFlags"],["impl Clone for Feature"],["impl Clone for GlyphInfo"],["impl Clone for GlyphPosition"],["impl Clone for Language"],["impl Clone for Script"],["impl Clone for Variation"],["impl<'a> Clone for Face<'a>"]], diff --git a/trait.impl/core/cmp/trait.Eq.js b/trait.impl/core/cmp/trait.Eq.js index c33b1a896e..3dec0c50a8 100644 --- a/trait.impl/core/cmp/trait.Eq.js +++ b/trait.impl/core/cmp/trait.Eq.js @@ -1,6 +1,10 @@ (function() {var implementors = { "bytemuck":[["impl Eq for CheckedCastError"],["impl Eq for PodCastError"]], "cosmic_text":[["impl Eq for Action"],["impl Eq for Affinity"],["impl Eq for Align"],["impl Eq for FamilyOwned"],["impl Eq for LineEnding"],["impl Eq for Motion"],["impl Eq for Selection"],["impl Eq for Shaping"],["impl Eq for SubpixelBin"],["impl Eq for Wrap"],["impl Eq for AttrsList"],["impl Eq for AttrsOwned"],["impl Eq for CacheKey"],["impl Eq for CacheKeyFlags"],["impl Eq for Color"],["impl Eq for Cursor"],["impl Eq for FontMatchAttrs"],["impl Eq for FontMatchKey"],["impl Eq for LayoutCursor"],["impl Eq for ShapeRunKey"],["impl<'a> Eq for Attrs<'a>"]], +"crossbeam_deque":[["impl<T: Eq> Eq for Steal<T>"]], +"crossbeam_epoch":[["impl Eq for Collector"],["impl<T: ?Sized + Pointable> Eq for Shared<'_, T>"]], +"crossbeam_utils":[["impl<T: Eq> Eq for CachePadded<T>"]], +"either":[["impl<L: Eq, R: Eq> Eq for Either<L, R>"]], "font_types":[["impl Eq for InvalidTag"],["impl Eq for F26Dot6"],["impl Eq for F2Dot14"],["impl Eq for FWord"],["impl Eq for Fixed"],["impl Eq for GlyphId"],["impl Eq for LongDateTime"],["impl Eq for MajorMinor"],["impl Eq for NameId"],["impl Eq for Offset16"],["impl Eq for Offset24"],["impl Eq for Offset32"],["impl Eq for Tag"],["impl Eq for UfWord"],["impl Eq for Uint24"],["impl Eq for Version16Dot16"],["impl<T: Eq + Scalar> Eq for BigEndian<T>
where\n T::Raw: Eq,
"],["impl<T: Eq> Eq for BoundingBox<T>"],["impl<T: Eq> Eq for Nullable<T>"],["impl<T: Eq> Eq for Point<T>"]], "fontconfig_parser":[["impl Eq for BinaryOp"],["impl Eq for Constant"],["impl Eq for DirPrefix"],["impl Eq for EditBinding"],["impl Eq for EditMode"],["impl Eq for IntOrRange"],["impl Eq for ListOp"],["impl Eq for MatchTarget"],["impl Eq for PropertyKind"],["impl Eq for PropertyTarget"],["impl Eq for TernaryOp"],["impl Eq for TestCompare"],["impl Eq for TestQual"],["impl Eq for TestTarget"],["impl Eq for UnaryOp"],["impl Eq for Alias"],["impl Eq for CacheDir"],["impl Eq for Config"],["impl Eq for Dir"],["impl Eq for DirData"],["impl Eq for Include"],["impl Eq for RemapDir"],["impl Eq for RemapDirData"]], "fontdb":[["impl Eq for Style"],["impl Eq for ID"],["impl Eq for Weight"],["impl<'a> Eq for Family<'a>"],["impl<'a> Eq for Query<'a>"]], @@ -8,6 +12,7 @@ "memmap2":[["impl Eq for Advice"],["impl Eq for UncheckedAdvice"]], "proc_macro2":[["impl Eq for Delimiter"],["impl Eq for Spacing"],["impl Eq for Ident"]], "rangemap":[["impl<K, V, StepFnsT> Eq for RangeInclusiveMap<K, V, StepFnsT>
where\n K: Eq,\n V: Eq,
"],["impl<K: Eq, V: Eq> Eq for RangeMap<K, V>"],["impl<T: Eq> Eq for RangeSet<T>"],["impl<T: Eq, StepFnsT: Eq> Eq for RangeInclusiveSet<T, StepFnsT>"]], +"rayon_core":[["impl Eq for Yield"]], "read_fonts":[["impl Eq for BitmapDataFormat"],["impl Eq for MapVariant"],["impl Eq for PlatformId"],["impl Eq for CompositeMode"],["impl Eq for Extend"],["impl Eq for GlyphClassDef"],["impl Eq for Opcode"],["impl Eq for Anchor"],["impl Eq for DeltaFormat"],["impl Eq for Encoding"],["impl Eq for Entry"],["impl Eq for Operator"],["impl Eq for Token"],["impl Eq for Number"],["impl Eq for TableRecord"],["impl Eq for AxisValueMap"],["impl Eq for BdtComponent"],["impl Eq for BigGlyphMetrics"],["impl Eq for BitmapFlags"],["impl Eq for BitmapSize"],["impl Eq for GlyphIdOffsetPair"],["impl Eq for SbitLineMetrics"],["impl Eq for SmallGlyphMetrics"],["impl Eq for ConstantMapGroup"],["impl Eq for SequentialMapGroup"],["impl Eq for SubHeader"],["impl Eq for UnicodeRange"],["impl Eq for UvsMapping"],["impl Eq for BaseGlyph"],["impl Eq for ColorIndex"],["impl Eq for ColorStop"],["impl Eq for Layer"],["impl Eq for VarColorIndex"],["impl Eq for VarColorStop"],["impl Eq for ColorRecord"],["impl Eq for PaletteType"],["impl Eq for CvtDelta"],["impl Eq for VariationAxisRecord"],["impl Eq for GaspRange"],["impl Eq for GaspRangeBehavior"],["impl Eq for Component"],["impl Eq for CompositeGlyphFlags"],["impl Eq for CurvePoint"],["impl Eq for PointFlags"],["impl Eq for PointMarker"],["impl Eq for SimpleGlyphFlags"],["impl Eq for Transform"],["impl Eq for ValueFormat"],["impl Eq for ValueRecord"],["impl Eq for GlyphDelta"],["impl Eq for GvarFlags"],["impl Eq for MacStyle"],["impl Eq for LongMetric"],["impl Eq for ClassRangeRecord"],["impl Eq for LookupFlag"],["impl Eq for RangeRecord"],["impl Eq for SequenceLookupRecord"],["impl Eq for ValueRecord"],["impl Eq for SelectionFlags"],["impl Eq for Blues"],["impl Eq for StemSnaps"],["impl Eq for FdSelectRange3"],["impl Eq for FdSelectRange4"],["impl Eq for StringId"],["impl Eq for HeaderFlags"],["impl Eq for AxisRecord"],["impl Eq for AxisValueRecord"],["impl Eq for AxisValueTableFlags"],["impl Eq for DeltaSetIndex"],["impl Eq for EntryFormat"],["impl Eq for RegionAxisCoordinates"],["impl Eq for TupleIndex"],["impl Eq for TupleVariationCount"],["impl<'a> Eq for SegmentMaps<'a>"],["impl<'a> Eq for NameString<'a>"],["impl<'a> Eq for PString<'a>"],["impl<'a> Eq for Latin1String<'a>"],["impl<'a> Eq for Tuple<'a>"],["impl<'a> Eq for VariationRegion<'a>"]], "roxmltree":[["impl Eq for Error"],["impl Eq for NodeType"],["impl Eq for Node<'_, '_>"],["impl Eq for NodeId"],["impl Eq for ParsingOptions"],["impl Eq for TextPos"],["impl<'a, 'b> Eq for ExpandedName<'a, 'b>"],["impl<'input> Eq for StringStorage<'input>"],["impl<'input> Eq for Namespace<'input>"],["impl<'input> Eq for PI<'input>"]], "rustybuzz":[["impl Eq for BufferClusterLevel"],["impl Eq for Direction"],["impl Eq for Language"],["impl Eq for Script"]], diff --git a/trait.impl/core/cmp/trait.Ord.js b/trait.impl/core/cmp/trait.Ord.js index 98cab4acd8..a2bbd7d442 100644 --- a/trait.impl/core/cmp/trait.Ord.js +++ b/trait.impl/core/cmp/trait.Ord.js @@ -1,5 +1,7 @@ (function() {var implementors = { "cosmic_text":[["impl Ord for Affinity"],["impl Ord for SubpixelBin"],["impl Ord for CacheKey"],["impl Ord for CacheKeyFlags"],["impl Ord for Color"],["impl Ord for Cursor"],["impl Ord for FontMatchKey"],["impl Ord for LayoutCursor"]], +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> Ord for Shared<'_, T>"]], +"either":[["impl<L: Ord, R: Ord> Ord for Either<L, R>"]], "font_types":[["impl Ord for F26Dot6"],["impl Ord for F2Dot14"],["impl Ord for FWord"],["impl Ord for Fixed"],["impl Ord for GlyphId"],["impl Ord for LongDateTime"],["impl Ord for MajorMinor"],["impl Ord for NameId"],["impl Ord for Offset16"],["impl Ord for Offset24"],["impl Ord for Offset32"],["impl Ord for Tag"],["impl Ord for UfWord"],["impl Ord for Uint24"],["impl Ord for Version16Dot16"],["impl<T: Scalar + Copy + Ord + Eq> Ord for BigEndian<T>
where\n <T as Scalar>::Raw: Eq,
"]], "fontdb":[["impl Ord for ID"],["impl Ord for Weight"]], "log":[["impl Ord for Level"],["impl Ord for LevelFilter"],["impl<'a> Ord for Metadata<'a>"],["impl<'a> Ord for MetadataBuilder<'a>"]], diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js index f40fcac85a..435d2b3f64 100644 --- a/trait.impl/core/cmp/trait.PartialEq.js +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -1,6 +1,10 @@ (function() {var implementors = { "bytemuck":[["impl PartialEq for CheckedCastError"],["impl PartialEq for PodCastError"]], "cosmic_text":[["impl PartialEq for Action"],["impl PartialEq for Affinity"],["impl PartialEq for Align"],["impl PartialEq for FamilyOwned"],["impl PartialEq for LineEnding"],["impl PartialEq for Motion"],["impl PartialEq for Selection"],["impl PartialEq for Shaping"],["impl PartialEq for SubpixelBin"],["impl PartialEq for Wrap"],["impl PartialEq for AttrsList"],["impl PartialEq for AttrsOwned"],["impl PartialEq for CacheKey"],["impl PartialEq for CacheKeyFlags"],["impl PartialEq for Color"],["impl PartialEq for Cursor"],["impl PartialEq for FontMatchAttrs"],["impl PartialEq for FontMatchKey"],["impl PartialEq for LayoutCursor"],["impl PartialEq for Metrics"],["impl PartialEq for Scroll"],["impl PartialEq for ShapeRunKey"],["impl<'a> PartialEq for Attrs<'a>"]], +"crossbeam_deque":[["impl<T: PartialEq> PartialEq for Steal<T>"]], +"crossbeam_epoch":[["impl PartialEq for Collector"],["impl<'g, T: ?Sized + Pointable> PartialEq for Shared<'g, T>"]], +"crossbeam_utils":[["impl<T: PartialEq> PartialEq for CachePadded<T>"]], +"either":[["impl<L: PartialEq, R: PartialEq> PartialEq for Either<L, R>"]], "font_types":[["impl PartialEq for InvalidTag"],["impl PartialEq for PenCommand"],["impl PartialEq for F26Dot6"],["impl PartialEq for F2Dot14"],["impl PartialEq for FWord"],["impl PartialEq for Fixed"],["impl PartialEq for GlyphId"],["impl PartialEq for LongDateTime"],["impl PartialEq for MajorMinor"],["impl PartialEq for NameId"],["impl PartialEq for Offset16"],["impl PartialEq for Offset24"],["impl PartialEq for Offset32"],["impl PartialEq for Tag"],["impl PartialEq for UfWord"],["impl PartialEq for Uint24"],["impl PartialEq for Version16Dot16"],["impl PartialEq<&str> for Tag"],["impl PartialEq<&[u8]> for Tag"],["impl PartialEq<str> for Tag"],["impl PartialEq<u32> for Offset16"],["impl PartialEq<u32> for Offset24"],["impl PartialEq<u32> for Offset32"],["impl PartialEq<[u8; 4]> for Tag"],["impl<T: Scalar + Copy + PartialEq> PartialEq<T> for BigEndian<T>"],["impl<T: PartialEq + Scalar> PartialEq for BigEndian<T>
where\n T::Raw: PartialEq,
"],["impl<T: PartialEq> PartialEq for BoundingBox<T>"],["impl<T: PartialEq> PartialEq for Nullable<T>"],["impl<T: PartialEq> PartialEq for Point<T>"],["impl<T: PartialEq<u32>> PartialEq<u32> for Nullable<T>"]], "fontconfig_parser":[["impl PartialEq for BinaryOp"],["impl PartialEq for ConfigPart"],["impl PartialEq for Constant"],["impl PartialEq for DirPrefix"],["impl PartialEq for EditBinding"],["impl PartialEq for EditMode"],["impl PartialEq for Expression"],["impl PartialEq for FontMatch"],["impl PartialEq for IntOrRange"],["impl PartialEq for ListOp"],["impl PartialEq for MatchTarget"],["impl PartialEq for Property"],["impl PartialEq for PropertyKind"],["impl PartialEq for PropertyTarget"],["impl PartialEq for TernaryOp"],["impl PartialEq for TestCompare"],["impl PartialEq for TestQual"],["impl PartialEq for TestTarget"],["impl PartialEq for UnaryOp"],["impl PartialEq for Value"],["impl PartialEq for Alias"],["impl PartialEq for CacheDir"],["impl PartialEq for Config"],["impl PartialEq for Dir"],["impl PartialEq for DirData"],["impl PartialEq for Edit"],["impl PartialEq for FontConfig"],["impl PartialEq for Include"],["impl PartialEq for Match"],["impl PartialEq for RemapDir"],["impl PartialEq for RemapDirData"],["impl PartialEq for SelectFont"],["impl PartialEq for Test"]], "fontdb":[["impl PartialEq for Style"],["impl PartialEq for ID"],["impl PartialEq for Weight"],["impl<'a> PartialEq for Family<'a>"],["impl<'a> PartialEq for Query<'a>"]], @@ -8,6 +12,7 @@ "memmap2":[["impl PartialEq for Advice"],["impl PartialEq for UncheckedAdvice"]], "proc_macro2":[["impl PartialEq for Delimiter"],["impl PartialEq for Spacing"],["impl PartialEq for Ident"],["impl<T> PartialEq<T> for Ident
where\n T: ?Sized + AsRef<str>,
"]], "rangemap":[["impl<K, V> PartialEq for RangeMap<K, V>
where\n K: PartialEq,\n V: PartialEq,
"],["impl<K, V, StepFnsT> PartialEq for RangeInclusiveMap<K, V, StepFnsT>
where\n K: PartialEq,\n V: PartialEq,
"],["impl<T: PartialEq> PartialEq for RangeSet<T>"],["impl<T: PartialEq, StepFnsT: PartialEq> PartialEq for RangeInclusiveSet<T, StepFnsT>"]], +"rayon_core":[["impl PartialEq for Yield"]], "read_fonts":[["impl PartialEq for BitmapDataFormat"],["impl PartialEq for MapVariant"],["impl PartialEq for PlatformId"],["impl PartialEq for CompositeMode"],["impl PartialEq for Extend"],["impl PartialEq for GlyphClassDef"],["impl PartialEq for Opcode"],["impl PartialEq for Anchor"],["impl PartialEq for DeltaFormat"],["impl PartialEq for Encoding"],["impl PartialEq for Entry"],["impl PartialEq for Operator"],["impl PartialEq for Token"],["impl PartialEq for Number"],["impl PartialEq for TableRecord"],["impl PartialEq for AxisValueMap"],["impl PartialEq for BdtComponent"],["impl PartialEq for BigGlyphMetrics"],["impl PartialEq for BitmapFlags"],["impl PartialEq for BitmapSize"],["impl PartialEq for GlyphIdOffsetPair"],["impl PartialEq for SbitLineMetrics"],["impl PartialEq for SmallGlyphMetrics"],["impl PartialEq for ConstantMapGroup"],["impl PartialEq for SequentialMapGroup"],["impl PartialEq for SubHeader"],["impl PartialEq for UnicodeRange"],["impl PartialEq for UvsMapping"],["impl PartialEq for BaseGlyph"],["impl PartialEq for ColorIndex"],["impl PartialEq for ColorStop"],["impl PartialEq for Layer"],["impl PartialEq for VarColorIndex"],["impl PartialEq for VarColorStop"],["impl PartialEq for ColorRecord"],["impl PartialEq for PaletteType"],["impl PartialEq for CvtDelta"],["impl PartialEq for VariationAxisRecord"],["impl PartialEq for GaspRange"],["impl PartialEq for GaspRangeBehavior"],["impl PartialEq for Component"],["impl PartialEq for CompositeGlyphFlags"],["impl PartialEq for CurvePoint"],["impl PartialEq for PointFlags"],["impl PartialEq for PointMarker"],["impl PartialEq for SimpleGlyphFlags"],["impl PartialEq for Transform"],["impl PartialEq for ValueFormat"],["impl PartialEq for ValueRecord"],["impl PartialEq for GlyphDelta"],["impl PartialEq for GvarFlags"],["impl PartialEq for MacStyle"],["impl PartialEq for LongMetric"],["impl PartialEq for ClassRangeRecord"],["impl PartialEq for LookupFlag"],["impl PartialEq for RangeRecord"],["impl PartialEq for SequenceLookupRecord"],["impl PartialEq for ValueRecord"],["impl PartialEq for SelectionFlags"],["impl PartialEq for Blues"],["impl PartialEq for StemSnaps"],["impl PartialEq for FdSelectRange3"],["impl PartialEq for FdSelectRange4"],["impl PartialEq for StringId"],["impl PartialEq for HeaderFlags"],["impl PartialEq for AxisRecord"],["impl PartialEq for AxisValueRecord"],["impl PartialEq for AxisValueTableFlags"],["impl PartialEq for DeltaSetIndex"],["impl PartialEq for EntryFormat"],["impl PartialEq for RegionAxisCoordinates"],["impl PartialEq for TupleIndex"],["impl PartialEq for TupleVariationCount"],["impl PartialEq<&str> for PString<'_>"],["impl PartialEq<&str> for Latin1String<'_>"],["impl<'a> PartialEq for SegmentMaps<'a>"],["impl<'a> PartialEq for NameString<'a>"],["impl<'a> PartialEq for PString<'a>"],["impl<'a> PartialEq for Latin1String<'a>"],["impl<'a> PartialEq for Tuple<'a>"],["impl<'a> PartialEq for VariationRegion<'a>"]], "roxmltree":[["impl PartialEq for Error"],["impl PartialEq for NodeType"],["impl PartialEq for StringStorage<'_>"],["impl PartialEq for Attribute<'_, '_>"],["impl PartialEq for Node<'_, '_>"],["impl PartialEq for NodeId"],["impl PartialEq for ParsingOptions"],["impl PartialEq for TextPos"],["impl<'a, 'b> PartialEq for ExpandedName<'a, 'b>"],["impl<'input> PartialEq for Namespace<'input>"],["impl<'input> PartialEq for PI<'input>"]], "rustybuzz":[["impl PartialEq for BufferClusterLevel"],["impl PartialEq for Direction"],["impl PartialEq for Feature"],["impl PartialEq for Language"],["impl PartialEq for Script"],["impl PartialEq for Variation"]], diff --git a/trait.impl/core/cmp/trait.PartialOrd.js b/trait.impl/core/cmp/trait.PartialOrd.js index e131f13583..bf2637ef80 100644 --- a/trait.impl/core/cmp/trait.PartialOrd.js +++ b/trait.impl/core/cmp/trait.PartialOrd.js @@ -1,5 +1,7 @@ (function() {var implementors = { "cosmic_text":[["impl PartialOrd for Affinity"],["impl PartialOrd for SubpixelBin"],["impl PartialOrd for CacheKey"],["impl PartialOrd for CacheKeyFlags"],["impl PartialOrd for Color"],["impl PartialOrd for Cursor"],["impl PartialOrd for FontMatchKey"],["impl PartialOrd for LayoutCursor"],["impl PartialOrd for Scroll"]], +"crossbeam_epoch":[["impl<'g, T: ?Sized + Pointable> PartialOrd for Shared<'g, T>"]], +"either":[["impl<L: PartialOrd, R: PartialOrd> PartialOrd for Either<L, R>"]], "font_types":[["impl PartialOrd for F26Dot6"],["impl PartialOrd for F2Dot14"],["impl PartialOrd for FWord"],["impl PartialOrd for Fixed"],["impl PartialOrd for GlyphId"],["impl PartialOrd for LongDateTime"],["impl PartialOrd for MajorMinor"],["impl PartialOrd for NameId"],["impl PartialOrd for Offset16"],["impl PartialOrd for Offset24"],["impl PartialOrd for Offset32"],["impl PartialOrd for Tag"],["impl PartialOrd for UfWord"],["impl PartialOrd for Uint24"],["impl PartialOrd for Version16Dot16"],["impl<T: Scalar + Copy + PartialOrd + PartialEq> PartialOrd for BigEndian<T>
where\n <T as Scalar>::Raw: PartialEq,
"]], "fontdb":[["impl PartialOrd for ID"],["impl PartialOrd for Weight"]], "log":[["impl PartialOrd for Level"],["impl PartialOrd for LevelFilter"],["impl PartialOrd<Level> for LevelFilter"],["impl PartialOrd<LevelFilter> for Level"],["impl<'a> PartialOrd for Metadata<'a>"],["impl<'a> PartialOrd for MetadataBuilder<'a>"]], diff --git a/trait.impl/core/convert/trait.AsMut.js b/trait.impl/core/convert/trait.AsMut.js index 74bfe8e05c..cda771a00b 100644 --- a/trait.impl/core/convert/trait.AsMut.js +++ b/trait.impl/core/convert/trait.AsMut.js @@ -1,4 +1,6 @@ (function() {var implementors = { +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> AsMut<T> for Owned<T>"]], +"either":[["impl<L, R> AsMut<str> for Either<L, R>
where\n L: AsMut<str>,\n R: AsMut<str>,
"],["impl<L, R, Target> AsMut<[Target]> for Either<L, R>
where\n L: AsMut<[Target]>,\n R: AsMut<[Target]>,
"],["impl<L, R, Target> AsMut<Target> for Either<L, R>
where\n L: AsMut<Target>,\n R: AsMut<Target>,
"]], "memmap2":[["impl AsMut<[u8]> for MmapMut"]], "rustybuzz":[["impl<'a> AsMut<Face<'a>> for Face<'a>"]], "smallvec":[["impl<A: Array> AsMut<[<A as Array>::Item]> for SmallVec<A>"]], diff --git a/trait.impl/core/convert/trait.AsRef.js b/trait.impl/core/convert/trait.AsRef.js index 24db51892b..cd69725617 100644 --- a/trait.impl/core/convert/trait.AsRef.js +++ b/trait.impl/core/convert/trait.AsRef.js @@ -1,4 +1,6 @@ (function() {var implementors = { +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> AsRef<T> for Owned<T>"]], +"either":[["impl<L, R> AsRef<str> for Either<L, R>
where\n L: AsRef<str>,\n R: AsRef<str>,
"],["impl<L, R, Target> AsRef<[Target]> for Either<L, R>
where\n L: AsRef<[Target]>,\n R: AsRef<[Target]>,
"],["impl<L, R, Target> AsRef<Target> for Either<L, R>
where\n L: AsRef<Target>,\n R: AsRef<Target>,
"]], "font_types":[["impl AsRef<[u8]> for Tag"]], "memmap2":[["impl AsRef<[u8]> for Mmap"],["impl AsRef<[u8]> for MmapMut"]], "read_fonts":[["impl AsRef<[u8]> for FontData<'_>"]], diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js index 12a4afebf2..a5f821f78a 100644 --- a/trait.impl/core/convert/trait.From.js +++ b/trait.impl/core/convert/trait.From.js @@ -1,6 +1,9 @@ (function() {var implementors = { "bytemuck":[["impl From<PodCastError> for CheckedCastError"],["impl<T: ?Sized + BoxBytesOf> From<Box<T>> for BoxBytes"]], "cosmic_text":[["impl<'a> From<Attrs<'a>> for FontMatchAttrs"],["impl<'buffer> From<&'buffer mut Buffer> for BufferRef<'buffer>"],["impl<'buffer> From<Buffer> for BufferRef<'buffer>"],["impl<'buffer> From<Arc<Buffer>> for BufferRef<'buffer>"]], +"crossbeam_epoch":[["impl<'g, T: ?Sized + Pointable> From<Shared<'g, T>> for Atomic<T>"],["impl<T> From<*const T> for Atomic<T>"],["impl<T> From<*const T> for Shared<'_, T>"],["impl<T> From<Box<T>> for Atomic<T>"],["impl<T> From<Box<T>> for Owned<T>"],["impl<T> From<T> for Atomic<T>"],["impl<T> From<T> for Owned<T>"],["impl<T: ?Sized + Pointable> From<Owned<T>> for Atomic<T>"]], +"crossbeam_utils":[["impl<T> From<T> for AtomicCell<T>"],["impl<T> From<T> for CachePadded<T>"],["impl<T> From<T> for ShardedLock<T>"]], +"either":[["impl<L, R> From<Result<R, L>> for Either<L, R>"]], "font_types":[["impl From<i16> for FWord"],["impl From<i32> for Fixed"],["impl From<u16> for GlyphId"],["impl From<u16> for NameId"],["impl From<u16> for UfWord"],["impl From<FWord> for i16"],["impl From<GlyphId> for u32"],["impl From<UfWord> for u16"],["impl From<Uint24> for u32"],["impl<T: Scalar> From<T> for BigEndian<T>"]], "fontconfig_parser":[["impl From<(PropertyTarget, PropertyKind)> for Value"],["impl From<Constant> for Value"],["impl From<Error> for Error"],["impl From<bool> for Value"],["impl From<f64> for Value"],["impl From<u32> for Value"],["impl From<Alias> for ConfigPart"],["impl From<CacheDir> for ConfigPart"],["impl From<Config> for ConfigPart"],["impl From<Dir> for ConfigPart"],["impl From<Include> for ConfigPart"],["impl From<Match> for ConfigPart"],["impl From<RemapDir> for ConfigPart"],["impl From<SelectFont> for ConfigPart"],["impl From<String> for Value"],["impl From<Vec<IntOrRange>> for Value"],["impl From<ParseFloatError> for Error"],["impl From<ParseIntError> for Error"],["impl From<ParseBoolError> for Error"],["impl From<Error> for Error"],["impl<'a> From<&'a str> for Value"],["impl<V> From<V> for Expression
where\n Value: From<V>,
"]], "memmap2":[["impl From<Mmap> for MmapRaw"],["impl From<MmapMut> for MmapRaw"]], diff --git a/trait.impl/core/convert/trait.Into.js b/trait.impl/core/convert/trait.Into.js index a0bb60a5c1..496617882e 100644 --- a/trait.impl/core/convert/trait.Into.js +++ b/trait.impl/core/convert/trait.Into.js @@ -1,3 +1,4 @@ (function() {var implementors = { +"either":[["impl<L, R> Into<Result<R, L>> for Either<L, R>"]], "unicode_bidi":[["impl Into<u8> for Level"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js index 948183061b..d98d209b8a 100644 --- a/trait.impl/core/default/trait.Default.js +++ b/trait.impl/core/default/trait.Default.js @@ -1,5 +1,8 @@ (function() {var implementors = { "cosmic_text":[["impl Default for Affinity"],["impl Default for LineEnding"],["impl Default for Change"],["impl Default for Cursor"],["impl Default for Metrics"],["impl Default for Scroll"],["impl Default for ShapeBuffer"],["impl Default for ShapeRunCache"]], +"crossbeam_deque":[["impl<T> Default for Injector<T>"]], +"crossbeam_epoch":[["impl Default for Collector"],["impl<T: ?Sized + Pointable> Default for Atomic<T>"],["impl<T: ?Sized + Pointable> Default for Shared<'_, T>"]], +"crossbeam_utils":[["impl Default for Backoff"],["impl Default for Parker"],["impl Default for WaitGroup"],["impl<T: Default> Default for AtomicCell<T>"],["impl<T: Default> Default for CachePadded<T>"],["impl<T: Default> Default for ShardedLock<T>"]], "font_types":[["impl Default for F26Dot6"],["impl Default for F2Dot14"],["impl Default for FWord"],["impl Default for Fixed"],["impl Default for GlyphId"],["impl Default for LongDateTime"],["impl Default for MajorMinor"],["impl Default for NameId"],["impl Default for Tag"],["impl Default for UfWord"],["impl Default for Uint24"],["impl Default for Version16Dot16"],["impl<T: Scalar + Default> Default for BigEndian<T>"],["impl<T: Default> Default for BoundingBox<T>"],["impl<T: Default> Default for Point<T>"],["impl<T: NullValue> Default for Nullable<T>"]], "fontconfig_parser":[["impl Default for DirPrefix"],["impl Default for EditBinding"],["impl Default for EditMode"],["impl Default for MatchTarget"],["impl Default for Property"],["impl Default for PropertyKind"],["impl Default for PropertyTarget"],["impl Default for TestCompare"],["impl Default for TestQual"],["impl Default for TestTarget"],["impl Default for Alias"],["impl Default for CacheDir"],["impl Default for Config"],["impl Default for Dir"],["impl Default for DirData"],["impl Default for Edit"],["impl Default for FontConfig"],["impl Default for Include"],["impl Default for Match"],["impl Default for RemapDir"],["impl Default for RemapDirData"],["impl Default for SelectFont"],["impl Default for Test"]], "fontdb":[["impl Default for Style"],["impl Default for Database"],["impl Default for ID"],["impl Default for Weight"],["impl<'a> Default for Query<'a>"]], @@ -7,6 +10,7 @@ "memmap2":[["impl Default for MmapOptions"],["impl Default for RemapOptions"]], "proc_macro2":[["impl Default for TokenStream"]], "rangemap":[["impl<K, V> Default for RangeMap<K, V>"],["impl<K, V, StepFnsT> Default for RangeInclusiveMap<K, V, StepFnsT>"],["impl<T> Default for RangeSet<T>"],["impl<T, StepFnsT> Default for RangeInclusiveSet<T, StepFnsT>"]], +"rayon_core":[["impl Default for Configuration"],["impl Default for ThreadPoolBuilder"]], "read_fonts":[["impl Default for PlatformId"],["impl Default for CompositeMode"],["impl Default for Extend"],["impl Default for GlyphClassDef"],["impl Default for ToPathStyle"],["impl Default for DeltaFormat"],["impl Default for BitmapFlags"],["impl Default for BitmapLocation"],["impl Default for PaletteType"],["impl Default for GaspRangeBehavior"],["impl Default for CompositeGlyphFlags"],["impl Default for PointFlags"],["impl Default for PointMarker"],["impl Default for SimpleGlyphFlags"],["impl Default for Transform"],["impl Default for ValueFormat"],["impl Default for ValueRecord"],["impl Default for GvarFlags"],["impl Default for MacStyle"],["impl Default for LookupFlag"],["impl Default for SelectionFlags"],["impl Default for Blues"],["impl Default for StemSnaps"],["impl Default for Stack"],["impl Default for HeaderFlags"],["impl Default for AxisValueTableFlags"],["impl Default for DeltaSetIndex"],["impl Default for EntryFormat"],["impl Default for FloatItemDelta"],["impl Default for Tuple<'_>"],["impl Default for TupleIndex"],["impl Default for TupleVariationCount"],["impl<'a> Default for FontData<'a>"],["impl<'a> Default for InlineOperands<'a>"]], "roxmltree":[["impl Default for ParsingOptions"]], "rustc_hash":[["impl Default for FxHasher"]], diff --git a/trait.impl/core/error/trait.Error.js b/trait.impl/core/error/trait.Error.js index 786a63b570..4498d8be61 100644 --- a/trait.impl/core/error/trait.Error.js +++ b/trait.impl/core/error/trait.Error.js @@ -1,6 +1,7 @@ (function() {var implementors = { "fontconfig_parser":[["impl Error for Error"]], "proc_macro2":[["impl Error for LexError"]], +"rayon_core":[["impl Error for ThreadPoolBuildError"]], "roxmltree":[["impl Error for Error"]], "syn":[["impl Error for Error"]], "ttf_parser":[["impl Error for FaceParsingError"]] diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js index da82f63a95..c1b26ad844 100644 --- a/trait.impl/core/fmt/trait.Debug.js +++ b/trait.impl/core/fmt/trait.Debug.js @@ -2,6 +2,10 @@ "bitflags":[["impl Debug for ParseError"],["impl<B: Debug> Debug for Flag<B>"]], "bytemuck":[["impl Debug for CheckedCastError"],["impl Debug for PodCastError"]], "cosmic_text":[["impl Debug for Action"],["impl Debug for Affinity"],["impl Debug for Align"],["impl Debug for FamilyOwned"],["impl Debug for LineEnding"],["impl Debug for Motion"],["impl Debug for Selection"],["impl Debug for Shaping"],["impl Debug for SubpixelBin"],["impl Debug for Wrap"],["impl Debug for AttrsList"],["impl Debug for AttrsOwned"],["impl Debug for Buffer"],["impl Debug for BufferLine"],["impl Debug for CacheKey"],["impl Debug for CacheKeyFlags"],["impl Debug for Change"],["impl Debug for ChangeItem"],["impl Debug for Color"],["impl Debug for Cursor"],["impl Debug for Font"],["impl Debug for FontMatchAttrs"],["impl Debug for FontMatchKey"],["impl Debug for FontSystem"],["impl Debug for LayoutCursor"],["impl Debug for LayoutGlyph"],["impl Debug for LayoutLine"],["impl Debug for Metrics"],["impl Debug for PhysicalGlyph"],["impl Debug for Scroll"],["impl Debug for ShapeBuffer"],["impl Debug for ShapeGlyph"],["impl Debug for ShapeLine"],["impl Debug for ShapeRunCache"],["impl Debug for ShapeRunKey"],["impl Debug for ShapeSpan"],["impl Debug for ShapeWord"],["impl Debug for SwashCache"],["impl<'a> Debug for Attrs<'a>"],["impl<'a> Debug for LayoutRun<'a>"],["impl<'a> Debug for LineIter<'a>"],["impl<'a, T: Debug> Debug for BorrowedWithFontSystem<'a, T>"],["impl<'b> Debug for LayoutRunIter<'b>"],["impl<'buffer> Debug for BufferRef<'buffer>"],["impl<'buffer> Debug for Editor<'buffer>"],["impl<'text> Debug for BidiParagraphs<'text>"]], +"crossbeam_deque":[["impl<T> Debug for Steal<T>"],["impl<T> Debug for Injector<T>"],["impl<T> Debug for Stealer<T>"],["impl<T> Debug for Worker<T>"]], +"crossbeam_epoch":[["impl Debug for Collector"],["impl Debug for Guard"],["impl Debug for LocalHandle"],["impl<T, P: Pointer<T> + Debug> Debug for CompareExchangeError<'_, T, P>"],["impl<T: ?Sized + Pointable> Debug for Atomic<T>"],["impl<T: ?Sized + Pointable> Debug for Owned<T>"],["impl<T: ?Sized + Pointable> Debug for Shared<'_, T>"]], +"crossbeam_utils":[["impl Debug for Backoff"],["impl Debug for Parker"],["impl Debug for Unparker"],["impl Debug for WaitGroup"],["impl Debug for Scope<'_>"],["impl<'scope, 'env> Debug for ScopedThreadBuilder<'scope, 'env>"],["impl<T> Debug for ScopedJoinHandle<'_, T>"],["impl<T: Debug> Debug for CachePadded<T>"],["impl<T: Debug> Debug for ShardedLockReadGuard<'_, T>"],["impl<T: Debug> Debug for ShardedLockWriteGuard<'_, T>"],["impl<T: Copy + Debug> Debug for AtomicCell<T>"],["impl<T: ?Sized + Debug> Debug for ShardedLock<T>"]], +"either":[["impl<L: Debug, R: Debug> Debug for Either<L, R>"],["impl<L: Debug, R: Debug> Debug for IterEither<L, R>"]], "font_types":[["impl Debug for InvalidTag"],["impl Debug for PenCommand"],["impl Debug for F26Dot6"],["impl Debug for F2Dot14"],["impl Debug for FWord"],["impl Debug for Fixed"],["impl Debug for GlyphId"],["impl Debug for LongDateTime"],["impl Debug for MajorMinor"],["impl Debug for NameId"],["impl Debug for Offset16"],["impl Debug for Offset24"],["impl Debug for Offset32"],["impl Debug for Tag"],["impl Debug for UfWord"],["impl Debug for Uint24"],["impl Debug for Version16Dot16"],["impl<T: Debug + Scalar + Copy> Debug for BigEndian<T>"],["impl<T: Debug> Debug for BoundingBox<T>"],["impl<T: Debug> Debug for Nullable<T>"],["impl<T: Debug> Debug for Point<T>"]], "fontconfig_parser":[["impl Debug for BinaryOp"],["impl Debug for ConfigPart"],["impl Debug for Constant"],["impl Debug for DirPrefix"],["impl Debug for EditBinding"],["impl Debug for EditMode"],["impl Debug for Error"],["impl Debug for Expression"],["impl Debug for FontMatch"],["impl Debug for IntOrRange"],["impl Debug for ListOp"],["impl Debug for MatchTarget"],["impl Debug for Property"],["impl Debug for PropertyKind"],["impl Debug for PropertyTarget"],["impl Debug for TernaryOp"],["impl Debug for TestCompare"],["impl Debug for TestQual"],["impl Debug for TestTarget"],["impl Debug for UnaryOp"],["impl Debug for Value"],["impl Debug for Alias"],["impl Debug for CacheDir"],["impl Debug for Config"],["impl Debug for Dir"],["impl Debug for DirData"],["impl Debug for Edit"],["impl Debug for FontConfig"],["impl Debug for Include"],["impl Debug for Match"],["impl Debug for RemapDir"],["impl Debug for RemapDirData"],["impl Debug for SelectFont"],["impl Debug for Test"]], "fontdb":[["impl Debug for Source"],["impl Debug for Style"],["impl Debug for Database"],["impl Debug for FaceInfo"],["impl Debug for ID"],["impl Debug for Weight"],["impl<'a> Debug for Family<'a>"],["impl<'a> Debug for Query<'a>"]], @@ -9,6 +13,8 @@ "memmap2":[["impl Debug for Advice"],["impl Debug for UncheckedAdvice"],["impl Debug for Mmap"],["impl Debug for MmapMut"],["impl Debug for MmapOptions"],["impl Debug for MmapRaw"],["impl Debug for RemapOptions"]], "proc_macro2":[["impl Debug for Delimiter"],["impl Debug for Spacing"],["impl Debug for TokenTree"],["impl Debug for DelimSpan"],["impl Debug for Group"],["impl Debug for Ident"],["impl Debug for LexError"],["impl Debug for Literal"],["impl Debug for Punct"],["impl Debug for Span"],["impl Debug for TokenStream"],["impl Debug for IntoIter"]], "rangemap":[["impl<K, V> Debug for RangeInclusiveMap<K, V>
where\n K: Ord + Clone + StepLite + Debug,\n V: Eq + Clone + Debug,
"],["impl<K: Debug, V: Debug> Debug for RangeMap<K, V>"],["impl<T> Debug for RangeInclusiveSet<T>
where\n T: Ord + Clone + StepLite + Debug,
"],["impl<T> Debug for RangeSet<T>
where\n T: Ord + Clone + Debug,
"]], +"rayon":[["impl<'a> Debug for Drain<'a>"],["impl<'a, K: Debug + Ord + Sync, V: Debug + Send> Debug for IterMut<'a, K, V>"],["impl<'a, K: Debug + Ord + Sync, V: Debug + Sync> Debug for Iter<'a, K, V>"],["impl<'a, K: Debug + Hash + Eq + Send, V: Debug + Send> Debug for Drain<'a, K, V>"],["impl<'a, K: Debug + Hash + Eq + Sync, V: Debug + Send> Debug for IterMut<'a, K, V>"],["impl<'a, K: Debug + Hash + Eq + Sync, V: Debug + Sync> Debug for Iter<'a, K, V>"],["impl<'a, T: Debug + Ord + Send> Debug for Drain<'a, T>"],["impl<'a, T: Debug + Ord + Sync> Debug for Iter<'a, T>"],["impl<'a, T: Debug + Ord + Sync> Debug for Iter<'a, T>"],["impl<'a, T: Debug + Hash + Eq + Send> Debug for Drain<'a, T>"],["impl<'a, T: Debug + Hash + Eq + Sync> Debug for Iter<'a, T>"],["impl<'a, T: Debug + Send> Debug for IterMut<'a, T>"],["impl<'a, T: Debug + Send> Debug for Drain<'a, T>"],["impl<'a, T: Debug + Send> Debug for IterMut<'a, T>"],["impl<'a, T: Debug + Send> Debug for IterMut<'a, T>"],["impl<'a, T: Debug + Send> Debug for IterMut<'a, T>"],["impl<'a, T: Debug + Sync> Debug for Iter<'a, T>"],["impl<'a, T: Debug + Sync> Debug for Iter<'a, T>"],["impl<'a, T: Debug + Sync> Debug for Iter<'a, T>"],["impl<'a, T: Debug + Sync> Debug for Iter<'a, T>"],["impl<'ch> Debug for Bytes<'ch>"],["impl<'ch> Debug for CharIndices<'ch>"],["impl<'ch> Debug for Chars<'ch>"],["impl<'ch> Debug for EncodeUtf16<'ch>"],["impl<'ch> Debug for Lines<'ch>"],["impl<'ch> Debug for SplitAsciiWhitespace<'ch>"],["impl<'ch> Debug for SplitWhitespace<'ch>"],["impl<'ch, P: Debug + Pattern> Debug for MatchIndices<'ch, P>"],["impl<'ch, P: Debug + Pattern> Debug for Matches<'ch, P>"],["impl<'ch, P: Debug + Pattern> Debug for Split<'ch, P>"],["impl<'ch, P: Debug + Pattern> Debug for SplitInclusive<'ch, P>"],["impl<'ch, P: Debug + Pattern> Debug for SplitTerminator<'ch, P>"],["impl<'data, T: Debug + Send> Debug for ChunksExactMut<'data, T>"],["impl<'data, T: Debug + Send> Debug for ChunksMut<'data, T>"],["impl<'data, T: Debug + Send> Debug for IterMut<'data, T>"],["impl<'data, T: Debug + Send> Debug for RChunksExactMut<'data, T>"],["impl<'data, T: Debug + Send> Debug for RChunksMut<'data, T>"],["impl<'data, T: Debug + Send> Debug for Drain<'data, T>"],["impl<'data, T: Debug + Sync> Debug for Chunks<'data, T>"],["impl<'data, T: Debug + Sync> Debug for ChunksExact<'data, T>"],["impl<'data, T: Debug + Sync> Debug for Iter<'data, T>"],["impl<'data, T: Debug + Sync> Debug for RChunks<'data, T>"],["impl<'data, T: Debug + Sync> Debug for RChunksExact<'data, T>"],["impl<'data, T: Debug + Sync> Debug for Windows<'data, T>"],["impl<'data, T: Debug, P> Debug for ChunkBy<'data, T, P>"],["impl<'data, T: Debug, P> Debug for ChunkByMut<'data, T, P>"],["impl<'data, T: Debug, P> Debug for Split<'data, T, P>"],["impl<'data, T: Debug, P> Debug for SplitInclusive<'data, T, P>"],["impl<'data, T: Debug, P> Debug for SplitInclusiveMut<'data, T, P>"],["impl<'data, T: Debug, P> Debug for SplitMut<'data, T, P>"],["impl<A, B> Debug for Chain<A, B>
where\n A: ParallelIterator + Debug,\n B: ParallelIterator<Item = A::Item> + Debug,
"],["impl<A: Debug + IndexedParallelIterator, B: Debug + IndexedParallelIterator> Debug for Zip<A, B>"],["impl<A: Debug + IndexedParallelIterator, B: Debug + IndexedParallelIterator> Debug for ZipEq<A, B>"],["impl<D: Debug, S> Debug for Split<D, S>"],["impl<I> Debug for Chunks<I>"],["impl<I> Debug for Intersperse<I>
where\n I: ParallelIterator + Debug,\n I::Item: Clone + Debug,
"],["impl<I, J> Debug for Interleave<I, J>"],["impl<I, J> Debug for InterleaveShortest<I, J>"],["impl<I: Debug + IndexedParallelIterator> Debug for Enumerate<I>"],["impl<I: Debug + IndexedParallelIterator> Debug for MaxLen<I>"],["impl<I: Debug + IndexedParallelIterator> Debug for MinLen<I>"],["impl<I: Debug + IndexedParallelIterator> Debug for Rev<I>"],["impl<I: Debug + IndexedParallelIterator> Debug for StepBy<I>"],["impl<I: Debug + ParallelIterator> Debug for Cloned<I>"],["impl<I: Debug + ParallelIterator> Debug for Copied<I>"],["impl<I: Debug + ParallelIterator> Debug for Flatten<I>"],["impl<I: Debug + ParallelIterator> Debug for FlattenIter<I>"],["impl<I: Debug + ParallelIterator> Debug for PanicFuse<I>"],["impl<I: Debug + ParallelIterator> Debug for SkipAny<I>"],["impl<I: Debug + ParallelIterator> Debug for TakeAny<I>"],["impl<I: Debug + ParallelIterator> Debug for WhileSome<I>"],["impl<I: Debug> Debug for ExponentialBlocks<I>"],["impl<I: Debug> Debug for Skip<I>"],["impl<I: Debug> Debug for Take<I>"],["impl<I: Debug> Debug for UniformBlocks<I>"],["impl<I: IndexedParallelIterator + Debug, ID, F> Debug for FoldChunks<I, ID, F>"],["impl<I: IndexedParallelIterator + Debug, P> Debug for Positions<I, P>"],["impl<I: IndexedParallelIterator + Debug, U: Debug, F> Debug for FoldChunksWith<I, U, F>"],["impl<I: ParallelIterator + Debug, F> Debug for FlatMap<I, F>"],["impl<I: ParallelIterator + Debug, F> Debug for FlatMapIter<I, F>"],["impl<I: ParallelIterator + Debug, F> Debug for Inspect<I, F>"],["impl<I: ParallelIterator + Debug, F> Debug for Map<I, F>"],["impl<I: ParallelIterator + Debug, F> Debug for Update<I, F>"],["impl<I: ParallelIterator + Debug, ID, F> Debug for Fold<I, ID, F>"],["impl<I: ParallelIterator + Debug, INIT, F> Debug for MapInit<I, INIT, F>"],["impl<I: ParallelIterator + Debug, P> Debug for Filter<I, P>"],["impl<I: ParallelIterator + Debug, P> Debug for FilterMap<I, P>"],["impl<I: ParallelIterator + Debug, P> Debug for SkipAnyWhile<I, P>"],["impl<I: ParallelIterator + Debug, P> Debug for TakeAnyWhile<I, P>"],["impl<I: ParallelIterator + Debug, T: Debug, F> Debug for MapWith<I, T, F>"],["impl<I: ParallelIterator + Debug, U: Debug, F> Debug for FoldWith<I, U, F>"],["impl<I: ParallelIterator + Debug, U: Try, F> Debug for TryFoldWith<I, U, F>
where\n U::Output: Debug,
"],["impl<Iter: Debug> Debug for IterBridge<Iter>"],["impl<K: Debug + Ord + Send, V: Debug + Send> Debug for IntoIter<K, V>"],["impl<K: Debug + Hash + Eq + Send, V: Debug + Send> Debug for IntoIter<K, V>"],["impl<S: Debug, B: Debug> Debug for WalkTree<S, B>"],["impl<S: Debug, B: Debug> Debug for WalkTreePostfix<S, B>"],["impl<S: Debug, B: Debug> Debug for WalkTreePrefix<S, B>"],["impl<T: Debug + Clone + Send> Debug for Repeat<T>"],["impl<T: Debug + Clone + Send> Debug for RepeatN<T>"],["impl<T: Debug + Ord + Send> Debug for IntoIter<T>"],["impl<T: Debug + Ord + Send> Debug for IntoIter<T>"],["impl<T: Debug + Hash + Eq + Send> Debug for IntoIter<T>"],["impl<T: Debug + Send> Debug for IntoIter<T>"],["impl<T: Debug + Send> Debug for IntoIter<T>"],["impl<T: Debug + Send> Debug for Once<T>"],["impl<T: Debug + Send> Debug for IntoIter<T>"],["impl<T: Debug + Send> Debug for IntoIter<T>"],["impl<T: Debug + Send> Debug for IntoIter<T>"],["impl<T: Debug + Send, const N: usize> Debug for IntoIter<T, N>"],["impl<T: Debug> Debug for MultiZip<T>"],["impl<T: Debug> Debug for Iter<T>"],["impl<T: Debug> Debug for Iter<T>"],["impl<T: Send> Debug for Empty<T>"],["impl<U, I: ParallelIterator + Debug, ID, F> Debug for TryFold<I, U, ID, F>"]], +"rayon_core":[["impl Debug for Yield"],["impl Debug for Configuration"],["impl Debug for FnContext"],["impl Debug for ThreadBuilder"],["impl Debug for ThreadPool"],["impl Debug for ThreadPoolBuildError"],["impl<'a> Debug for BroadcastContext<'a>"],["impl<'scope> Debug for Scope<'scope>"],["impl<'scope> Debug for ScopeFifo<'scope>"],["impl<S> Debug for ThreadPoolBuilder<S>"]], "read_fonts":[["impl Debug for ReadError"],["impl Debug for BitmapDataFormat"],["impl Debug for MapVariant"],["impl Debug for PlatformId"],["impl Debug for CompositeMode"],["impl Debug for Extend"],["impl Debug for GlyphClassDef"],["impl Debug for Opcode"],["impl Debug for Anchor"],["impl Debug for ToPathError"],["impl Debug for ToPathStyle"],["impl Debug for DeltaFormat"],["impl Debug for Entry"],["impl Debug for Operator"],["impl Debug for Token"],["impl Debug for Error"],["impl Debug for Number"],["impl Debug for TableRecord"],["impl Debug for AxisValueMap"],["impl Debug for BaseLangSysRecord"],["impl Debug for BaseScriptRecord"],["impl Debug for FeatMinMaxRecord"],["impl Debug for BdtComponent"],["impl Debug for BigGlyphMetrics"],["impl Debug for BitmapFlags"],["impl Debug for BitmapSize"],["impl Debug for GlyphIdOffsetPair"],["impl Debug for SbitLineMetrics"],["impl Debug for SmallGlyphMetrics"],["impl Debug for ConstantMapGroup"],["impl Debug for EncodingRecord"],["impl Debug for SequentialMapGroup"],["impl Debug for SubHeader"],["impl Debug for UnicodeRange"],["impl Debug for UvsMapping"],["impl Debug for VariationSelector"],["impl Debug for BaseGlyph"],["impl Debug for BaseGlyphPaint"],["impl Debug for Clip"],["impl Debug for ColorIndex"],["impl Debug for ColorStop"],["impl Debug for Layer"],["impl Debug for VarColorIndex"],["impl Debug for VarColorStop"],["impl Debug for ColorRecord"],["impl Debug for PaletteType"],["impl Debug for CvtDelta"],["impl Debug for VariationAxisRecord"],["impl Debug for GaspRange"],["impl Debug for GaspRangeBehavior"],["impl Debug for DecodeError"],["impl Debug for Component"],["impl Debug for CompositeGlyphFlags"],["impl Debug for CurvePoint"],["impl Debug for PointFlags"],["impl Debug for PointMarker"],["impl Debug for SimpleGlyphFlags"],["impl Debug for Transform"],["impl Debug for Class2Record"],["impl Debug for EntryExitRecord"],["impl Debug for MarkRecord"],["impl Debug for PairValueRecord"],["impl Debug for ValueFormat"],["impl Debug for ValueRecord"],["impl Debug for GlyphDelta"],["impl Debug for GvarFlags"],["impl Debug for U16Or32"],["impl Debug for MacStyle"],["impl Debug for LongMetric"],["impl Debug for ClassRangeRecord"],["impl Debug for FeatureRecord"],["impl Debug for FeatureTableSubstitutionRecord"],["impl Debug for FeatureVariationRecord"],["impl Debug for LangSysRecord"],["impl Debug for LookupFlag"],["impl Debug for RangeRecord"],["impl Debug for ScriptRecord"],["impl Debug for SequenceLookupRecord"],["impl Debug for ValueRecord"],["impl Debug for LangTagRecord"],["impl Debug for NameRecord"],["impl Debug for SelectionFlags"],["impl Debug for Blues"],["impl Debug for StemSnaps"],["impl Debug for FdSelectRange3"],["impl Debug for FdSelectRange4"],["impl Debug for StringId"],["impl Debug for HeaderFlags"],["impl Debug for AxisRecord"],["impl Debug for AxisValueRecord"],["impl Debug for AxisValueTableFlags"],["impl Debug for DeltaSetIndex"],["impl Debug for EntryFormat"],["impl Debug for FloatItemDelta"],["impl Debug for RegionAxisCoordinates"],["impl Debug for TupleIndex"],["impl Debug for TupleVariationCount"],["impl<'a> Debug for FontData<'a>"],["impl<'a> Debug for SegmentMaps<'a>"],["impl<'a> Debug for InstanceRecord<'a>"],["impl<'a> Debug for InlineOperands<'a>"],["impl<'a> Debug for Instruction<'a>"],["impl<'a> Debug for BaseRecord<'a>"],["impl<'a> Debug for Class1Record<'a>"],["impl<'a> Debug for ComponentRecord<'a>"],["impl<'a> Debug for Mark2Record<'a>"],["impl<'a> Debug for NameString<'a>"],["impl<'a> Debug for PString<'a>"],["impl<'a> Debug for Latin1String<'a>"],["impl<'a> Debug for DeltaRunIter<'a>"],["impl<'a> Debug for PackedDeltas<'a>"],["impl<'a> Debug for PackedPointNumbers<'a>"],["impl<'a> Debug for PackedPointNumbersIter<'a>"],["impl<'a> Debug for Tuple<'a>"],["impl<'a> Debug for VariationRegion<'a>"],["impl<'a, T: Debug> Debug for TupleDeltaIter<'a, T>"],["impl<T: ReadArgs> Debug for ComputedArray<'_, T>"]], "roxmltree":[["impl Debug for Error"],["impl Debug for NodeType"],["impl Debug for Attribute<'_, '_>"],["impl Debug for Attributes<'_, '_>"],["impl Debug for AxisIter<'_, '_>"],["impl Debug for Descendants<'_, '_>"],["impl Debug for ExpandedName<'_, '_>"],["impl Debug for NamespaceIter<'_, '_>"],["impl Debug for NodeId"],["impl Debug for ParsingOptions"],["impl Debug for TextPos"],["impl<'a, 'input: 'a> Debug for Children<'a, 'input>"],["impl<'a, 'input: 'a> Debug for Node<'a, 'input>"],["impl<'input> Debug for StringStorage<'input>"],["impl<'input> Debug for Document<'input>"],["impl<'input> Debug for Namespace<'input>"],["impl<'input> Debug for PI<'input>"]], "rustybuzz":[["impl Debug for BufferClusterLevel"],["impl Debug for Direction"],["impl Debug for BufferFlags"],["impl Debug for Feature"],["impl Debug for GlyphBuffer"],["impl Debug for GlyphInfo"],["impl Debug for GlyphPosition"],["impl Debug for Language"],["impl Debug for Script"],["impl Debug for UnicodeBuffer"],["impl Debug for Variation"]], diff --git a/trait.impl/core/fmt/trait.Display.js b/trait.impl/core/fmt/trait.Display.js index 008b37ac8f..c4b2a1e2f7 100644 --- a/trait.impl/core/fmt/trait.Display.js +++ b/trait.impl/core/fmt/trait.Display.js @@ -2,11 +2,14 @@ "bitflags":[["impl Display for ParseError"]], "bytemuck":[["impl Display for CheckedCastError"],["impl Display for PodCastError"]], "cosmic_text":[["impl Display for Align"],["impl Display for Wrap"],["impl Display for Metrics"]], +"crossbeam_utils":[["impl<T: Display> Display for CachePadded<T>"],["impl<T: ?Sized + Display> Display for ShardedLockReadGuard<'_, T>"],["impl<T: ?Sized + Display> Display for ShardedLockWriteGuard<'_, T>"]], +"either":[["impl<L, R> Display for Either<L, R>
where\n L: Display,\n R: Display,
"]], "font_types":[["impl Display for InvalidTag"],["impl Display for F26Dot6"],["impl Display for F2Dot14"],["impl Display for FWord"],["impl Display for Fixed"],["impl Display for GlyphId"],["impl Display for MajorMinor"],["impl Display for NameId"],["impl Display for Tag"],["impl Display for UfWord"],["impl Display for Uint24"],["impl Display for Version16Dot16"],["impl<T: Display + Scalar + Copy> Display for BigEndian<T>"]], "fontconfig_parser":[["impl Display for Error"]], "fontdb":[["impl Display for ID"]], "log":[["impl Display for Level"],["impl Display for LevelFilter"],["impl Display for ParseLevelError"],["impl Display for SetLoggerError"]], "proc_macro2":[["impl Display for TokenTree"],["impl Display for Group"],["impl Display for Ident"],["impl Display for LexError"],["impl Display for Literal"],["impl Display for Punct"],["impl Display for TokenStream"]], +"rayon_core":[["impl Display for ThreadPoolBuildError"]], "read_fonts":[["impl Display for ReadError"],["impl Display for Opcode"],["impl Display for ToPathError"],["impl Display for Error"],["impl Display for Number"],["impl Display for DecodeError"],["impl Display for Instruction<'_>"],["impl Display for Latin1String<'_>"],["impl<'a> Display for NameString<'a>"]], "roxmltree":[["impl Display for Error"],["impl Display for StringStorage<'_>"],["impl Display for TextPos"]], "smallvec":[["impl Display for CollectionAllocErr"]], diff --git a/trait.impl/core/fmt/trait.Pointer.js b/trait.impl/core/fmt/trait.Pointer.js index 69adc0d234..908ae1d706 100644 --- a/trait.impl/core/fmt/trait.Pointer.js +++ b/trait.impl/core/fmt/trait.Pointer.js @@ -1,3 +1,4 @@ (function() {var implementors = { +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> Pointer for Atomic<T>"],["impl<T: ?Sized + Pointable> Pointer for Shared<'_, T>"]], "tinyvec":[["impl<'s, T> Pointer for SliceVec<'s, T>
where\n T: Pointer,
"],["impl<A: Array> Pointer for TinyVec<A>
where\n A::Item: Pointer,
"],["impl<A: Array> Pointer for ArrayVec<A>
where\n A::Item: Pointer,
"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/future/future/trait.Future.js b/trait.impl/core/future/future/trait.Future.js new file mode 100644 index 0000000000..295de83be1 --- /dev/null +++ b/trait.impl/core/future/future/trait.Future.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"either":[["impl<L, R> Future for Either<L, R>
where\n L: Future,\n R: Future<Output = L::Output>,
"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/hash/trait.Hash.js b/trait.impl/core/hash/trait.Hash.js index 55149cda65..910344265e 100644 --- a/trait.impl/core/hash/trait.Hash.js +++ b/trait.impl/core/hash/trait.Hash.js @@ -1,6 +1,8 @@ (function() {var implementors = { "bytemuck":[["impl Hash for CheckedCastError"],["impl Hash for PodCastError"]], "cosmic_text":[["impl Hash for FamilyOwned"],["impl Hash for Shaping"],["impl Hash for SubpixelBin"],["impl Hash for AttrsOwned"],["impl Hash for CacheKey"],["impl Hash for CacheKeyFlags"],["impl Hash for Color"],["impl Hash for FontMatchAttrs"],["impl Hash for ShapeRunKey"],["impl<'a> Hash for Attrs<'a>"]], +"crossbeam_utils":[["impl<T: Hash> Hash for CachePadded<T>"]], +"either":[["impl<L: Hash, R: Hash> Hash for Either<L, R>"]], "font_types":[["impl Hash for F26Dot6"],["impl Hash for F2Dot14"],["impl Hash for FWord"],["impl Hash for Fixed"],["impl Hash for GlyphId"],["impl Hash for LongDateTime"],["impl Hash for MajorMinor"],["impl Hash for NameId"],["impl Hash for Tag"],["impl Hash for UfWord"],["impl Hash for Uint24"],["impl Hash for Version16Dot16"],["impl<T: Hash + Scalar> Hash for BigEndian<T>
where\n T::Raw: Hash,
"]], "fontdb":[["impl Hash for Style"],["impl Hash for ID"],["impl Hash for Weight"],["impl<'a> Hash for Family<'a>"],["impl<'a> Hash for Query<'a>"]], "log":[["impl Hash for Level"],["impl Hash for LevelFilter"],["impl<'a> Hash for Metadata<'a>"],["impl<'a> Hash for MetadataBuilder<'a>"]], diff --git a/trait.impl/core/iter/traits/collect/trait.Extend.js b/trait.impl/core/iter/traits/collect/trait.Extend.js index 6b8429433e..cf1034c95c 100644 --- a/trait.impl/core/iter/traits/collect/trait.Extend.js +++ b/trait.impl/core/iter/traits/collect/trait.Extend.js @@ -1,5 +1,6 @@ (function() {var implementors = { "cosmic_text":[["impl Extend<CacheKeyFlags> for CacheKeyFlags"]], +"either":[["impl<L, R, A> Extend<A> for Either<L, R>
where\n L: Extend<A>,\n R: Extend<A>,
"]], "proc_macro2":[["impl Extend<TokenTree> for TokenStream"],["impl Extend<TokenStream> for TokenStream"]], "rangemap":[["impl<K, V> Extend<(Range<K>, V)> for RangeMap<K, V>
where\n K: Ord + Clone,\n V: Eq + Clone,
"],["impl<K, V> Extend<(RangeInclusive<K>, V)> for RangeInclusiveMap<K, V>
where\n K: Ord + Clone + StepLite,\n V: Eq + Clone,
"],["impl<T> Extend<Range<T>> for RangeSet<T>
where\n T: Ord + Clone,
"],["impl<T> Extend<RangeInclusive<T>> for RangeInclusiveSet<T>
where\n T: Ord + Clone + StepLite,
"]], "rustybuzz":[["impl Extend<BufferFlags> for BufferFlags"],["impl Extend<SerializeFlags> for SerializeFlags"]], diff --git a/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/trait.impl/core/iter/traits/collect/trait.FromIterator.js index 7aca04d30d..d8e6ae5432 100644 --- a/trait.impl/core/iter/traits/collect/trait.FromIterator.js +++ b/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -1,5 +1,6 @@ (function() {var implementors = { "cosmic_text":[["impl FromIterator<CacheKeyFlags> for CacheKeyFlags"]], +"crossbeam_deque":[["impl<T> FromIterator<Steal<T>> for Steal<T>"]], "proc_macro2":[["impl FromIterator<TokenTree> for TokenStream"],["impl FromIterator<TokenStream> for TokenStream"]], "rangemap":[["impl<K, V> FromIterator<(Range<K>, V)> for RangeMap<K, V>
where\n K: Ord + Clone,\n V: Eq + Clone,
"],["impl<K, V> FromIterator<(RangeInclusive<K>, V)> for RangeInclusiveMap<K, V>
where\n K: Ord + Clone + StepLite,\n V: Eq + Clone,
"],["impl<T> FromIterator<Range<T>> for RangeSet<T>
where\n T: Ord + Clone,
"],["impl<T> FromIterator<RangeInclusive<T>> for RangeInclusiveSet<T>
where\n T: Ord + Clone + StepLite,
"]], "rustybuzz":[["impl FromIterator<BufferFlags> for BufferFlags"],["impl FromIterator<SerializeFlags> for SerializeFlags"]], diff --git a/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js b/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js index 8e1909fea4..fa2a4a1775 100644 --- a/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js +++ b/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js @@ -1,4 +1,5 @@ (function() {var implementors = { +"either":[["impl<L, R> DoubleEndedIterator for Either<L, R>
where\n L: DoubleEndedIterator,\n R: DoubleEndedIterator<Item = L::Item>,
"],["impl<L, R> DoubleEndedIterator for IterEither<L, R>"]], "rangemap":[["impl<'a, K> DoubleEndedIterator for Iter<'a, K>
where\n K: 'a,
"],["impl<'a, K> DoubleEndedIterator for Iter<'a, K>
where\n K: 'a,
"],["impl<'a, K, V> DoubleEndedIterator for Iter<'a, K, V>
where\n K: 'a,\n V: 'a,
"],["impl<'a, K, V> DoubleEndedIterator for Iter<'a, K, V>
where\n K: 'a,\n V: 'a,
"],["impl<'a, K, V, R: Borrow<Range<K>>> DoubleEndedIterator for Overlapping<'a, K, V, R>
where\n K: Ord,
"],["impl<'a, K, V, R: Borrow<RangeInclusive<K>>> DoubleEndedIterator for Overlapping<'a, K, V, R>
where\n K: Ord + Clone,
"],["impl<'a, T, R: Borrow<Range<T>>> DoubleEndedIterator for Overlapping<'a, T, R>
where\n T: Ord + Clone,
"],["impl<'a, T, R: Borrow<RangeInclusive<T>>> DoubleEndedIterator for Overlapping<'a, T, R>
where\n T: Ord + Clone,
"],["impl<K> DoubleEndedIterator for IntoIter<K>"],["impl<K> DoubleEndedIterator for IntoIter<K>"],["impl<K, V> DoubleEndedIterator for IntoIter<K, V>"],["impl<K, V> DoubleEndedIterator for IntoIter<K, V>"]], "roxmltree":[["impl<'a, 'input> DoubleEndedIterator for Attributes<'a, 'input>"],["impl<'a, 'input> DoubleEndedIterator for Descendants<'a, 'input>"],["impl<'a, 'input> DoubleEndedIterator for NamespaceIter<'a, 'input>"],["impl<'a, 'input: 'a> DoubleEndedIterator for Children<'a, 'input>"]], "smallvec":[["impl<'a, T: 'a + Array> DoubleEndedIterator for Drain<'a, T>"],["impl<A: Array> DoubleEndedIterator for IntoIter<A>"]], diff --git a/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js b/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js index e69f0a3bb8..82aa9a3f19 100644 --- a/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js +++ b/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js @@ -1,5 +1,6 @@ (function() {var implementors = { "cosmic_text":[["impl<'b> ExactSizeIterator for LayoutRunIter<'b>"]], +"either":[["impl<L, R> ExactSizeIterator for Either<L, R>
where\n L: ExactSizeIterator,\n R: ExactSizeIterator<Item = L::Item>,
"],["impl<L, R> ExactSizeIterator for IterEither<L, R>"]], "read_fonts":[["impl<'a> ExactSizeIterator for PackedPointNumbersIter<'a>"]], "roxmltree":[["impl ExactSizeIterator for Attributes<'_, '_>"],["impl ExactSizeIterator for Descendants<'_, '_>"],["impl ExactSizeIterator for NamespaceIter<'_, '_>"]], "slotmap":[["impl<'a, K: 'a + Key, V> ExactSizeIterator for Drain<'a, K, V>"],["impl<'a, K: 'a + Key, V> ExactSizeIterator for Iter<'a, K, V>"],["impl<'a, K: 'a + Key, V> ExactSizeIterator for IterMut<'a, K, V>"],["impl<'a, K: 'a + Key, V> ExactSizeIterator for Keys<'a, K, V>"],["impl<'a, K: 'a + Key, V> ExactSizeIterator for Values<'a, K, V>"],["impl<'a, K: 'a + Key, V> ExactSizeIterator for ValuesMut<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Drain<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Iter<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for IterMut<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Keys<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Values<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for ValuesMut<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Drain<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Iter<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for IterMut<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Keys<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Values<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for ValuesMut<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Drain<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Iter<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for IterMut<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Keys<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for Values<'a, K, V>"],["impl<'a, K: Key, V> ExactSizeIterator for ValuesMut<'a, K, V>"],["impl<K: Key, V> ExactSizeIterator for IntoIter<K, V>"],["impl<K: Key, V> ExactSizeIterator for IntoIter<K, V>"],["impl<K: Key, V> ExactSizeIterator for IntoIter<K, V>"],["impl<K: Key, V> ExactSizeIterator for IntoIter<K, V>"]], diff --git a/trait.impl/core/iter/traits/iterator/trait.Iterator.js b/trait.impl/core/iter/traits/iterator/trait.Iterator.js index 533fd48b12..f21568706d 100644 --- a/trait.impl/core/iter/traits/iterator/trait.Iterator.js +++ b/trait.impl/core/iter/traits/iterator/trait.Iterator.js @@ -1,6 +1,7 @@ (function() {var implementors = { "bitflags":[["impl<B: Flags> Iterator for Iter<B>"],["impl<B: Flags> Iterator for IterNames<B>"]], "cosmic_text":[["impl<'a> Iterator for LineIter<'a>"],["impl<'b> Iterator for LayoutRunIter<'b>"],["impl<'text> Iterator for BidiParagraphs<'text>"]], +"either":[["impl<L, R> Iterator for Either<L, R>
where\n L: Iterator,\n R: Iterator<Item = L::Item>,
"],["impl<L, R> Iterator for IterEither<L, R>
where\n L: Iterator,\n R: Iterator,
"]], "proc_macro2":[["impl Iterator for IntoIter"]], "rangemap":[["impl<'a, K, V> Iterator for Iter<'a, K, V>
where\n K: 'a,\n V: 'a,
"],["impl<'a, K, V> Iterator for Gaps<'a, K, V>
where\n K: Ord + Clone,
"],["impl<'a, K, V> Iterator for Iter<'a, K, V>
where\n K: 'a,\n V: 'a,
"],["impl<'a, K, V, R: Borrow<Range<K>>> Iterator for Overlapping<'a, K, V, R>
where\n K: Ord,
"],["impl<'a, K, V, R: Borrow<RangeInclusive<K>>> Iterator for Overlapping<'a, K, V, R>
where\n K: Ord + Clone,
"],["impl<'a, K, V, StepFnsT> Iterator for Gaps<'a, K, V, StepFnsT>
where\n K: Ord + Clone,\n StepFnsT: StepFns<K>,
"],["impl<'a, T> Iterator for Iter<'a, T>"],["impl<'a, T> Iterator for Gaps<'a, T>
where\n T: Ord + Clone,
"],["impl<'a, T> Iterator for Iter<'a, T>"],["impl<'a, T, R: Borrow<Range<T>>> Iterator for Overlapping<'a, T, R>
where\n T: Ord + Clone,
"],["impl<'a, T, R: Borrow<RangeInclusive<T>>> Iterator for Overlapping<'a, T, R>
where\n T: Ord + Clone,
"],["impl<'a, T, StepFnsT> Iterator for Gaps<'a, T, StepFnsT>
where\n T: Ord + Clone,\n StepFnsT: StepFns<T>,
"],["impl<K, V> Iterator for IntoIter<K, V>"],["impl<K, V> Iterator for IntoIter<K, V>"],["impl<T> Iterator for IntoIter<T>"],["impl<T> Iterator for IntoIter<T>"]], "read_fonts":[["impl Iterator for DeltaRunIter<'_>"],["impl Iterator for PackedPointNumbersIter<'_>"],["impl<'a> Iterator for Cmap12Iter<'a>"],["impl<'a> Iterator for Cmap14Iter<'a>"],["impl<'a> Iterator for Cmap4Iter<'a>"],["impl<'a> Iterator for CharIter<'a>"],["impl<'a> Iterator for TupleVariationHeaderIter<'a>"],["impl<'a, T> Iterator for TupleDeltaIter<'a, T>
where\n T: TupleDelta,
"],["impl<'a, T> Iterator for TupleVariationIter<'a, T>
where\n T: TupleDelta,
"]], diff --git a/trait.impl/core/iter/traits/marker/trait.FusedIterator.js b/trait.impl/core/iter/traits/marker/trait.FusedIterator.js index 3d818d80da..fde49adfb0 100644 --- a/trait.impl/core/iter/traits/marker/trait.FusedIterator.js +++ b/trait.impl/core/iter/traits/marker/trait.FusedIterator.js @@ -1,4 +1,5 @@ (function() {var implementors = { +"either":[["impl<L, R> FusedIterator for Either<L, R>
where\n L: FusedIterator,\n R: FusedIterator<Item = L::Item>,
"],["impl<L, R> FusedIterator for IterEither<L, R>
where\n L: FusedIterator,\n R: FusedIterator,
"]], "rangemap":[["impl<'a, K, V> FusedIterator for Gaps<'a, K, V>
where\n K: Ord + Clone,
"],["impl<'a, K, V, R: Borrow<Range<K>>> FusedIterator for Overlapping<'a, K, V, R>
where\n K: Ord,
"],["impl<'a, K, V, R: Borrow<RangeInclusive<K>>> FusedIterator for Overlapping<'a, K, V, R>
where\n K: Ord + Clone,
"],["impl<'a, K, V, StepFnsT> FusedIterator for Gaps<'a, K, V, StepFnsT>
where\n K: Ord + Clone,\n StepFnsT: StepFns<K>,
"],["impl<'a, T> FusedIterator for Gaps<'a, T>
where\n T: Ord + Clone,
"],["impl<'a, T, R: Borrow<Range<T>>> FusedIterator for Overlapping<'a, T, R>
where\n T: Ord + Clone,
"],["impl<'a, T, R: Borrow<RangeInclusive<T>>> FusedIterator for Overlapping<'a, T, R>
where\n T: Ord + Clone,
"],["impl<'a, T, StepFnsT> FusedIterator for Gaps<'a, T, StepFnsT>
where\n T: Ord + Clone,\n StepFnsT: StepFns<T>,
"]], "slotmap":[["impl<'a, K: 'a + Key, V> FusedIterator for Drain<'a, K, V>"],["impl<'a, K: 'a + Key, V> FusedIterator for Iter<'a, K, V>"],["impl<'a, K: 'a + Key, V> FusedIterator for IterMut<'a, K, V>"],["impl<'a, K: 'a + Key, V> FusedIterator for Keys<'a, K, V>"],["impl<'a, K: 'a + Key, V> FusedIterator for Values<'a, K, V>"],["impl<'a, K: 'a + Key, V> FusedIterator for ValuesMut<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Drain<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Iter<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for IterMut<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Keys<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Values<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for ValuesMut<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Drain<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Iter<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for IterMut<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Keys<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Values<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for ValuesMut<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Drain<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Iter<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for IterMut<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Keys<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for Values<'a, K, V>"],["impl<'a, K: Key, V> FusedIterator for ValuesMut<'a, K, V>"],["impl<K: Key, V> FusedIterator for IntoIter<K, V>"],["impl<K: Key, V> FusedIterator for IntoIter<K, V>"],["impl<K: Key, V> FusedIterator for IntoIter<K, V>"],["impl<K: Key, V> FusedIterator for IntoIter<K, V>"]], "smallvec":[["impl<'a, T: Array> FusedIterator for Drain<'a, T>"],["impl<A: Array> FusedIterator for IntoIter<A>"]], diff --git a/trait.impl/core/marker/trait.Copy.js b/trait.impl/core/marker/trait.Copy.js index df825fb5f8..cd9fa7ec08 100644 --- a/trait.impl/core/marker/trait.Copy.js +++ b/trait.impl/core/marker/trait.Copy.js @@ -1,6 +1,10 @@ (function() {var implementors = { "bytemuck":[["impl Copy for CheckedCastError"],["impl Copy for PodCastError"]], "cosmic_text":[["impl Copy for Action"],["impl Copy for Affinity"],["impl Copy for Align"],["impl Copy for LineEnding"],["impl Copy for Motion"],["impl Copy for Selection"],["impl Copy for Shaping"],["impl Copy for SubpixelBin"],["impl Copy for Wrap"],["impl Copy for CacheKey"],["impl Copy for CacheKeyFlags"],["impl Copy for Color"],["impl Copy for Cursor"],["impl Copy for FontMatchKey"],["impl Copy for LayoutCursor"],["impl Copy for Metrics"],["impl Copy for Scroll"],["impl<'a> Copy for Attrs<'a>"]], +"crossbeam_deque":[["impl<T: Copy> Copy for Steal<T>"]], +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> Copy for Shared<'_, T>"]], +"crossbeam_utils":[["impl<T: Copy> Copy for CachePadded<T>"]], +"either":[["impl<L: Copy, R: Copy> Copy for Either<L, R>"]], "font_types":[["impl Copy for PenCommand"],["impl Copy for F26Dot6"],["impl Copy for F2Dot14"],["impl Copy for FWord"],["impl Copy for Fixed"],["impl Copy for GlyphId"],["impl Copy for LongDateTime"],["impl Copy for MajorMinor"],["impl Copy for NameId"],["impl Copy for Offset16"],["impl Copy for Offset24"],["impl Copy for Offset32"],["impl Copy for Tag"],["impl Copy for UfWord"],["impl Copy for Uint24"],["impl Copy for Version16Dot16"],["impl<T: Copy + Scalar> Copy for BigEndian<T>
where\n T::Raw: Copy,
"],["impl<T: Copy> Copy for BoundingBox<T>"],["impl<T: Copy> Copy for Nullable<T>"],["impl<T: Copy> Copy for Point<T>"]], "fontconfig_parser":[["impl Copy for BinaryOp"],["impl Copy for Constant"],["impl Copy for DirPrefix"],["impl Copy for EditBinding"],["impl Copy for EditMode"],["impl Copy for IntOrRange"],["impl Copy for ListOp"],["impl Copy for MatchTarget"],["impl Copy for PropertyTarget"],["impl Copy for TernaryOp"],["impl Copy for TestCompare"],["impl Copy for TestQual"],["impl Copy for TestTarget"],["impl Copy for UnaryOp"]], "fontdb":[["impl Copy for Style"],["impl Copy for ID"],["impl Copy for Weight"],["impl<'a> Copy for Family<'a>"],["impl<'a> Copy for Query<'a>"]], @@ -8,6 +12,7 @@ "log":[["impl Copy for Level"],["impl Copy for LevelFilter"]], "memmap2":[["impl Copy for Advice"],["impl Copy for UncheckedAdvice"],["impl Copy for RemapOptions"]], "proc_macro2":[["impl Copy for Delimiter"],["impl Copy for Spacing"],["impl Copy for DelimSpan"],["impl Copy for Span"]], +"rayon_core":[["impl Copy for Yield"]], "read_fonts":[["impl Copy for BitmapDataFormat"],["impl Copy for MapVariant"],["impl Copy for PlatformId"],["impl Copy for CompositeMode"],["impl Copy for Extend"],["impl Copy for GlyphClassDef"],["impl Copy for Opcode"],["impl Copy for Anchor"],["impl Copy for ToPathStyle"],["impl Copy for DeltaFormat"],["impl Copy for Encoding"],["impl Copy for Operator"],["impl Copy for Token"],["impl Copy for Number"],["impl Copy for TableRecord"],["impl Copy for AxisValueMap"],["impl Copy for BaseLangSysRecord"],["impl Copy for BaseScriptRecord"],["impl Copy for FeatMinMaxRecord"],["impl Copy for BdtComponent"],["impl Copy for BigGlyphMetrics"],["impl Copy for BitmapFlags"],["impl Copy for BitmapSize"],["impl Copy for GlyphIdOffsetPair"],["impl Copy for SbitLineMetrics"],["impl Copy for SmallGlyphMetrics"],["impl Copy for ConstantMapGroup"],["impl Copy for EncodingRecord"],["impl Copy for SequentialMapGroup"],["impl Copy for SubHeader"],["impl Copy for UnicodeRange"],["impl Copy for UvsMapping"],["impl Copy for VariationSelector"],["impl Copy for BaseGlyph"],["impl Copy for BaseGlyphPaint"],["impl Copy for Clip"],["impl Copy for ColorIndex"],["impl Copy for ColorStop"],["impl Copy for Layer"],["impl Copy for VarColorIndex"],["impl Copy for VarColorStop"],["impl Copy for ColorRecord"],["impl Copy for PaletteType"],["impl Copy for CvtDelta"],["impl Copy for VariationAxisRecord"],["impl Copy for GaspRange"],["impl Copy for GaspRangeBehavior"],["impl Copy for DecodeError"],["impl Copy for CompositeGlyphFlags"],["impl Copy for CurvePoint"],["impl Copy for PointFlags"],["impl Copy for PointMarker"],["impl Copy for SimpleGlyphFlags"],["impl Copy for Transform"],["impl Copy for EntryExitRecord"],["impl Copy for MarkRecord"],["impl Copy for ValueFormat"],["impl Copy for GlyphDelta"],["impl Copy for GvarFlags"],["impl Copy for U16Or32"],["impl Copy for MacStyle"],["impl Copy for LongMetric"],["impl Copy for ClassRangeRecord"],["impl Copy for FeatureRecord"],["impl Copy for FeatureTableSubstitutionRecord"],["impl Copy for FeatureVariationRecord"],["impl Copy for LangSysRecord"],["impl Copy for LookupFlag"],["impl Copy for RangeRecord"],["impl Copy for ScriptRecord"],["impl Copy for SequenceLookupRecord"],["impl Copy for ValueRecord"],["impl Copy for LangTagRecord"],["impl Copy for NameRecord"],["impl Copy for SelectionFlags"],["impl Copy for Blues"],["impl Copy for StemSnaps"],["impl Copy for FdSelectRange3"],["impl Copy for FdSelectRange4"],["impl Copy for StringId"],["impl Copy for HeaderFlags"],["impl Copy for AxisRecord"],["impl Copy for AxisValueRecord"],["impl Copy for AxisValueTableFlags"],["impl Copy for DeltaSetIndex"],["impl Copy for EntryFormat"],["impl Copy for FloatItemDelta"],["impl Copy for RegionAxisCoordinates"],["impl Copy for TupleIndex"],["impl Copy for TupleVariationCount"],["impl<'a> Copy for FontData<'a>"],["impl<'a> Copy for Decoder<'a>"],["impl<'a> Copy for InlineOperands<'a>"],["impl<'a> Copy for Instruction<'a>"],["impl<'a> Copy for NameString<'a>"],["impl<'a> Copy for PString<'a>"],["impl<'a> Copy for Latin1String<'a>"]], "roxmltree":[["impl Copy for NodeType"],["impl Copy for NodeId"],["impl Copy for ParsingOptions"],["impl Copy for TextPos"],["impl<'a, 'b> Copy for ExpandedName<'a, 'b>"],["impl<'a, 'input: 'a> Copy for Attribute<'a, 'input>"],["impl<'a, 'input: 'a> Copy for Node<'a, 'input>"],["impl<'input> Copy for PI<'input>"]], "rustybuzz":[["impl Copy for BufferClusterLevel"],["impl Copy for Direction"],["impl Copy for BufferFlags"],["impl Copy for Feature"],["impl Copy for GlyphInfo"],["impl Copy for GlyphPosition"],["impl Copy for Script"],["impl Copy for Variation"]], diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js index 63fff2a80b..eda26616cd 100644 --- a/trait.impl/core/marker/trait.Freeze.js +++ b/trait.impl/core/marker/trait.Freeze.js @@ -2,6 +2,10 @@ "bitflags":[["impl Freeze for ParseError",1,["bitflags::parser::ParseError"]],["impl<B> Freeze for Iter<B>
where\n B: Freeze,
",1,["bitflags::iter::Iter"]],["impl<B> Freeze for IterNames<B>
where\n B: Freeze,
",1,["bitflags::iter::IterNames"]],["impl<B> Freeze for Flag<B>
where\n B: Freeze,
",1,["bitflags::traits::Flag"]]], "bytemuck":[["impl Freeze for CheckedCastError",1,["bytemuck::checked::CheckedCastError"]],["impl Freeze for PodCastError",1,["bytemuck::PodCastError"]],["impl Freeze for BoxBytes",1,["bytemuck::allocation::BoxBytes"]]], "cosmic_text":[["impl Freeze for Action",1,["cosmic_text::edit::Action"]],["impl Freeze for Affinity",1,["cosmic_text::cursor::Affinity"]],["impl Freeze for Align",1,["cosmic_text::layout::Align"]],["impl Freeze for FamilyOwned",1,["cosmic_text::attrs::FamilyOwned"]],["impl Freeze for LineEnding",1,["cosmic_text::line_ending::LineEnding"]],["impl Freeze for Motion",1,["cosmic_text::cursor::Motion"]],["impl Freeze for Selection",1,["cosmic_text::edit::Selection"]],["impl Freeze for Shaping",1,["cosmic_text::shape::Shaping"]],["impl Freeze for SubpixelBin",1,["cosmic_text::glyph_cache::SubpixelBin"]],["impl Freeze for Wrap",1,["cosmic_text::layout::Wrap"]],["impl Freeze for AttrsList",1,["cosmic_text::attrs::AttrsList"]],["impl Freeze for AttrsOwned",1,["cosmic_text::attrs::AttrsOwned"]],["impl Freeze for Buffer",1,["cosmic_text::buffer::Buffer"]],["impl Freeze for BufferLine",1,["cosmic_text::buffer_line::BufferLine"]],["impl Freeze for CacheKey",1,["cosmic_text::glyph_cache::CacheKey"]],["impl Freeze for CacheKeyFlags",1,["cosmic_text::glyph_cache::CacheKeyFlags"]],["impl Freeze for Change",1,["cosmic_text::edit::Change"]],["impl Freeze for ChangeItem",1,["cosmic_text::edit::ChangeItem"]],["impl Freeze for Color",1,["cosmic_text::attrs::Color"]],["impl Freeze for Cursor",1,["cosmic_text::cursor::Cursor"]],["impl Freeze for Font",1,["cosmic_text::font::Font"]],["impl Freeze for FontMatchAttrs",1,["cosmic_text::attrs::FontMatchAttrs"]],["impl Freeze for FontMatchKey",1,["cosmic_text::font::system::FontMatchKey"]],["impl Freeze for FontSystem",1,["cosmic_text::font::system::FontSystem"]],["impl Freeze for LayoutCursor",1,["cosmic_text::cursor::LayoutCursor"]],["impl Freeze for LayoutGlyph",1,["cosmic_text::layout::LayoutGlyph"]],["impl Freeze for LayoutLine",1,["cosmic_text::layout::LayoutLine"]],["impl Freeze for Metrics",1,["cosmic_text::buffer::Metrics"]],["impl Freeze for PhysicalGlyph",1,["cosmic_text::layout::PhysicalGlyph"]],["impl Freeze for Scroll",1,["cosmic_text::cursor::Scroll"]],["impl Freeze for ShapeBuffer",1,["cosmic_text::shape::ShapeBuffer"]],["impl Freeze for ShapeGlyph",1,["cosmic_text::shape::ShapeGlyph"]],["impl Freeze for ShapeLine",1,["cosmic_text::shape::ShapeLine"]],["impl Freeze for ShapeRunCache",1,["cosmic_text::shape_run_cache::ShapeRunCache"]],["impl Freeze for ShapeRunKey",1,["cosmic_text::shape_run_cache::ShapeRunKey"]],["impl Freeze for ShapeSpan",1,["cosmic_text::shape::ShapeSpan"]],["impl Freeze for ShapeWord",1,["cosmic_text::shape::ShapeWord"]],["impl Freeze for SwashCache",1,["cosmic_text::swash::SwashCache"]],["impl<'a> Freeze for Attrs<'a>",1,["cosmic_text::attrs::Attrs"]],["impl<'a> Freeze for LayoutRun<'a>",1,["cosmic_text::buffer::LayoutRun"]],["impl<'a> Freeze for LineIter<'a>",1,["cosmic_text::line_ending::LineIter"]],["impl<'a, T> Freeze for BorrowedWithFontSystem<'a, T>",1,["cosmic_text::font::system::BorrowedWithFontSystem"]],["impl<'b> Freeze for LayoutRunIter<'b>",1,["cosmic_text::buffer::LayoutRunIter"]],["impl<'buffer> Freeze for BufferRef<'buffer>",1,["cosmic_text::edit::BufferRef"]],["impl<'buffer> Freeze for Editor<'buffer>",1,["cosmic_text::edit::editor::Editor"]],["impl<'text> Freeze for BidiParagraphs<'text>",1,["cosmic_text::bidi_para::BidiParagraphs"]]], +"crossbeam_deque":[["impl<T> !Freeze for Injector<T>",1,["crossbeam_deque::deque::Injector"]],["impl<T> !Freeze for Worker<T>",1,["crossbeam_deque::deque::Worker"]],["impl<T> Freeze for Steal<T>
where\n T: Freeze,
",1,["crossbeam_deque::deque::Steal"]],["impl<T> Freeze for Stealer<T>",1,["crossbeam_deque::deque::Stealer"]]], +"crossbeam_epoch":[["impl Freeze for Collector",1,["crossbeam_epoch::collector::Collector"]],["impl Freeze for Guard",1,["crossbeam_epoch::guard::Guard"]],["impl Freeze for LocalHandle",1,["crossbeam_epoch::collector::LocalHandle"]],["impl<'g, T: ?Sized> Freeze for Shared<'g, T>",1,["crossbeam_epoch::atomic::Shared"]],["impl<'g, T: ?Sized, P> Freeze for CompareExchangeError<'g, T, P>
where\n P: Freeze,
",1,["crossbeam_epoch::atomic::CompareExchangeError"]],["impl<T> !Freeze for Atomic<T>",1,["crossbeam_epoch::atomic::Atomic"]],["impl<T: ?Sized> Freeze for Owned<T>",1,["crossbeam_epoch::atomic::Owned"]]], +"crossbeam_utils":[["impl !Freeze for Backoff",1,["crossbeam_utils::backoff::Backoff"]],["impl Freeze for Parker",1,["crossbeam_utils::sync::parker::Parker"]],["impl Freeze for Unparker",1,["crossbeam_utils::sync::parker::Unparker"]],["impl Freeze for WaitGroup",1,["crossbeam_utils::sync::wait_group::WaitGroup"]],["impl<'a, T: ?Sized> Freeze for ShardedLockReadGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockReadGuard"]],["impl<'a, T: ?Sized> Freeze for ShardedLockWriteGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockWriteGuard"]],["impl<'env> Freeze for Scope<'env>",1,["crossbeam_utils::thread::Scope"]],["impl<'scope, 'env> Freeze for ScopedThreadBuilder<'scope, 'env>",1,["crossbeam_utils::thread::ScopedThreadBuilder"]],["impl<'scope, T> Freeze for ScopedJoinHandle<'scope, T>",1,["crossbeam_utils::thread::ScopedJoinHandle"]],["impl<T> !Freeze for AtomicCell<T>",1,["crossbeam_utils::atomic::atomic_cell::AtomicCell"]],["impl<T> !Freeze for ShardedLock<T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLock"]],["impl<T> Freeze for CachePadded<T>
where\n T: Freeze,
",1,["crossbeam_utils::cache_padded::CachePadded"]]], +"either":[["impl<L, R> Freeze for Either<L, R>
where\n L: Freeze,\n R: Freeze,
",1,["either::Either"]],["impl<L, R> Freeze for IterEither<L, R>
where\n L: Freeze,\n R: Freeze,
",1,["either::iterator::IterEither"]]], "font_types":[["impl Freeze for InvalidTag",1,["font_types::tag::InvalidTag"]],["impl Freeze for PenCommand",1,["font_types::pen::PenCommand"]],["impl Freeze for F26Dot6",1,["font_types::fixed::F26Dot6"]],["impl Freeze for F2Dot14",1,["font_types::fixed::F2Dot14"]],["impl Freeze for FWord",1,["font_types::fword::FWord"]],["impl Freeze for Fixed",1,["font_types::fixed::Fixed"]],["impl Freeze for GlyphId",1,["font_types::glyph_id::GlyphId"]],["impl Freeze for LongDateTime",1,["font_types::longdatetime::LongDateTime"]],["impl Freeze for MajorMinor",1,["font_types::version::MajorMinor"]],["impl Freeze for NameId",1,["font_types::name_id::NameId"]],["impl Freeze for Offset16",1,["font_types::offset::Offset16"]],["impl Freeze for Offset24",1,["font_types::offset::Offset24"]],["impl Freeze for Offset32",1,["font_types::offset::Offset32"]],["impl Freeze for Tag",1,["font_types::tag::Tag"]],["impl Freeze for UfWord",1,["font_types::fword::UfWord"]],["impl Freeze for Uint24",1,["font_types::uint24::Uint24"]],["impl Freeze for Version16Dot16",1,["font_types::version::Version16Dot16"]],["impl<T> Freeze for BigEndian<T>
where\n <T as Scalar>::Raw: Freeze,
",1,["font_types::raw::BigEndian"]],["impl<T> Freeze for BoundingBox<T>
where\n T: Freeze,
",1,["font_types::bbox::BoundingBox"]],["impl<T> Freeze for Nullable<T>
where\n T: Freeze,
",1,["font_types::offset::Nullable"]],["impl<T> Freeze for Point<T>
where\n T: Freeze,
",1,["font_types::point::Point"]]], "fontconfig_parser":[["impl Freeze for BinaryOp",1,["fontconfig_parser::types::value::BinaryOp"]],["impl Freeze for ConfigPart",1,["fontconfig_parser::types::document::ConfigPart"]],["impl Freeze for Constant",1,["fontconfig_parser::types::constant::Constant"]],["impl Freeze for DirPrefix",1,["fontconfig_parser::types::dir::DirPrefix"]],["impl Freeze for EditBinding",1,["fontconfig_parser::types::match_::edit::EditBinding"]],["impl Freeze for EditMode",1,["fontconfig_parser::types::match_::edit::EditMode"]],["impl Freeze for Error",1,["fontconfig_parser::error::Error"]],["impl Freeze for Expression",1,["fontconfig_parser::types::value::Expression"]],["impl Freeze for FontMatch",1,["fontconfig_parser::types::selectfont::FontMatch"]],["impl Freeze for IntOrRange",1,["fontconfig_parser::types::IntOrRange"]],["impl Freeze for ListOp",1,["fontconfig_parser::types::value::ListOp"]],["impl Freeze for MatchTarget",1,["fontconfig_parser::types::match_::MatchTarget"]],["impl Freeze for PrefixBehavior",1,["fontconfig_parser::types::dir::PrefixBehavior"]],["impl Freeze for Property",1,["fontconfig_parser::types::property::Property"]],["impl Freeze for PropertyKind",1,["fontconfig_parser::types::property::PropertyKind"]],["impl Freeze for PropertyTarget",1,["fontconfig_parser::types::value::PropertyTarget"]],["impl Freeze for TernaryOp",1,["fontconfig_parser::types::value::TernaryOp"]],["impl Freeze for TestCompare",1,["fontconfig_parser::types::match_::test::TestCompare"]],["impl Freeze for TestQual",1,["fontconfig_parser::types::match_::test::TestQual"]],["impl Freeze for TestTarget",1,["fontconfig_parser::types::match_::test::TestTarget"]],["impl Freeze for UnaryOp",1,["fontconfig_parser::types::value::UnaryOp"]],["impl Freeze for Value",1,["fontconfig_parser::types::value::Value"]],["impl Freeze for Alias",1,["fontconfig_parser::types::alias::Alias"]],["impl Freeze for CacheDir",1,["fontconfig_parser::types::dir::CacheDir"]],["impl Freeze for Config",1,["fontconfig_parser::types::config::Config"]],["impl Freeze for Dir",1,["fontconfig_parser::types::dir::Dir"]],["impl Freeze for DirData",1,["fontconfig_parser::types::document::DirData"]],["impl Freeze for Edit",1,["fontconfig_parser::types::match_::edit::Edit"]],["impl Freeze for FontConfig",1,["fontconfig_parser::types::document::FontConfig"]],["impl Freeze for Include",1,["fontconfig_parser::types::dir::Include"]],["impl Freeze for Match",1,["fontconfig_parser::types::match_::Match"]],["impl Freeze for RemapDir",1,["fontconfig_parser::types::dir::RemapDir"]],["impl Freeze for RemapDirData",1,["fontconfig_parser::types::document::RemapDirData"]],["impl Freeze for SelectFont",1,["fontconfig_parser::types::selectfont::SelectFont"]],["impl Freeze for Test",1,["fontconfig_parser::types::match_::test::Test"]]], "fontdb":[["impl Freeze for Source",1,["fontdb::Source"]],["impl Freeze for Style",1,["fontdb::Style"]],["impl Freeze for Database",1,["fontdb::Database"]],["impl Freeze for FaceInfo",1,["fontdb::FaceInfo"]],["impl Freeze for ID",1,["fontdb::ID"]],["impl Freeze for Weight",1,["fontdb::Weight"]],["impl<'a> Freeze for Family<'a>",1,["fontdb::Family"]],["impl<'a> Freeze for Query<'a>",1,["fontdb::Query"]]], @@ -11,6 +15,8 @@ "memmap2":[["impl Freeze for Advice",1,["memmap2::advice::Advice"]],["impl Freeze for UncheckedAdvice",1,["memmap2::advice::UncheckedAdvice"]],["impl Freeze for Mmap",1,["memmap2::Mmap"]],["impl Freeze for MmapMut",1,["memmap2::MmapMut"]],["impl Freeze for MmapOptions",1,["memmap2::MmapOptions"]],["impl Freeze for MmapRaw",1,["memmap2::MmapRaw"]],["impl Freeze for MmapRawDescriptor",1,["memmap2::MmapRawDescriptor"]],["impl Freeze for RemapOptions",1,["memmap2::RemapOptions"]]], "proc_macro2":[["impl Freeze for Delimiter",1,["proc_macro2::Delimiter"]],["impl Freeze for Spacing",1,["proc_macro2::Spacing"]],["impl Freeze for TokenTree",1,["proc_macro2::TokenTree"]],["impl Freeze for DelimSpan",1,["proc_macro2::extra::DelimSpan"]],["impl Freeze for Group",1,["proc_macro2::Group"]],["impl Freeze for Ident",1,["proc_macro2::Ident"]],["impl Freeze for LexError",1,["proc_macro2::LexError"]],["impl Freeze for Literal",1,["proc_macro2::Literal"]],["impl Freeze for Punct",1,["proc_macro2::Punct"]],["impl Freeze for Span",1,["proc_macro2::Span"]],["impl Freeze for TokenStream",1,["proc_macro2::TokenStream"]],["impl Freeze for IntoIter",1,["proc_macro2::token_stream::IntoIter"]]], "rangemap":[["impl<'a, K, V> Freeze for Iter<'a, K, V>",1,["rangemap::inclusive_map::Iter"]],["impl<'a, K, V> Freeze for Gaps<'a, K, V>",1,["rangemap::map::Gaps"]],["impl<'a, K, V> Freeze for Iter<'a, K, V>",1,["rangemap::map::Iter"]],["impl<'a, K, V, R> Freeze for Overlapping<'a, K, V, R>
where\n R: Freeze,
",1,["rangemap::inclusive_map::Overlapping"]],["impl<'a, K, V, R> Freeze for Overlapping<'a, K, V, R>
where\n R: Freeze,
",1,["rangemap::map::Overlapping"]],["impl<'a, K, V, StepFnsT> Freeze for Gaps<'a, K, V, StepFnsT>
where\n K: Freeze,
",1,["rangemap::inclusive_map::Gaps"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rangemap::inclusive_set::Iter"]],["impl<'a, T> Freeze for Gaps<'a, T>",1,["rangemap::set::Gaps"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rangemap::set::Iter"]],["impl<'a, T, R> Freeze for Overlapping<'a, T, R>
where\n R: Freeze,
",1,["rangemap::inclusive_set::Overlapping"]],["impl<'a, T, R> Freeze for Overlapping<'a, T, R>
where\n R: Freeze,
",1,["rangemap::set::Overlapping"]],["impl<'a, T, StepFnsT> Freeze for Gaps<'a, T, StepFnsT>
where\n T: Freeze,
",1,["rangemap::inclusive_set::Gaps"]],["impl<K, V> Freeze for IntoIter<K, V>",1,["rangemap::inclusive_map::IntoIter"]],["impl<K, V> Freeze for IntoIter<K, V>",1,["rangemap::map::IntoIter"]],["impl<K, V> Freeze for RangeMap<K, V>",1,["rangemap::map::RangeMap"]],["impl<K, V, StepFnsT> Freeze for RangeInclusiveMap<K, V, StepFnsT>",1,["rangemap::inclusive_map::RangeInclusiveMap"]],["impl<T> Freeze for IntoIter<T>",1,["rangemap::inclusive_set::IntoIter"]],["impl<T> Freeze for IntoIter<T>",1,["rangemap::set::IntoIter"]],["impl<T> Freeze for RangeSet<T>",1,["rangemap::set::RangeSet"]],["impl<T, StepFnsT> Freeze for RangeInclusiveSet<T, StepFnsT>",1,["rangemap::inclusive_set::RangeInclusiveSet"]]], +"rayon":[["impl<'a> Freeze for Drain<'a>",1,["rayon::string::Drain"]],["impl<'a, K, V> Freeze for Iter<'a, K, V>",1,["rayon::collections::btree_map::Iter"]],["impl<'a, K, V> Freeze for IterMut<'a, K, V>",1,["rayon::collections::btree_map::IterMut"]],["impl<'a, K, V> Freeze for Drain<'a, K, V>",1,["rayon::collections::hash_map::Drain"]],["impl<'a, K, V> Freeze for Iter<'a, K, V>",1,["rayon::collections::hash_map::Iter"]],["impl<'a, K, V> Freeze for IterMut<'a, K, V>",1,["rayon::collections::hash_map::IterMut"]],["impl<'a, T> Freeze for Drain<'a, T>",1,["rayon::collections::binary_heap::Drain"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rayon::collections::binary_heap::Iter"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rayon::collections::btree_set::Iter"]],["impl<'a, T> Freeze for Drain<'a, T>",1,["rayon::collections::hash_set::Drain"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rayon::collections::hash_set::Iter"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rayon::collections::linked_list::Iter"]],["impl<'a, T> Freeze for IterMut<'a, T>",1,["rayon::collections::linked_list::IterMut"]],["impl<'a, T> Freeze for Drain<'a, T>",1,["rayon::collections::vec_deque::Drain"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rayon::collections::vec_deque::Iter"]],["impl<'a, T> Freeze for IterMut<'a, T>",1,["rayon::collections::vec_deque::IterMut"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rayon::option::Iter"]],["impl<'a, T> Freeze for IterMut<'a, T>",1,["rayon::option::IterMut"]],["impl<'a, T> Freeze for Iter<'a, T>",1,["rayon::result::Iter"]],["impl<'a, T> Freeze for IterMut<'a, T>",1,["rayon::result::IterMut"]],["impl<'ch> Freeze for Bytes<'ch>",1,["rayon::str::Bytes"]],["impl<'ch> Freeze for CharIndices<'ch>",1,["rayon::str::CharIndices"]],["impl<'ch> Freeze for Chars<'ch>",1,["rayon::str::Chars"]],["impl<'ch> Freeze for EncodeUtf16<'ch>",1,["rayon::str::EncodeUtf16"]],["impl<'ch> Freeze for Lines<'ch>",1,["rayon::str::Lines"]],["impl<'ch> Freeze for SplitAsciiWhitespace<'ch>",1,["rayon::str::SplitAsciiWhitespace"]],["impl<'ch> Freeze for SplitWhitespace<'ch>",1,["rayon::str::SplitWhitespace"]],["impl<'ch, P> Freeze for MatchIndices<'ch, P>
where\n P: Freeze,
",1,["rayon::str::MatchIndices"]],["impl<'ch, P> Freeze for Matches<'ch, P>
where\n P: Freeze,
",1,["rayon::str::Matches"]],["impl<'ch, P> Freeze for Split<'ch, P>
where\n P: Freeze,
",1,["rayon::str::Split"]],["impl<'ch, P> Freeze for SplitInclusive<'ch, P>
where\n P: Freeze,
",1,["rayon::str::SplitInclusive"]],["impl<'ch, P> Freeze for SplitTerminator<'ch, P>
where\n P: Freeze,
",1,["rayon::str::SplitTerminator"]],["impl<'data, T> Freeze for Chunks<'data, T>",1,["rayon::slice::chunks::Chunks"]],["impl<'data, T> Freeze for ChunksExact<'data, T>",1,["rayon::slice::chunks::ChunksExact"]],["impl<'data, T> Freeze for ChunksExactMut<'data, T>",1,["rayon::slice::chunks::ChunksExactMut"]],["impl<'data, T> Freeze for ChunksMut<'data, T>",1,["rayon::slice::chunks::ChunksMut"]],["impl<'data, T> Freeze for Iter<'data, T>",1,["rayon::slice::Iter"]],["impl<'data, T> Freeze for IterMut<'data, T>",1,["rayon::slice::IterMut"]],["impl<'data, T> Freeze for RChunks<'data, T>",1,["rayon::slice::rchunks::RChunks"]],["impl<'data, T> Freeze for RChunksExact<'data, T>",1,["rayon::slice::rchunks::RChunksExact"]],["impl<'data, T> Freeze for RChunksExactMut<'data, T>",1,["rayon::slice::rchunks::RChunksExactMut"]],["impl<'data, T> Freeze for RChunksMut<'data, T>",1,["rayon::slice::rchunks::RChunksMut"]],["impl<'data, T> Freeze for Windows<'data, T>",1,["rayon::slice::Windows"]],["impl<'data, T> Freeze for Drain<'data, T>",1,["rayon::vec::Drain"]],["impl<'data, T, P> Freeze for ChunkBy<'data, T, P>
where\n P: Freeze,
",1,["rayon::slice::chunk_by::ChunkBy"]],["impl<'data, T, P> Freeze for ChunkByMut<'data, T, P>
where\n P: Freeze,
",1,["rayon::slice::chunk_by::ChunkByMut"]],["impl<'data, T, P> Freeze for Split<'data, T, P>
where\n P: Freeze,
",1,["rayon::slice::Split"]],["impl<'data, T, P> Freeze for SplitInclusive<'data, T, P>
where\n P: Freeze,
",1,["rayon::slice::SplitInclusive"]],["impl<'data, T, P> Freeze for SplitInclusiveMut<'data, T, P>
where\n P: Freeze,
",1,["rayon::slice::SplitInclusiveMut"]],["impl<'data, T, P> Freeze for SplitMut<'data, T, P>
where\n P: Freeze,
",1,["rayon::slice::SplitMut"]],["impl<A, B> Freeze for Chain<A, B>
where\n A: Freeze,\n B: Freeze,
",1,["rayon::iter::chain::Chain"]],["impl<A, B> Freeze for Zip<A, B>
where\n A: Freeze,\n B: Freeze,
",1,["rayon::iter::zip::Zip"]],["impl<A, B> Freeze for ZipEq<A, B>
where\n A: Freeze,\n B: Freeze,
",1,["rayon::iter::zip_eq::ZipEq"]],["impl<D, S> Freeze for Split<D, S>
where\n D: Freeze,\n S: Freeze,
",1,["rayon::iter::splitter::Split"]],["impl<I> Freeze for Chunks<I>
where\n I: Freeze,
",1,["rayon::iter::chunks::Chunks"]],["impl<I> Freeze for Cloned<I>
where\n I: Freeze,
",1,["rayon::iter::cloned::Cloned"]],["impl<I> Freeze for Copied<I>
where\n I: Freeze,
",1,["rayon::iter::copied::Copied"]],["impl<I> Freeze for Enumerate<I>
where\n I: Freeze,
",1,["rayon::iter::enumerate::Enumerate"]],["impl<I> Freeze for ExponentialBlocks<I>
where\n I: Freeze,
",1,["rayon::iter::blocks::ExponentialBlocks"]],["impl<I> Freeze for Flatten<I>
where\n I: Freeze,
",1,["rayon::iter::flatten::Flatten"]],["impl<I> Freeze for FlattenIter<I>
where\n I: Freeze,
",1,["rayon::iter::flatten_iter::FlattenIter"]],["impl<I> Freeze for Intersperse<I>
where\n I: Freeze,\n <I as ParallelIterator>::Item: Freeze,
",1,["rayon::iter::intersperse::Intersperse"]],["impl<I> Freeze for MaxLen<I>
where\n I: Freeze,
",1,["rayon::iter::len::MaxLen"]],["impl<I> Freeze for MinLen<I>
where\n I: Freeze,
",1,["rayon::iter::len::MinLen"]],["impl<I> Freeze for PanicFuse<I>
where\n I: Freeze,
",1,["rayon::iter::panic_fuse::PanicFuse"]],["impl<I> Freeze for Rev<I>
where\n I: Freeze,
",1,["rayon::iter::rev::Rev"]],["impl<I> Freeze for Skip<I>
where\n I: Freeze,
",1,["rayon::iter::skip::Skip"]],["impl<I> Freeze for SkipAny<I>
where\n I: Freeze,
",1,["rayon::iter::skip_any::SkipAny"]],["impl<I> Freeze for StepBy<I>
where\n I: Freeze,
",1,["rayon::iter::step_by::StepBy"]],["impl<I> Freeze for Take<I>
where\n I: Freeze,
",1,["rayon::iter::take::Take"]],["impl<I> Freeze for TakeAny<I>
where\n I: Freeze,
",1,["rayon::iter::take_any::TakeAny"]],["impl<I> Freeze for UniformBlocks<I>
where\n I: Freeze,
",1,["rayon::iter::blocks::UniformBlocks"]],["impl<I> Freeze for WhileSome<I>
where\n I: Freeze,
",1,["rayon::iter::while_some::WhileSome"]],["impl<I, F> Freeze for FlatMap<I, F>
where\n F: Freeze,\n I: Freeze,
",1,["rayon::iter::flat_map::FlatMap"]],["impl<I, F> Freeze for FlatMapIter<I, F>
where\n F: Freeze,\n I: Freeze,
",1,["rayon::iter::flat_map_iter::FlatMapIter"]],["impl<I, F> Freeze for Inspect<I, F>
where\n F: Freeze,\n I: Freeze,
",1,["rayon::iter::inspect::Inspect"]],["impl<I, F> Freeze for Map<I, F>
where\n F: Freeze,\n I: Freeze,
",1,["rayon::iter::map::Map"]],["impl<I, F> Freeze for Update<I, F>
where\n F: Freeze,\n I: Freeze,
",1,["rayon::iter::update::Update"]],["impl<I, ID, F> Freeze for Fold<I, ID, F>
where\n F: Freeze,\n I: Freeze,\n ID: Freeze,
",1,["rayon::iter::fold::Fold"]],["impl<I, ID, F> Freeze for FoldChunks<I, ID, F>
where\n F: Freeze,\n I: Freeze,\n ID: Freeze,
",1,["rayon::iter::fold_chunks::FoldChunks"]],["impl<I, INIT, F> Freeze for MapInit<I, INIT, F>
where\n F: Freeze,\n I: Freeze,\n INIT: Freeze,
",1,["rayon::iter::map_with::MapInit"]],["impl<I, J> Freeze for Interleave<I, J>
where\n I: Freeze,\n J: Freeze,
",1,["rayon::iter::interleave::Interleave"]],["impl<I, J> Freeze for InterleaveShortest<I, J>
where\n I: Freeze,\n J: Freeze,
",1,["rayon::iter::interleave_shortest::InterleaveShortest"]],["impl<I, P> Freeze for Filter<I, P>
where\n I: Freeze,\n P: Freeze,
",1,["rayon::iter::filter::Filter"]],["impl<I, P> Freeze for FilterMap<I, P>
where\n I: Freeze,\n P: Freeze,
",1,["rayon::iter::filter_map::FilterMap"]],["impl<I, P> Freeze for Positions<I, P>
where\n I: Freeze,\n P: Freeze,
",1,["rayon::iter::positions::Positions"]],["impl<I, P> Freeze for SkipAnyWhile<I, P>
where\n I: Freeze,\n P: Freeze,
",1,["rayon::iter::skip_any_while::SkipAnyWhile"]],["impl<I, P> Freeze for TakeAnyWhile<I, P>
where\n I: Freeze,\n P: Freeze,
",1,["rayon::iter::take_any_while::TakeAnyWhile"]],["impl<I, T, F> Freeze for MapWith<I, T, F>
where\n F: Freeze,\n I: Freeze,\n T: Freeze,
",1,["rayon::iter::map_with::MapWith"]],["impl<I, U, F> Freeze for FoldChunksWith<I, U, F>
where\n F: Freeze,\n I: Freeze,\n U: Freeze,
",1,["rayon::iter::fold_chunks_with::FoldChunksWith"]],["impl<I, U, F> Freeze for FoldWith<I, U, F>
where\n F: Freeze,\n I: Freeze,\n U: Freeze,
",1,["rayon::iter::fold::FoldWith"]],["impl<I, U, F> Freeze for TryFoldWith<I, U, F>
where\n F: Freeze,\n I: Freeze,\n <U as Try>::Output: Freeze,
",1,["rayon::iter::try_fold::TryFoldWith"]],["impl<I, U, ID, F> Freeze for TryFold<I, U, ID, F>
where\n F: Freeze,\n I: Freeze,\n ID: Freeze,
",1,["rayon::iter::try_fold::TryFold"]],["impl<Iter> Freeze for IterBridge<Iter>
where\n Iter: Freeze,
",1,["rayon::iter::par_bridge::IterBridge"]],["impl<K, V> Freeze for IntoIter<K, V>",1,["rayon::collections::btree_map::IntoIter"]],["impl<K, V> Freeze for IntoIter<K, V>",1,["rayon::collections::hash_map::IntoIter"]],["impl<S, B> Freeze for WalkTree<S, B>
where\n B: Freeze,\n S: Freeze,
",1,["rayon::iter::walk_tree::WalkTree"]],["impl<S, B> Freeze for WalkTreePostfix<S, B>
where\n B: Freeze,\n S: Freeze,
",1,["rayon::iter::walk_tree::WalkTreePostfix"]],["impl<S, B> Freeze for WalkTreePrefix<S, B>
where\n B: Freeze,\n S: Freeze,
",1,["rayon::iter::walk_tree::WalkTreePrefix"]],["impl<T> Freeze for IntoIter<T>",1,["rayon::collections::binary_heap::IntoIter"]],["impl<T> Freeze for IntoIter<T>",1,["rayon::collections::btree_set::IntoIter"]],["impl<T> Freeze for IntoIter<T>",1,["rayon::collections::hash_set::IntoIter"]],["impl<T> Freeze for IntoIter<T>",1,["rayon::collections::linked_list::IntoIter"]],["impl<T> Freeze for IntoIter<T>",1,["rayon::collections::vec_deque::IntoIter"]],["impl<T> Freeze for Empty<T>",1,["rayon::iter::empty::Empty"]],["impl<T> Freeze for MultiZip<T>
where\n T: Freeze,
",1,["rayon::iter::multizip::MultiZip"]],["impl<T> Freeze for Once<T>
where\n T: Freeze,
",1,["rayon::iter::once::Once"]],["impl<T> Freeze for Repeat<T>
where\n T: Freeze,
",1,["rayon::iter::repeat::Repeat"]],["impl<T> Freeze for RepeatN<T>
where\n T: Freeze,
",1,["rayon::iter::repeat::RepeatN"]],["impl<T> Freeze for IntoIter<T>
where\n T: Freeze,
",1,["rayon::option::IntoIter"]],["impl<T> Freeze for Iter<T>
where\n T: Freeze,
",1,["rayon::range::Iter"]],["impl<T> Freeze for Iter<T>
where\n T: Freeze,
",1,["rayon::range_inclusive::Iter"]],["impl<T> Freeze for IntoIter<T>
where\n T: Freeze,
",1,["rayon::result::IntoIter"]],["impl<T> Freeze for IntoIter<T>",1,["rayon::vec::IntoIter"]],["impl<T, const N: usize> Freeze for IntoIter<T, N>
where\n T: Freeze,
",1,["rayon::array::IntoIter"]]], +"rayon_core":[["impl !Freeze for ThreadBuilder",1,["rayon_core::registry::ThreadBuilder"]],["impl Freeze for Yield",1,["rayon_core::thread_pool::Yield"]],["impl Freeze for Configuration",1,["rayon_core::Configuration"]],["impl Freeze for FnContext",1,["rayon_core::FnContext"]],["impl Freeze for ThreadPool",1,["rayon_core::thread_pool::ThreadPool"]],["impl Freeze for ThreadPoolBuildError",1,["rayon_core::ThreadPoolBuildError"]],["impl<'a> Freeze for BroadcastContext<'a>",1,["rayon_core::broadcast::BroadcastContext"]],["impl<'scope> !Freeze for Scope<'scope>",1,["rayon_core::scope::Scope"]],["impl<'scope> !Freeze for ScopeFifo<'scope>",1,["rayon_core::scope::ScopeFifo"]],["impl<S> Freeze for ThreadPoolBuilder<S>
where\n S: Freeze,
",1,["rayon_core::ThreadPoolBuilder"]]], "read_fonts":[["impl Freeze for ReadError",1,["read_fonts::read::ReadError"]],["impl Freeze for BitmapDataFormat",1,["read_fonts::tables::bitmap::BitmapDataFormat"]],["impl Freeze for BitmapMetrics",1,["read_fonts::tables::bitmap::BitmapMetrics"]],["impl Freeze for MapVariant",1,["read_fonts::tables::cmap::MapVariant"]],["impl Freeze for PlatformId",1,["read_fonts::tables::cmap::PlatformId"]],["impl Freeze for CompositeMode",1,["read_fonts::tables::colr::CompositeMode"]],["impl Freeze for Extend",1,["read_fonts::tables::colr::Extend"]],["impl Freeze for GlyphClassDef",1,["read_fonts::tables::gdef::GlyphClassDef"]],["impl Freeze for Opcode",1,["read_fonts::tables::glyf::bytecode::opcode::Opcode"]],["impl Freeze for Anchor",1,["read_fonts::tables::glyf::Anchor"]],["impl Freeze for ToPathError",1,["read_fonts::tables::glyf::ToPathError"]],["impl Freeze for ToPathStyle",1,["read_fonts::tables::glyf::ToPathStyle"]],["impl Freeze for DeltaFormat",1,["read_fonts::tables::layout::DeltaFormat"]],["impl Freeze for Encoding",1,["read_fonts::tables::name::Encoding"]],["impl Freeze for Entry",1,["read_fonts::tables::postscript::dict::Entry"]],["impl Freeze for Operator",1,["read_fonts::tables::postscript::dict::Operator"]],["impl Freeze for Token",1,["read_fonts::tables::postscript::dict::Token"]],["impl Freeze for Error",1,["read_fonts::tables::postscript::Error"]],["impl Freeze for Number",1,["read_fonts::tables::postscript::stack::Number"]],["impl Freeze for TableRecord",1,["read_fonts::TableRecord"]],["impl Freeze for AxisValueMap",1,["read_fonts::tables::avar::AxisValueMap"]],["impl Freeze for BaseLangSysRecord",1,["read_fonts::tables::base::BaseLangSysRecord"]],["impl Freeze for BaseScriptRecord",1,["read_fonts::tables::base::BaseScriptRecord"]],["impl Freeze for FeatMinMaxRecord",1,["read_fonts::tables::base::FeatMinMaxRecord"]],["impl Freeze for BdtComponent",1,["read_fonts::tables::bitmap::BdtComponent"]],["impl Freeze for BigGlyphMetrics",1,["read_fonts::tables::bitmap::BigGlyphMetrics"]],["impl Freeze for BitmapFlags",1,["read_fonts::tables::bitmap::BitmapFlags"]],["impl Freeze for BitmapLocation",1,["read_fonts::tables::bitmap::BitmapLocation"]],["impl Freeze for BitmapSize",1,["read_fonts::tables::bitmap::BitmapSize"]],["impl Freeze for GlyphIdOffsetPair",1,["read_fonts::tables::bitmap::GlyphIdOffsetPair"]],["impl Freeze for SbitLineMetrics",1,["read_fonts::tables::bitmap::SbitLineMetrics"]],["impl Freeze for SmallGlyphMetrics",1,["read_fonts::tables::bitmap::SmallGlyphMetrics"]],["impl Freeze for ConstantMapGroup",1,["read_fonts::tables::cmap::ConstantMapGroup"]],["impl Freeze for EncodingRecord",1,["read_fonts::tables::cmap::EncodingRecord"]],["impl Freeze for SequentialMapGroup",1,["read_fonts::tables::cmap::SequentialMapGroup"]],["impl Freeze for SubHeader",1,["read_fonts::tables::cmap::SubHeader"]],["impl Freeze for UnicodeRange",1,["read_fonts::tables::cmap::UnicodeRange"]],["impl Freeze for UvsMapping",1,["read_fonts::tables::cmap::UvsMapping"]],["impl Freeze for VariationSelector",1,["read_fonts::tables::cmap::VariationSelector"]],["impl Freeze for BaseGlyph",1,["read_fonts::tables::colr::BaseGlyph"]],["impl Freeze for BaseGlyphPaint",1,["read_fonts::tables::colr::BaseGlyphPaint"]],["impl Freeze for Clip",1,["read_fonts::tables::colr::Clip"]],["impl Freeze for ColorIndex",1,["read_fonts::tables::colr::ColorIndex"]],["impl Freeze for ColorStop",1,["read_fonts::tables::colr::ColorStop"]],["impl Freeze for Layer",1,["read_fonts::tables::colr::Layer"]],["impl Freeze for VarColorIndex",1,["read_fonts::tables::colr::VarColorIndex"]],["impl Freeze for VarColorStop",1,["read_fonts::tables::colr::VarColorStop"]],["impl Freeze for ColorRecord",1,["read_fonts::tables::cpal::ColorRecord"]],["impl Freeze for PaletteType",1,["read_fonts::tables::cpal::PaletteType"]],["impl Freeze for CvtDelta",1,["read_fonts::tables::cvar::CvtDelta"]],["impl Freeze for VariationAxisRecord",1,["read_fonts::tables::fvar::VariationAxisRecord"]],["impl Freeze for GaspRange",1,["read_fonts::tables::gasp::GaspRange"]],["impl Freeze for GaspRangeBehavior",1,["read_fonts::tables::gasp::GaspRangeBehavior"]],["impl Freeze for DecodeError",1,["read_fonts::tables::glyf::bytecode::decode::DecodeError"]],["impl Freeze for Component",1,["read_fonts::tables::glyf::Component"]],["impl Freeze for CompositeGlyphFlags",1,["read_fonts::tables::glyf::CompositeGlyphFlags"]],["impl Freeze for CurvePoint",1,["read_fonts::tables::glyf::CurvePoint"]],["impl Freeze for PointFlags",1,["read_fonts::tables::glyf::PointFlags"]],["impl Freeze for PointMarker",1,["read_fonts::tables::glyf::PointMarker"]],["impl Freeze for SimpleGlyphFlags",1,["read_fonts::tables::glyf::SimpleGlyphFlags"]],["impl Freeze for Transform",1,["read_fonts::tables::glyf::Transform"]],["impl Freeze for Class2Record",1,["read_fonts::tables::gpos::Class2Record"]],["impl Freeze for EntryExitRecord",1,["read_fonts::tables::gpos::EntryExitRecord"]],["impl Freeze for MarkRecord",1,["read_fonts::tables::gpos::MarkRecord"]],["impl Freeze for PairValueRecord",1,["read_fonts::tables::gpos::PairValueRecord"]],["impl Freeze for ValueFormat",1,["read_fonts::tables::gpos::ValueFormat"]],["impl Freeze for ValueRecord",1,["read_fonts::tables::gpos::value_record::ValueRecord"]],["impl Freeze for GlyphDelta",1,["read_fonts::tables::gvar::GlyphDelta"]],["impl Freeze for GvarFlags",1,["read_fonts::tables::gvar::GvarFlags"]],["impl Freeze for U16Or32",1,["read_fonts::tables::gvar::U16Or32"]],["impl Freeze for MacStyle",1,["read_fonts::tables::head::MacStyle"]],["impl Freeze for LongMetric",1,["read_fonts::tables::hmtx::LongMetric"]],["impl Freeze for ClassRangeRecord",1,["read_fonts::tables::layout::ClassRangeRecord"]],["impl Freeze for FeatureRecord",1,["read_fonts::tables::layout::FeatureRecord"]],["impl Freeze for FeatureTableSubstitutionRecord",1,["read_fonts::tables::layout::FeatureTableSubstitutionRecord"]],["impl Freeze for FeatureVariationRecord",1,["read_fonts::tables::layout::FeatureVariationRecord"]],["impl Freeze for LangSysRecord",1,["read_fonts::tables::layout::LangSysRecord"]],["impl Freeze for LookupFlag",1,["read_fonts::tables::layout::lookupflag::LookupFlag"]],["impl Freeze for RangeRecord",1,["read_fonts::tables::layout::RangeRecord"]],["impl Freeze for ScriptRecord",1,["read_fonts::tables::layout::ScriptRecord"]],["impl Freeze for SequenceLookupRecord",1,["read_fonts::tables::layout::SequenceLookupRecord"]],["impl Freeze for ValueRecord",1,["read_fonts::tables::mvar::ValueRecord"]],["impl Freeze for LangTagRecord",1,["read_fonts::tables::name::LangTagRecord"]],["impl Freeze for MacRomanMapping",1,["read_fonts::tables::name::MacRomanMapping"]],["impl Freeze for NameRecord",1,["read_fonts::tables::name::NameRecord"]],["impl Freeze for SelectionFlags",1,["read_fonts::tables::os2::SelectionFlags"]],["impl Freeze for Blues",1,["read_fonts::tables::postscript::dict::Blues"]],["impl Freeze for StemSnaps",1,["read_fonts::tables::postscript::dict::StemSnaps"]],["impl Freeze for FdSelectRange3",1,["read_fonts::tables::postscript::FdSelectRange3"]],["impl Freeze for FdSelectRange4",1,["read_fonts::tables::postscript::FdSelectRange4"]],["impl Freeze for Stack",1,["read_fonts::tables::postscript::stack::Stack"]],["impl Freeze for StringId",1,["read_fonts::tables::postscript::string::StringId"]],["impl Freeze for HeaderFlags",1,["read_fonts::tables::sbix::HeaderFlags"]],["impl Freeze for AxisRecord",1,["read_fonts::tables::stat::AxisRecord"]],["impl Freeze for AxisValueRecord",1,["read_fonts::tables::stat::AxisValueRecord"]],["impl Freeze for AxisValueTableFlags",1,["read_fonts::tables::stat::AxisValueTableFlags"]],["impl Freeze for DeltaSetIndex",1,["read_fonts::tables::variations::DeltaSetIndex"]],["impl Freeze for EntryFormat",1,["read_fonts::tables::variations::EntryFormat"]],["impl Freeze for FloatItemDelta",1,["read_fonts::tables::variations::FloatItemDelta"]],["impl Freeze for RegionAxisCoordinates",1,["read_fonts::tables::variations::RegionAxisCoordinates"]],["impl Freeze for TupleIndex",1,["read_fonts::tables::variations::TupleIndex"]],["impl Freeze for TupleVariationCount",1,["read_fonts::tables::variations::TupleVariationCount"]],["impl<'a> Freeze for FileRef<'a>",1,["read_fonts::FileRef"]],["impl<'a> Freeze for BaseCoord<'a>",1,["read_fonts::tables::base::BaseCoord"]],["impl<'a> Freeze for BitmapContent<'a>",1,["read_fonts::tables::bitmap::BitmapContent"]],["impl<'a> Freeze for IndexSubtable<'a>",1,["read_fonts::tables::bitmap::IndexSubtable"]],["impl<'a> Freeze for CmapSubtable<'a>",1,["read_fonts::tables::cmap::CmapSubtable"]],["impl<'a> Freeze for ClipBox<'a>",1,["read_fonts::tables::colr::ClipBox"]],["impl<'a> Freeze for Paint<'a>",1,["read_fonts::tables::colr::Paint"]],["impl<'a> Freeze for CaretValue<'a>",1,["read_fonts::tables::gdef::CaretValue"]],["impl<'a> Freeze for Glyph<'a>",1,["read_fonts::tables::glyf::Glyph"]],["impl<'a> Freeze for AnchorTable<'a>",1,["read_fonts::tables::gpos::AnchorTable"]],["impl<'a> Freeze for ExtensionSubtable<'a>",1,["read_fonts::tables::gpos::ExtensionSubtable"]],["impl<'a> Freeze for PairPos<'a>",1,["read_fonts::tables::gpos::PairPos"]],["impl<'a> Freeze for PositionLookup<'a>",1,["read_fonts::tables::gpos::PositionLookup"]],["impl<'a> Freeze for PositionSubtables<'a>",1,["read_fonts::tables::gpos::PositionSubtables"]],["impl<'a> Freeze for SinglePos<'a>",1,["read_fonts::tables::gpos::SinglePos"]],["impl<'a> Freeze for ExtensionSubtable<'a>",1,["read_fonts::tables::gsub::ExtensionSubtable"]],["impl<'a> Freeze for SingleSubst<'a>",1,["read_fonts::tables::gsub::SingleSubst"]],["impl<'a> Freeze for SubstitutionLookup<'a>",1,["read_fonts::tables::gsub::SubstitutionLookup"]],["impl<'a> Freeze for SubstitutionSubtables<'a>",1,["read_fonts::tables::gsub::SubstitutionSubtables"]],["impl<'a> Freeze for ChainedSequenceContext<'a>",1,["read_fonts::tables::layout::ChainedSequenceContext"]],["impl<'a> Freeze for ClassDef<'a>",1,["read_fonts::tables::layout::ClassDef"]],["impl<'a> Freeze for CoverageTable<'a>",1,["read_fonts::tables::layout::CoverageTable"]],["impl<'a> Freeze for DeviceOrVariationIndex<'a>",1,["read_fonts::tables::layout::DeviceOrVariationIndex"]],["impl<'a> Freeze for FeatureParams<'a>",1,["read_fonts::tables::layout::FeatureParams"]],["impl<'a> Freeze for SequenceContext<'a>",1,["read_fonts::tables::layout::SequenceContext"]],["impl<'a> Freeze for Loca<'a>",1,["read_fonts::tables::loca::Loca"]],["impl<'a> Freeze for FdSelect<'a>",1,["read_fonts::tables::postscript::FdSelect"]],["impl<'a> Freeze for Index<'a>",1,["read_fonts::tables::postscript::index::Index"]],["impl<'a> Freeze for AxisValue<'a>",1,["read_fonts::tables::stat::AxisValue"]],["impl<'a> Freeze for DeltaSetIndexMap<'a>",1,["read_fonts::tables::variations::DeltaSetIndexMap"]],["impl<'a> Freeze for CollectionRef<'a>",1,["read_fonts::CollectionRef"]],["impl<'a> Freeze for FontData<'a>",1,["read_fonts::font_data::FontData"]],["impl<'a> Freeze for FontRef<'a>",1,["read_fonts::FontRef"]],["impl<'a> Freeze for SegmentMaps<'a>",1,["read_fonts::tables::avar::SegmentMaps"]],["impl<'a> Freeze for BitmapData<'a>",1,["read_fonts::tables::bitmap::BitmapData"]],["impl<'a> Freeze for Cff<'a>",1,["read_fonts::tables::cff::Cff"]],["impl<'a> Freeze for Cff2<'a>",1,["read_fonts::tables::cff2::Cff2"]],["impl<'a> Freeze for Cmap12Iter<'a>",1,["read_fonts::tables::cmap::Cmap12Iter"]],["impl<'a> Freeze for Cmap14Iter<'a>",1,["read_fonts::tables::cmap::Cmap14Iter"]],["impl<'a> Freeze for Cmap4Iter<'a>",1,["read_fonts::tables::cmap::Cmap4Iter"]],["impl<'a> Freeze for InstanceRecord<'a>",1,["read_fonts::tables::fvar::instance_record::InstanceRecord"]],["impl<'a> Freeze for Decoder<'a>",1,["read_fonts::tables::glyf::bytecode::decode::Decoder"]],["impl<'a> Freeze for InlineOperands<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::InlineOperands"]],["impl<'a> Freeze for Instruction<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::Instruction"]],["impl<'a> Freeze for BaseRecord<'a>",1,["read_fonts::tables::gpos::BaseRecord"]],["impl<'a> Freeze for Class1Record<'a>",1,["read_fonts::tables::gpos::Class1Record"]],["impl<'a> Freeze for ComponentRecord<'a>",1,["read_fonts::tables::gpos::ComponentRecord"]],["impl<'a> Freeze for Mark2Record<'a>",1,["read_fonts::tables::gpos::Mark2Record"]],["impl<'a> Freeze for CharIter<'a>",1,["read_fonts::tables::name::CharIter"]],["impl<'a> Freeze for NameString<'a>",1,["read_fonts::tables::name::NameString"]],["impl<'a> Freeze for PString<'a>",1,["read_fonts::tables::post::PString"]],["impl<'a> Freeze for BlendState<'a>",1,["read_fonts::tables::postscript::blend::BlendState"]],["impl<'a> Freeze for Latin1String<'a>",1,["read_fonts::tables::postscript::string::Latin1String"]],["impl<'a> Freeze for DeltaRunIter<'a>",1,["read_fonts::tables::variations::DeltaRunIter"]],["impl<'a> Freeze for PackedDeltas<'a>",1,["read_fonts::tables::variations::PackedDeltas"]],["impl<'a> Freeze for PackedPointNumbers<'a>",1,["read_fonts::tables::variations::PackedPointNumbers"]],["impl<'a> Freeze for PackedPointNumbersIter<'a>",1,["read_fonts::tables::variations::PackedPointNumbersIter"]],["impl<'a> Freeze for Tuple<'a>",1,["read_fonts::tables::variations::Tuple"]],["impl<'a> Freeze for TupleVariationHeaderIter<'a>",1,["read_fonts::tables::variations::TupleVariationHeaderIter"]],["impl<'a> Freeze for VariationRegion<'a>",1,["read_fonts::tables::variations::VariationRegion"]],["impl<'a, P> Freeze for PenSink<'a, P>",1,["read_fonts::tables::postscript::charstring::PenSink"]],["impl<'a, T> Freeze for ComputedArray<'a, T>
where\n <T as ReadArgs>::Args: Freeze,
",1,["read_fonts::array::ComputedArray"]],["impl<'a, T> Freeze for VarLenArray<'a, T>",1,["read_fonts::array::VarLenArray"]],["impl<'a, T> Freeze for TableRef<'a, T>
where\n T: Freeze,
",1,["read_fonts::table_ref::TableRef"]],["impl<'a, T> Freeze for TupleDeltaIter<'a, T>",1,["read_fonts::tables::variations::TupleDeltaIter"]],["impl<'a, T> Freeze for TupleVariation<'a, T>",1,["read_fonts::tables::variations::TupleVariation"]],["impl<'a, T> Freeze for TupleVariationData<'a, T>",1,["read_fonts::tables::variations::TupleVariationData"]],["impl<'a, T> Freeze for TupleVariationIter<'a, T>",1,["read_fonts::tables::variations::TupleVariationIter"]],["impl<'a, T, Ext> Freeze for Subtables<'a, T, Ext>",1,["read_fonts::tables::layout::Subtables"]],["impl<'a, T, O> Freeze for ArrayOfNullableOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Freeze,
",1,["read_fonts::offset_array::ArrayOfNullableOffsets"]],["impl<'a, T, O> Freeze for ArrayOfOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Freeze,
",1,["read_fonts::offset_array::ArrayOfOffsets"]]], "roxmltree":[["impl Freeze for Error",1,["roxmltree::parse::Error"]],["impl Freeze for NodeType",1,["roxmltree::NodeType"]],["impl Freeze for NodeId",1,["roxmltree::NodeId"]],["impl Freeze for ParsingOptions",1,["roxmltree::parse::ParsingOptions"]],["impl Freeze for TextPos",1,["roxmltree::TextPos"]],["impl<'a, 'b> Freeze for ExpandedName<'a, 'b>",1,["roxmltree::ExpandedName"]],["impl<'a, 'input> Freeze for Attribute<'a, 'input>",1,["roxmltree::Attribute"]],["impl<'a, 'input> Freeze for Attributes<'a, 'input>",1,["roxmltree::Attributes"]],["impl<'a, 'input> Freeze for AxisIter<'a, 'input>",1,["roxmltree::AxisIter"]],["impl<'a, 'input> Freeze for Children<'a, 'input>",1,["roxmltree::Children"]],["impl<'a, 'input> Freeze for Descendants<'a, 'input>",1,["roxmltree::Descendants"]],["impl<'a, 'input> Freeze for NamespaceIter<'a, 'input>",1,["roxmltree::NamespaceIter"]],["impl<'a, 'input> Freeze for Node<'a, 'input>",1,["roxmltree::Node"]],["impl<'input> Freeze for StringStorage<'input>",1,["roxmltree::StringStorage"]],["impl<'input> Freeze for Document<'input>",1,["roxmltree::Document"]],["impl<'input> Freeze for Namespace<'input>",1,["roxmltree::Namespace"]],["impl<'input> Freeze for PI<'input>",1,["roxmltree::PI"]]], "rustc_hash":[["impl Freeze for FxHasher",1,["rustc_hash::FxHasher"]]], diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js index 6c36b58efc..14f8cc3d49 100644 --- a/trait.impl/core/marker/trait.Send.js +++ b/trait.impl/core/marker/trait.Send.js @@ -2,6 +2,10 @@ "bitflags":[["impl Send for ParseError",1,["bitflags::parser::ParseError"]],["impl<B> Send for Iter<B>
where\n B: Sync + Send,
",1,["bitflags::iter::Iter"]],["impl<B> Send for IterNames<B>
where\n B: Sync + Send,
",1,["bitflags::iter::IterNames"]],["impl<B> Send for Flag<B>
where\n B: Send,
",1,["bitflags::traits::Flag"]]], "bytemuck":[["impl !Send for BoxBytes",1,["bytemuck::allocation::BoxBytes"]],["impl Send for CheckedCastError",1,["bytemuck::checked::CheckedCastError"]],["impl Send for PodCastError",1,["bytemuck::PodCastError"]]], "cosmic_text":[["impl Send for Action",1,["cosmic_text::edit::Action"]],["impl Send for Affinity",1,["cosmic_text::cursor::Affinity"]],["impl Send for Align",1,["cosmic_text::layout::Align"]],["impl Send for FamilyOwned",1,["cosmic_text::attrs::FamilyOwned"]],["impl Send for LineEnding",1,["cosmic_text::line_ending::LineEnding"]],["impl Send for Motion",1,["cosmic_text::cursor::Motion"]],["impl Send for Selection",1,["cosmic_text::edit::Selection"]],["impl Send for Shaping",1,["cosmic_text::shape::Shaping"]],["impl Send for SubpixelBin",1,["cosmic_text::glyph_cache::SubpixelBin"]],["impl Send for Wrap",1,["cosmic_text::layout::Wrap"]],["impl Send for AttrsList",1,["cosmic_text::attrs::AttrsList"]],["impl Send for AttrsOwned",1,["cosmic_text::attrs::AttrsOwned"]],["impl Send for Buffer",1,["cosmic_text::buffer::Buffer"]],["impl Send for BufferLine",1,["cosmic_text::buffer_line::BufferLine"]],["impl Send for CacheKey",1,["cosmic_text::glyph_cache::CacheKey"]],["impl Send for CacheKeyFlags",1,["cosmic_text::glyph_cache::CacheKeyFlags"]],["impl Send for Change",1,["cosmic_text::edit::Change"]],["impl Send for ChangeItem",1,["cosmic_text::edit::ChangeItem"]],["impl Send for Color",1,["cosmic_text::attrs::Color"]],["impl Send for Cursor",1,["cosmic_text::cursor::Cursor"]],["impl Send for Font",1,["cosmic_text::font::Font"]],["impl Send for FontMatchAttrs",1,["cosmic_text::attrs::FontMatchAttrs"]],["impl Send for FontMatchKey",1,["cosmic_text::font::system::FontMatchKey"]],["impl Send for FontSystem",1,["cosmic_text::font::system::FontSystem"]],["impl Send for LayoutCursor",1,["cosmic_text::cursor::LayoutCursor"]],["impl Send for LayoutGlyph",1,["cosmic_text::layout::LayoutGlyph"]],["impl Send for LayoutLine",1,["cosmic_text::layout::LayoutLine"]],["impl Send for Metrics",1,["cosmic_text::buffer::Metrics"]],["impl Send for PhysicalGlyph",1,["cosmic_text::layout::PhysicalGlyph"]],["impl Send for Scroll",1,["cosmic_text::cursor::Scroll"]],["impl Send for ShapeBuffer",1,["cosmic_text::shape::ShapeBuffer"]],["impl Send for ShapeGlyph",1,["cosmic_text::shape::ShapeGlyph"]],["impl Send for ShapeLine",1,["cosmic_text::shape::ShapeLine"]],["impl Send for ShapeRunCache",1,["cosmic_text::shape_run_cache::ShapeRunCache"]],["impl Send for ShapeRunKey",1,["cosmic_text::shape_run_cache::ShapeRunKey"]],["impl Send for ShapeSpan",1,["cosmic_text::shape::ShapeSpan"]],["impl Send for ShapeWord",1,["cosmic_text::shape::ShapeWord"]],["impl Send for SwashCache",1,["cosmic_text::swash::SwashCache"]],["impl<'a> Send for Attrs<'a>",1,["cosmic_text::attrs::Attrs"]],["impl<'a> Send for LayoutRun<'a>",1,["cosmic_text::buffer::LayoutRun"]],["impl<'a> Send for LineIter<'a>",1,["cosmic_text::line_ending::LineIter"]],["impl<'a, T> Send for BorrowedWithFontSystem<'a, T>
where\n T: Send,
",1,["cosmic_text::font::system::BorrowedWithFontSystem"]],["impl<'b> Send for LayoutRunIter<'b>",1,["cosmic_text::buffer::LayoutRunIter"]],["impl<'buffer> Send for BufferRef<'buffer>",1,["cosmic_text::edit::BufferRef"]],["impl<'buffer> Send for Editor<'buffer>",1,["cosmic_text::edit::editor::Editor"]],["impl<'text> Send for BidiParagraphs<'text>",1,["cosmic_text::bidi_para::BidiParagraphs"]]], +"crossbeam_deque":[["impl<T> Send for Steal<T>
where\n T: Send,
",1,["crossbeam_deque::deque::Steal"]],["impl<T: Send> Send for Injector<T>"],["impl<T: Send> Send for Stealer<T>"],["impl<T: Send> Send for Worker<T>"]], +"crossbeam_epoch":[["impl !Send for Guard",1,["crossbeam_epoch::guard::Guard"]],["impl !Send for LocalHandle",1,["crossbeam_epoch::collector::LocalHandle"]],["impl Send for Collector"],["impl<'g, T> !Send for Shared<'g, T>",1,["crossbeam_epoch::atomic::Shared"]],["impl<'g, T, P> !Send for CompareExchangeError<'g, T, P>",1,["crossbeam_epoch::atomic::CompareExchangeError"]],["impl<T: ?Sized + Pointable + Send + Sync> Send for Atomic<T>"],["impl<T: ?Sized> Send for Owned<T>
where\n T: Send,
",1,["crossbeam_epoch::atomic::Owned"]]], +"crossbeam_utils":[["impl Send for Backoff",1,["crossbeam_utils::backoff::Backoff"]],["impl Send for Parker"],["impl Send for Unparker"],["impl Send for WaitGroup",1,["crossbeam_utils::sync::wait_group::WaitGroup"]],["impl<'a, T> !Send for ShardedLockReadGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockReadGuard"]],["impl<'a, T> !Send for ShardedLockWriteGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockWriteGuard"]],["impl<'env> Send for Scope<'env>",1,["crossbeam_utils::thread::Scope"]],["impl<'scope, 'env> Send for ScopedThreadBuilder<'scope, 'env>",1,["crossbeam_utils::thread::ScopedThreadBuilder"]],["impl<T> Send for ScopedJoinHandle<'_, T>"],["impl<T: Send> Send for AtomicCell<T>"],["impl<T: Send> Send for CachePadded<T>"],["impl<T: ?Sized + Send> Send for ShardedLock<T>"]], +"either":[["impl<L, R> Send for Either<L, R>
where\n L: Send,\n R: Send,
",1,["either::Either"]],["impl<L, R> Send for IterEither<L, R>
where\n L: Send,\n R: Send,
",1,["either::iterator::IterEither"]]], "font_types":[["impl Send for InvalidTag",1,["font_types::tag::InvalidTag"]],["impl Send for PenCommand",1,["font_types::pen::PenCommand"]],["impl Send for F26Dot6",1,["font_types::fixed::F26Dot6"]],["impl Send for F2Dot14",1,["font_types::fixed::F2Dot14"]],["impl Send for FWord",1,["font_types::fword::FWord"]],["impl Send for Fixed",1,["font_types::fixed::Fixed"]],["impl Send for GlyphId",1,["font_types::glyph_id::GlyphId"]],["impl Send for LongDateTime",1,["font_types::longdatetime::LongDateTime"]],["impl Send for MajorMinor",1,["font_types::version::MajorMinor"]],["impl Send for NameId",1,["font_types::name_id::NameId"]],["impl Send for Offset16",1,["font_types::offset::Offset16"]],["impl Send for Offset24",1,["font_types::offset::Offset24"]],["impl Send for Offset32",1,["font_types::offset::Offset32"]],["impl Send for Tag",1,["font_types::tag::Tag"]],["impl Send for UfWord",1,["font_types::fword::UfWord"]],["impl Send for Uint24",1,["font_types::uint24::Uint24"]],["impl Send for Version16Dot16",1,["font_types::version::Version16Dot16"]],["impl<T> Send for BigEndian<T>
where\n <T as Scalar>::Raw: Send,
",1,["font_types::raw::BigEndian"]],["impl<T> Send for BoundingBox<T>
where\n T: Send,
",1,["font_types::bbox::BoundingBox"]],["impl<T> Send for Nullable<T>
where\n T: Send,
",1,["font_types::offset::Nullable"]],["impl<T> Send for Point<T>
where\n T: Send,
",1,["font_types::point::Point"]]], "fontconfig_parser":[["impl Send for BinaryOp",1,["fontconfig_parser::types::value::BinaryOp"]],["impl Send for ConfigPart",1,["fontconfig_parser::types::document::ConfigPart"]],["impl Send for Constant",1,["fontconfig_parser::types::constant::Constant"]],["impl Send for DirPrefix",1,["fontconfig_parser::types::dir::DirPrefix"]],["impl Send for EditBinding",1,["fontconfig_parser::types::match_::edit::EditBinding"]],["impl Send for EditMode",1,["fontconfig_parser::types::match_::edit::EditMode"]],["impl Send for Error",1,["fontconfig_parser::error::Error"]],["impl Send for Expression",1,["fontconfig_parser::types::value::Expression"]],["impl Send for FontMatch",1,["fontconfig_parser::types::selectfont::FontMatch"]],["impl Send for IntOrRange",1,["fontconfig_parser::types::IntOrRange"]],["impl Send for ListOp",1,["fontconfig_parser::types::value::ListOp"]],["impl Send for MatchTarget",1,["fontconfig_parser::types::match_::MatchTarget"]],["impl Send for PrefixBehavior",1,["fontconfig_parser::types::dir::PrefixBehavior"]],["impl Send for Property",1,["fontconfig_parser::types::property::Property"]],["impl Send for PropertyKind",1,["fontconfig_parser::types::property::PropertyKind"]],["impl Send for PropertyTarget",1,["fontconfig_parser::types::value::PropertyTarget"]],["impl Send for TernaryOp",1,["fontconfig_parser::types::value::TernaryOp"]],["impl Send for TestCompare",1,["fontconfig_parser::types::match_::test::TestCompare"]],["impl Send for TestQual",1,["fontconfig_parser::types::match_::test::TestQual"]],["impl Send for TestTarget",1,["fontconfig_parser::types::match_::test::TestTarget"]],["impl Send for UnaryOp",1,["fontconfig_parser::types::value::UnaryOp"]],["impl Send for Value",1,["fontconfig_parser::types::value::Value"]],["impl Send for Alias",1,["fontconfig_parser::types::alias::Alias"]],["impl Send for CacheDir",1,["fontconfig_parser::types::dir::CacheDir"]],["impl Send for Config",1,["fontconfig_parser::types::config::Config"]],["impl Send for Dir",1,["fontconfig_parser::types::dir::Dir"]],["impl Send for DirData",1,["fontconfig_parser::types::document::DirData"]],["impl Send for Edit",1,["fontconfig_parser::types::match_::edit::Edit"]],["impl Send for FontConfig",1,["fontconfig_parser::types::document::FontConfig"]],["impl Send for Include",1,["fontconfig_parser::types::dir::Include"]],["impl Send for Match",1,["fontconfig_parser::types::match_::Match"]],["impl Send for RemapDir",1,["fontconfig_parser::types::dir::RemapDir"]],["impl Send for RemapDirData",1,["fontconfig_parser::types::document::RemapDirData"]],["impl Send for SelectFont",1,["fontconfig_parser::types::selectfont::SelectFont"]],["impl Send for Test",1,["fontconfig_parser::types::match_::test::Test"]]], "fontdb":[["impl Send for Source",1,["fontdb::Source"]],["impl Send for Style",1,["fontdb::Style"]],["impl Send for Database",1,["fontdb::Database"]],["impl Send for FaceInfo",1,["fontdb::FaceInfo"]],["impl Send for ID",1,["fontdb::ID"]],["impl Send for Weight",1,["fontdb::Weight"]],["impl<'a> Send for Family<'a>",1,["fontdb::Family"]],["impl<'a> Send for Query<'a>",1,["fontdb::Query"]]], @@ -11,6 +15,8 @@ "memmap2":[["impl Send for Advice",1,["memmap2::advice::Advice"]],["impl Send for UncheckedAdvice",1,["memmap2::advice::UncheckedAdvice"]],["impl Send for Mmap",1,["memmap2::Mmap"]],["impl Send for MmapMut",1,["memmap2::MmapMut"]],["impl Send for MmapOptions",1,["memmap2::MmapOptions"]],["impl Send for MmapRaw",1,["memmap2::MmapRaw"]],["impl Send for MmapRawDescriptor",1,["memmap2::MmapRawDescriptor"]],["impl Send for RemapOptions",1,["memmap2::RemapOptions"]]], "proc_macro2":[["impl !Send for TokenTree",1,["proc_macro2::TokenTree"]],["impl !Send for DelimSpan",1,["proc_macro2::extra::DelimSpan"]],["impl !Send for Group",1,["proc_macro2::Group"]],["impl !Send for Ident",1,["proc_macro2::Ident"]],["impl !Send for LexError",1,["proc_macro2::LexError"]],["impl !Send for Literal",1,["proc_macro2::Literal"]],["impl !Send for Punct",1,["proc_macro2::Punct"]],["impl !Send for Span",1,["proc_macro2::Span"]],["impl !Send for TokenStream",1,["proc_macro2::TokenStream"]],["impl !Send for IntoIter",1,["proc_macro2::token_stream::IntoIter"]],["impl Send for Delimiter",1,["proc_macro2::Delimiter"]],["impl Send for Spacing",1,["proc_macro2::Spacing"]]], "rangemap":[["impl<'a, K, V> Send for Iter<'a, K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::inclusive_map::Iter"]],["impl<'a, K, V> Send for Gaps<'a, K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::map::Gaps"]],["impl<'a, K, V> Send for Iter<'a, K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::map::Iter"]],["impl<'a, K, V, R> Send for Overlapping<'a, K, V, R>
where\n K: Sync,\n R: Send,\n V: Sync,
",1,["rangemap::inclusive_map::Overlapping"]],["impl<'a, K, V, R> Send for Overlapping<'a, K, V, R>
where\n K: Sync,\n R: Send,\n V: Sync,
",1,["rangemap::map::Overlapping"]],["impl<'a, K, V, StepFnsT> Send for Gaps<'a, K, V, StepFnsT>
where\n K: Sync + Send,\n StepFnsT: Send,\n V: Sync,
",1,["rangemap::inclusive_map::Gaps"]],["impl<'a, T> Send for Iter<'a, T>
where\n T: Sync,
",1,["rangemap::inclusive_set::Iter"]],["impl<'a, T> Send for Gaps<'a, T>
where\n T: Sync,
",1,["rangemap::set::Gaps"]],["impl<'a, T> Send for Iter<'a, T>
where\n T: Sync,
",1,["rangemap::set::Iter"]],["impl<'a, T, R> Send for Overlapping<'a, T, R>
where\n R: Send,\n T: Sync,
",1,["rangemap::inclusive_set::Overlapping"]],["impl<'a, T, R> Send for Overlapping<'a, T, R>
where\n R: Send,\n T: Sync,
",1,["rangemap::set::Overlapping"]],["impl<'a, T, StepFnsT> Send for Gaps<'a, T, StepFnsT>
where\n StepFnsT: Send,\n T: Sync + Send,
",1,["rangemap::inclusive_set::Gaps"]],["impl<K, V> Send for IntoIter<K, V>
where\n K: Send,\n V: Send,
",1,["rangemap::inclusive_map::IntoIter"]],["impl<K, V> Send for IntoIter<K, V>
where\n K: Send,\n V: Send,
",1,["rangemap::map::IntoIter"]],["impl<K, V> Send for RangeMap<K, V>
where\n K: Send,\n V: Send,
",1,["rangemap::map::RangeMap"]],["impl<K, V, StepFnsT> Send for RangeInclusiveMap<K, V, StepFnsT>
where\n K: Send,\n StepFnsT: Send,\n V: Send,
",1,["rangemap::inclusive_map::RangeInclusiveMap"]],["impl<T> Send for IntoIter<T>
where\n T: Send,
",1,["rangemap::inclusive_set::IntoIter"]],["impl<T> Send for IntoIter<T>
where\n T: Send,
",1,["rangemap::set::IntoIter"]],["impl<T> Send for RangeSet<T>
where\n T: Send,
",1,["rangemap::set::RangeSet"]],["impl<T, StepFnsT> Send for RangeInclusiveSet<T, StepFnsT>
where\n StepFnsT: Send,\n T: Send,
",1,["rangemap::inclusive_set::RangeInclusiveSet"]]], +"rayon":[["impl<'a> Send for Drain<'a>",1,["rayon::string::Drain"]],["impl<'a, K, V> Send for Iter<'a, K, V>",1,["rayon::collections::btree_map::Iter"]],["impl<'a, K, V> Send for IterMut<'a, K, V>",1,["rayon::collections::btree_map::IterMut"]],["impl<'a, K, V> Send for Drain<'a, K, V>",1,["rayon::collections::hash_map::Drain"]],["impl<'a, K, V> Send for Iter<'a, K, V>",1,["rayon::collections::hash_map::Iter"]],["impl<'a, K, V> Send for IterMut<'a, K, V>",1,["rayon::collections::hash_map::IterMut"]],["impl<'a, T> Send for Drain<'a, T>",1,["rayon::collections::binary_heap::Drain"]],["impl<'a, T> Send for Iter<'a, T>",1,["rayon::collections::binary_heap::Iter"]],["impl<'a, T> Send for Iter<'a, T>",1,["rayon::collections::btree_set::Iter"]],["impl<'a, T> Send for Drain<'a, T>",1,["rayon::collections::hash_set::Drain"]],["impl<'a, T> Send for Iter<'a, T>",1,["rayon::collections::hash_set::Iter"]],["impl<'a, T> Send for Iter<'a, T>",1,["rayon::collections::linked_list::Iter"]],["impl<'a, T> Send for IterMut<'a, T>",1,["rayon::collections::linked_list::IterMut"]],["impl<'a, T> Send for Drain<'a, T>",1,["rayon::collections::vec_deque::Drain"]],["impl<'a, T> Send for Iter<'a, T>",1,["rayon::collections::vec_deque::Iter"]],["impl<'a, T> Send for IterMut<'a, T>",1,["rayon::collections::vec_deque::IterMut"]],["impl<'a, T> Send for Iter<'a, T>",1,["rayon::option::Iter"]],["impl<'a, T> Send for IterMut<'a, T>",1,["rayon::option::IterMut"]],["impl<'a, T> Send for Iter<'a, T>",1,["rayon::result::Iter"]],["impl<'a, T> Send for IterMut<'a, T>",1,["rayon::result::IterMut"]],["impl<'ch> Send for Bytes<'ch>",1,["rayon::str::Bytes"]],["impl<'ch> Send for CharIndices<'ch>",1,["rayon::str::CharIndices"]],["impl<'ch> Send for Chars<'ch>",1,["rayon::str::Chars"]],["impl<'ch> Send for EncodeUtf16<'ch>",1,["rayon::str::EncodeUtf16"]],["impl<'ch> Send for Lines<'ch>",1,["rayon::str::Lines"]],["impl<'ch> Send for SplitAsciiWhitespace<'ch>",1,["rayon::str::SplitAsciiWhitespace"]],["impl<'ch> Send for SplitWhitespace<'ch>",1,["rayon::str::SplitWhitespace"]],["impl<'ch, P> Send for MatchIndices<'ch, P>",1,["rayon::str::MatchIndices"]],["impl<'ch, P> Send for Matches<'ch, P>",1,["rayon::str::Matches"]],["impl<'ch, P> Send for Split<'ch, P>",1,["rayon::str::Split"]],["impl<'ch, P> Send for SplitInclusive<'ch, P>",1,["rayon::str::SplitInclusive"]],["impl<'ch, P> Send for SplitTerminator<'ch, P>",1,["rayon::str::SplitTerminator"]],["impl<'data, T> Send for Chunks<'data, T>",1,["rayon::slice::chunks::Chunks"]],["impl<'data, T> Send for ChunksExact<'data, T>",1,["rayon::slice::chunks::ChunksExact"]],["impl<'data, T> Send for ChunksExactMut<'data, T>",1,["rayon::slice::chunks::ChunksExactMut"]],["impl<'data, T> Send for ChunksMut<'data, T>",1,["rayon::slice::chunks::ChunksMut"]],["impl<'data, T> Send for Iter<'data, T>",1,["rayon::slice::Iter"]],["impl<'data, T> Send for IterMut<'data, T>",1,["rayon::slice::IterMut"]],["impl<'data, T> Send for RChunks<'data, T>",1,["rayon::slice::rchunks::RChunks"]],["impl<'data, T> Send for RChunksExact<'data, T>",1,["rayon::slice::rchunks::RChunksExact"]],["impl<'data, T> Send for RChunksExactMut<'data, T>",1,["rayon::slice::rchunks::RChunksExactMut"]],["impl<'data, T> Send for RChunksMut<'data, T>",1,["rayon::slice::rchunks::RChunksMut"]],["impl<'data, T> Send for Windows<'data, T>",1,["rayon::slice::Windows"]],["impl<'data, T> Send for Drain<'data, T>",1,["rayon::vec::Drain"]],["impl<'data, T, P> Send for ChunkBy<'data, T, P>
where\n P: Send,\n T: Sync,
",1,["rayon::slice::chunk_by::ChunkBy"]],["impl<'data, T, P> Send for ChunkByMut<'data, T, P>
where\n P: Send,\n T: Send,
",1,["rayon::slice::chunk_by::ChunkByMut"]],["impl<'data, T, P> Send for Split<'data, T, P>
where\n P: Send,\n T: Sync,
",1,["rayon::slice::Split"]],["impl<'data, T, P> Send for SplitInclusive<'data, T, P>
where\n P: Send,\n T: Sync,
",1,["rayon::slice::SplitInclusive"]],["impl<'data, T, P> Send for SplitInclusiveMut<'data, T, P>
where\n P: Send,\n T: Send,
",1,["rayon::slice::SplitInclusiveMut"]],["impl<'data, T, P> Send for SplitMut<'data, T, P>
where\n P: Send,\n T: Send,
",1,["rayon::slice::SplitMut"]],["impl<A, B> Send for Chain<A, B>",1,["rayon::iter::chain::Chain"]],["impl<A, B> Send for Zip<A, B>",1,["rayon::iter::zip::Zip"]],["impl<A, B> Send for ZipEq<A, B>",1,["rayon::iter::zip_eq::ZipEq"]],["impl<D, S> Send for Split<D, S>
where\n D: Send,\n S: Send,
",1,["rayon::iter::splitter::Split"]],["impl<I> Send for Chunks<I>",1,["rayon::iter::chunks::Chunks"]],["impl<I> Send for Cloned<I>",1,["rayon::iter::cloned::Cloned"]],["impl<I> Send for Copied<I>",1,["rayon::iter::copied::Copied"]],["impl<I> Send for Enumerate<I>",1,["rayon::iter::enumerate::Enumerate"]],["impl<I> Send for ExponentialBlocks<I>
where\n I: Send,
",1,["rayon::iter::blocks::ExponentialBlocks"]],["impl<I> Send for Flatten<I>",1,["rayon::iter::flatten::Flatten"]],["impl<I> Send for FlattenIter<I>",1,["rayon::iter::flatten_iter::FlattenIter"]],["impl<I> Send for Intersperse<I>",1,["rayon::iter::intersperse::Intersperse"]],["impl<I> Send for MaxLen<I>",1,["rayon::iter::len::MaxLen"]],["impl<I> Send for MinLen<I>",1,["rayon::iter::len::MinLen"]],["impl<I> Send for PanicFuse<I>",1,["rayon::iter::panic_fuse::PanicFuse"]],["impl<I> Send for Rev<I>",1,["rayon::iter::rev::Rev"]],["impl<I> Send for Skip<I>
where\n I: Send,
",1,["rayon::iter::skip::Skip"]],["impl<I> Send for SkipAny<I>",1,["rayon::iter::skip_any::SkipAny"]],["impl<I> Send for StepBy<I>",1,["rayon::iter::step_by::StepBy"]],["impl<I> Send for Take<I>
where\n I: Send,
",1,["rayon::iter::take::Take"]],["impl<I> Send for TakeAny<I>",1,["rayon::iter::take_any::TakeAny"]],["impl<I> Send for UniformBlocks<I>
where\n I: Send,
",1,["rayon::iter::blocks::UniformBlocks"]],["impl<I> Send for WhileSome<I>",1,["rayon::iter::while_some::WhileSome"]],["impl<I, F> Send for FlatMap<I, F>
where\n F: Send,
",1,["rayon::iter::flat_map::FlatMap"]],["impl<I, F> Send for FlatMapIter<I, F>
where\n F: Send,
",1,["rayon::iter::flat_map_iter::FlatMapIter"]],["impl<I, F> Send for Inspect<I, F>
where\n F: Send,
",1,["rayon::iter::inspect::Inspect"]],["impl<I, F> Send for Map<I, F>
where\n F: Send,
",1,["rayon::iter::map::Map"]],["impl<I, F> Send for Update<I, F>
where\n F: Send,
",1,["rayon::iter::update::Update"]],["impl<I, ID, F> Send for Fold<I, ID, F>
where\n F: Send,\n I: Send,\n ID: Send,
",1,["rayon::iter::fold::Fold"]],["impl<I, ID, F> Send for FoldChunks<I, ID, F>
where\n F: Send,\n ID: Send,
",1,["rayon::iter::fold_chunks::FoldChunks"]],["impl<I, INIT, F> Send for MapInit<I, INIT, F>
where\n F: Send,\n INIT: Send,
",1,["rayon::iter::map_with::MapInit"]],["impl<I, J> Send for Interleave<I, J>",1,["rayon::iter::interleave::Interleave"]],["impl<I, J> Send for InterleaveShortest<I, J>",1,["rayon::iter::interleave_shortest::InterleaveShortest"]],["impl<I, P> Send for Filter<I, P>
where\n P: Send,
",1,["rayon::iter::filter::Filter"]],["impl<I, P> Send for FilterMap<I, P>
where\n P: Send,
",1,["rayon::iter::filter_map::FilterMap"]],["impl<I, P> Send for Positions<I, P>
where\n P: Send,
",1,["rayon::iter::positions::Positions"]],["impl<I, P> Send for SkipAnyWhile<I, P>
where\n P: Send,
",1,["rayon::iter::skip_any_while::SkipAnyWhile"]],["impl<I, P> Send for TakeAnyWhile<I, P>
where\n P: Send,
",1,["rayon::iter::take_any_while::TakeAnyWhile"]],["impl<I, T, F> Send for MapWith<I, T, F>
where\n F: Send,\n T: Send,
",1,["rayon::iter::map_with::MapWith"]],["impl<I, U, F> Send for FoldChunksWith<I, U, F>
where\n F: Send,\n U: Send,
",1,["rayon::iter::fold_chunks_with::FoldChunksWith"]],["impl<I, U, F> Send for FoldWith<I, U, F>
where\n F: Send,\n I: Send,\n U: Send,
",1,["rayon::iter::fold::FoldWith"]],["impl<I, U, F> Send for TryFoldWith<I, U, F>
where\n F: Send,\n I: Send,\n <U as Try>::Output: Send,
",1,["rayon::iter::try_fold::TryFoldWith"]],["impl<I, U, ID, F> Send for TryFold<I, U, ID, F>
where\n F: Send,\n I: Send,\n ID: Send,\n U: Send,
",1,["rayon::iter::try_fold::TryFold"]],["impl<Iter> Send for IterBridge<Iter>
where\n Iter: Send,
",1,["rayon::iter::par_bridge::IterBridge"]],["impl<K, V> Send for IntoIter<K, V>",1,["rayon::collections::btree_map::IntoIter"]],["impl<K, V> Send for IntoIter<K, V>",1,["rayon::collections::hash_map::IntoIter"]],["impl<S, B> Send for WalkTree<S, B>
where\n B: Send,\n S: Send,
",1,["rayon::iter::walk_tree::WalkTree"]],["impl<S, B> Send for WalkTreePostfix<S, B>
where\n B: Send,\n S: Send,
",1,["rayon::iter::walk_tree::WalkTreePostfix"]],["impl<S, B> Send for WalkTreePrefix<S, B>
where\n B: Send,\n S: Send,
",1,["rayon::iter::walk_tree::WalkTreePrefix"]],["impl<T> Send for IntoIter<T>",1,["rayon::collections::binary_heap::IntoIter"]],["impl<T> Send for IntoIter<T>",1,["rayon::collections::btree_set::IntoIter"]],["impl<T> Send for IntoIter<T>",1,["rayon::collections::hash_set::IntoIter"]],["impl<T> Send for IntoIter<T>",1,["rayon::collections::linked_list::IntoIter"]],["impl<T> Send for IntoIter<T>",1,["rayon::collections::vec_deque::IntoIter"]],["impl<T> Send for Empty<T>",1,["rayon::iter::empty::Empty"]],["impl<T> Send for MultiZip<T>
where\n T: Send,
",1,["rayon::iter::multizip::MultiZip"]],["impl<T> Send for Once<T>",1,["rayon::iter::once::Once"]],["impl<T> Send for Repeat<T>",1,["rayon::iter::repeat::Repeat"]],["impl<T> Send for RepeatN<T>",1,["rayon::iter::repeat::RepeatN"]],["impl<T> Send for IntoIter<T>",1,["rayon::option::IntoIter"]],["impl<T> Send for Iter<T>
where\n T: Send,
",1,["rayon::range::Iter"]],["impl<T> Send for Iter<T>
where\n T: Send,
",1,["rayon::range_inclusive::Iter"]],["impl<T> Send for IntoIter<T>",1,["rayon::result::IntoIter"]],["impl<T> Send for IntoIter<T>",1,["rayon::vec::IntoIter"]],["impl<T, const N: usize> Send for IntoIter<T, N>",1,["rayon::array::IntoIter"]]], +"rayon_core":[["impl !Send for Configuration",1,["rayon_core::Configuration"]],["impl !Send for FnContext",1,["rayon_core::FnContext"]],["impl Send for Yield",1,["rayon_core::thread_pool::Yield"]],["impl Send for ThreadBuilder",1,["rayon_core::registry::ThreadBuilder"]],["impl Send for ThreadPool",1,["rayon_core::thread_pool::ThreadPool"]],["impl Send for ThreadPoolBuildError",1,["rayon_core::ThreadPoolBuildError"]],["impl<'a> !Send for BroadcastContext<'a>",1,["rayon_core::broadcast::BroadcastContext"]],["impl<'scope> Send for Scope<'scope>",1,["rayon_core::scope::Scope"]],["impl<'scope> Send for ScopeFifo<'scope>",1,["rayon_core::scope::ScopeFifo"]],["impl<S = DefaultSpawn> !Send for ThreadPoolBuilder<S>",1,["rayon_core::ThreadPoolBuilder"]]], "read_fonts":[["impl Send for ReadError",1,["read_fonts::read::ReadError"]],["impl Send for BitmapDataFormat",1,["read_fonts::tables::bitmap::BitmapDataFormat"]],["impl Send for BitmapMetrics",1,["read_fonts::tables::bitmap::BitmapMetrics"]],["impl Send for MapVariant",1,["read_fonts::tables::cmap::MapVariant"]],["impl Send for PlatformId",1,["read_fonts::tables::cmap::PlatformId"]],["impl Send for CompositeMode",1,["read_fonts::tables::colr::CompositeMode"]],["impl Send for Extend",1,["read_fonts::tables::colr::Extend"]],["impl Send for GlyphClassDef",1,["read_fonts::tables::gdef::GlyphClassDef"]],["impl Send for Opcode",1,["read_fonts::tables::glyf::bytecode::opcode::Opcode"]],["impl Send for Anchor",1,["read_fonts::tables::glyf::Anchor"]],["impl Send for ToPathError",1,["read_fonts::tables::glyf::ToPathError"]],["impl Send for ToPathStyle",1,["read_fonts::tables::glyf::ToPathStyle"]],["impl Send for DeltaFormat",1,["read_fonts::tables::layout::DeltaFormat"]],["impl Send for Encoding",1,["read_fonts::tables::name::Encoding"]],["impl Send for Entry",1,["read_fonts::tables::postscript::dict::Entry"]],["impl Send for Operator",1,["read_fonts::tables::postscript::dict::Operator"]],["impl Send for Token",1,["read_fonts::tables::postscript::dict::Token"]],["impl Send for Error",1,["read_fonts::tables::postscript::Error"]],["impl Send for Number",1,["read_fonts::tables::postscript::stack::Number"]],["impl Send for TableRecord",1,["read_fonts::TableRecord"]],["impl Send for AxisValueMap",1,["read_fonts::tables::avar::AxisValueMap"]],["impl Send for BaseLangSysRecord",1,["read_fonts::tables::base::BaseLangSysRecord"]],["impl Send for BaseScriptRecord",1,["read_fonts::tables::base::BaseScriptRecord"]],["impl Send for FeatMinMaxRecord",1,["read_fonts::tables::base::FeatMinMaxRecord"]],["impl Send for BdtComponent",1,["read_fonts::tables::bitmap::BdtComponent"]],["impl Send for BigGlyphMetrics",1,["read_fonts::tables::bitmap::BigGlyphMetrics"]],["impl Send for BitmapFlags",1,["read_fonts::tables::bitmap::BitmapFlags"]],["impl Send for BitmapLocation",1,["read_fonts::tables::bitmap::BitmapLocation"]],["impl Send for BitmapSize",1,["read_fonts::tables::bitmap::BitmapSize"]],["impl Send for GlyphIdOffsetPair",1,["read_fonts::tables::bitmap::GlyphIdOffsetPair"]],["impl Send for SbitLineMetrics",1,["read_fonts::tables::bitmap::SbitLineMetrics"]],["impl Send for SmallGlyphMetrics",1,["read_fonts::tables::bitmap::SmallGlyphMetrics"]],["impl Send for ConstantMapGroup",1,["read_fonts::tables::cmap::ConstantMapGroup"]],["impl Send for EncodingRecord",1,["read_fonts::tables::cmap::EncodingRecord"]],["impl Send for SequentialMapGroup",1,["read_fonts::tables::cmap::SequentialMapGroup"]],["impl Send for SubHeader",1,["read_fonts::tables::cmap::SubHeader"]],["impl Send for UnicodeRange",1,["read_fonts::tables::cmap::UnicodeRange"]],["impl Send for UvsMapping",1,["read_fonts::tables::cmap::UvsMapping"]],["impl Send for VariationSelector",1,["read_fonts::tables::cmap::VariationSelector"]],["impl Send for BaseGlyph",1,["read_fonts::tables::colr::BaseGlyph"]],["impl Send for BaseGlyphPaint",1,["read_fonts::tables::colr::BaseGlyphPaint"]],["impl Send for Clip",1,["read_fonts::tables::colr::Clip"]],["impl Send for ColorIndex",1,["read_fonts::tables::colr::ColorIndex"]],["impl Send for ColorStop",1,["read_fonts::tables::colr::ColorStop"]],["impl Send for Layer",1,["read_fonts::tables::colr::Layer"]],["impl Send for VarColorIndex",1,["read_fonts::tables::colr::VarColorIndex"]],["impl Send for VarColorStop",1,["read_fonts::tables::colr::VarColorStop"]],["impl Send for ColorRecord",1,["read_fonts::tables::cpal::ColorRecord"]],["impl Send for PaletteType",1,["read_fonts::tables::cpal::PaletteType"]],["impl Send for CvtDelta",1,["read_fonts::tables::cvar::CvtDelta"]],["impl Send for VariationAxisRecord",1,["read_fonts::tables::fvar::VariationAxisRecord"]],["impl Send for GaspRange",1,["read_fonts::tables::gasp::GaspRange"]],["impl Send for GaspRangeBehavior",1,["read_fonts::tables::gasp::GaspRangeBehavior"]],["impl Send for DecodeError",1,["read_fonts::tables::glyf::bytecode::decode::DecodeError"]],["impl Send for Component",1,["read_fonts::tables::glyf::Component"]],["impl Send for CompositeGlyphFlags",1,["read_fonts::tables::glyf::CompositeGlyphFlags"]],["impl Send for CurvePoint",1,["read_fonts::tables::glyf::CurvePoint"]],["impl Send for PointFlags",1,["read_fonts::tables::glyf::PointFlags"]],["impl Send for PointMarker",1,["read_fonts::tables::glyf::PointMarker"]],["impl Send for SimpleGlyphFlags",1,["read_fonts::tables::glyf::SimpleGlyphFlags"]],["impl Send for Transform",1,["read_fonts::tables::glyf::Transform"]],["impl Send for Class2Record",1,["read_fonts::tables::gpos::Class2Record"]],["impl Send for EntryExitRecord",1,["read_fonts::tables::gpos::EntryExitRecord"]],["impl Send for MarkRecord",1,["read_fonts::tables::gpos::MarkRecord"]],["impl Send for PairValueRecord",1,["read_fonts::tables::gpos::PairValueRecord"]],["impl Send for ValueFormat",1,["read_fonts::tables::gpos::ValueFormat"]],["impl Send for ValueRecord",1,["read_fonts::tables::gpos::value_record::ValueRecord"]],["impl Send for GlyphDelta",1,["read_fonts::tables::gvar::GlyphDelta"]],["impl Send for GvarFlags",1,["read_fonts::tables::gvar::GvarFlags"]],["impl Send for U16Or32",1,["read_fonts::tables::gvar::U16Or32"]],["impl Send for MacStyle",1,["read_fonts::tables::head::MacStyle"]],["impl Send for LongMetric",1,["read_fonts::tables::hmtx::LongMetric"]],["impl Send for ClassRangeRecord",1,["read_fonts::tables::layout::ClassRangeRecord"]],["impl Send for FeatureRecord",1,["read_fonts::tables::layout::FeatureRecord"]],["impl Send for FeatureTableSubstitutionRecord",1,["read_fonts::tables::layout::FeatureTableSubstitutionRecord"]],["impl Send for FeatureVariationRecord",1,["read_fonts::tables::layout::FeatureVariationRecord"]],["impl Send for LangSysRecord",1,["read_fonts::tables::layout::LangSysRecord"]],["impl Send for LookupFlag",1,["read_fonts::tables::layout::lookupflag::LookupFlag"]],["impl Send for RangeRecord",1,["read_fonts::tables::layout::RangeRecord"]],["impl Send for ScriptRecord",1,["read_fonts::tables::layout::ScriptRecord"]],["impl Send for SequenceLookupRecord",1,["read_fonts::tables::layout::SequenceLookupRecord"]],["impl Send for ValueRecord",1,["read_fonts::tables::mvar::ValueRecord"]],["impl Send for LangTagRecord",1,["read_fonts::tables::name::LangTagRecord"]],["impl Send for MacRomanMapping",1,["read_fonts::tables::name::MacRomanMapping"]],["impl Send for NameRecord",1,["read_fonts::tables::name::NameRecord"]],["impl Send for SelectionFlags",1,["read_fonts::tables::os2::SelectionFlags"]],["impl Send for Blues",1,["read_fonts::tables::postscript::dict::Blues"]],["impl Send for StemSnaps",1,["read_fonts::tables::postscript::dict::StemSnaps"]],["impl Send for FdSelectRange3",1,["read_fonts::tables::postscript::FdSelectRange3"]],["impl Send for FdSelectRange4",1,["read_fonts::tables::postscript::FdSelectRange4"]],["impl Send for Stack",1,["read_fonts::tables::postscript::stack::Stack"]],["impl Send for StringId",1,["read_fonts::tables::postscript::string::StringId"]],["impl Send for HeaderFlags",1,["read_fonts::tables::sbix::HeaderFlags"]],["impl Send for AxisRecord",1,["read_fonts::tables::stat::AxisRecord"]],["impl Send for AxisValueRecord",1,["read_fonts::tables::stat::AxisValueRecord"]],["impl Send for AxisValueTableFlags",1,["read_fonts::tables::stat::AxisValueTableFlags"]],["impl Send for DeltaSetIndex",1,["read_fonts::tables::variations::DeltaSetIndex"]],["impl Send for EntryFormat",1,["read_fonts::tables::variations::EntryFormat"]],["impl Send for FloatItemDelta",1,["read_fonts::tables::variations::FloatItemDelta"]],["impl Send for RegionAxisCoordinates",1,["read_fonts::tables::variations::RegionAxisCoordinates"]],["impl Send for TupleIndex",1,["read_fonts::tables::variations::TupleIndex"]],["impl Send for TupleVariationCount",1,["read_fonts::tables::variations::TupleVariationCount"]],["impl<'a> !Send for ExtensionSubtable<'a>",1,["read_fonts::tables::gpos::ExtensionSubtable"]],["impl<'a> !Send for PositionLookup<'a>",1,["read_fonts::tables::gpos::PositionLookup"]],["impl<'a> !Send for ExtensionSubtable<'a>",1,["read_fonts::tables::gsub::ExtensionSubtable"]],["impl<'a> !Send for SubstitutionLookup<'a>",1,["read_fonts::tables::gsub::SubstitutionLookup"]],["impl<'a> Send for FileRef<'a>",1,["read_fonts::FileRef"]],["impl<'a> Send for BaseCoord<'a>",1,["read_fonts::tables::base::BaseCoord"]],["impl<'a> Send for BitmapContent<'a>",1,["read_fonts::tables::bitmap::BitmapContent"]],["impl<'a> Send for IndexSubtable<'a>",1,["read_fonts::tables::bitmap::IndexSubtable"]],["impl<'a> Send for CmapSubtable<'a>",1,["read_fonts::tables::cmap::CmapSubtable"]],["impl<'a> Send for ClipBox<'a>",1,["read_fonts::tables::colr::ClipBox"]],["impl<'a> Send for Paint<'a>",1,["read_fonts::tables::colr::Paint"]],["impl<'a> Send for CaretValue<'a>",1,["read_fonts::tables::gdef::CaretValue"]],["impl<'a> Send for Glyph<'a>",1,["read_fonts::tables::glyf::Glyph"]],["impl<'a> Send for AnchorTable<'a>",1,["read_fonts::tables::gpos::AnchorTable"]],["impl<'a> Send for PairPos<'a>",1,["read_fonts::tables::gpos::PairPos"]],["impl<'a> Send for PositionSubtables<'a>",1,["read_fonts::tables::gpos::PositionSubtables"]],["impl<'a> Send for SinglePos<'a>",1,["read_fonts::tables::gpos::SinglePos"]],["impl<'a> Send for SingleSubst<'a>",1,["read_fonts::tables::gsub::SingleSubst"]],["impl<'a> Send for SubstitutionSubtables<'a>",1,["read_fonts::tables::gsub::SubstitutionSubtables"]],["impl<'a> Send for ChainedSequenceContext<'a>",1,["read_fonts::tables::layout::ChainedSequenceContext"]],["impl<'a> Send for ClassDef<'a>",1,["read_fonts::tables::layout::ClassDef"]],["impl<'a> Send for CoverageTable<'a>",1,["read_fonts::tables::layout::CoverageTable"]],["impl<'a> Send for DeviceOrVariationIndex<'a>",1,["read_fonts::tables::layout::DeviceOrVariationIndex"]],["impl<'a> Send for FeatureParams<'a>",1,["read_fonts::tables::layout::FeatureParams"]],["impl<'a> Send for SequenceContext<'a>",1,["read_fonts::tables::layout::SequenceContext"]],["impl<'a> Send for Loca<'a>",1,["read_fonts::tables::loca::Loca"]],["impl<'a> Send for FdSelect<'a>",1,["read_fonts::tables::postscript::FdSelect"]],["impl<'a> Send for Index<'a>",1,["read_fonts::tables::postscript::index::Index"]],["impl<'a> Send for AxisValue<'a>",1,["read_fonts::tables::stat::AxisValue"]],["impl<'a> Send for DeltaSetIndexMap<'a>",1,["read_fonts::tables::variations::DeltaSetIndexMap"]],["impl<'a> Send for CollectionRef<'a>",1,["read_fonts::CollectionRef"]],["impl<'a> Send for FontData<'a>",1,["read_fonts::font_data::FontData"]],["impl<'a> Send for FontRef<'a>",1,["read_fonts::FontRef"]],["impl<'a> Send for SegmentMaps<'a>",1,["read_fonts::tables::avar::SegmentMaps"]],["impl<'a> Send for BitmapData<'a>",1,["read_fonts::tables::bitmap::BitmapData"]],["impl<'a> Send for Cff<'a>",1,["read_fonts::tables::cff::Cff"]],["impl<'a> Send for Cff2<'a>",1,["read_fonts::tables::cff2::Cff2"]],["impl<'a> Send for Cmap12Iter<'a>",1,["read_fonts::tables::cmap::Cmap12Iter"]],["impl<'a> Send for Cmap14Iter<'a>",1,["read_fonts::tables::cmap::Cmap14Iter"]],["impl<'a> Send for Cmap4Iter<'a>",1,["read_fonts::tables::cmap::Cmap4Iter"]],["impl<'a> Send for InstanceRecord<'a>",1,["read_fonts::tables::fvar::instance_record::InstanceRecord"]],["impl<'a> Send for Decoder<'a>",1,["read_fonts::tables::glyf::bytecode::decode::Decoder"]],["impl<'a> Send for InlineOperands<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::InlineOperands"]],["impl<'a> Send for Instruction<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::Instruction"]],["impl<'a> Send for BaseRecord<'a>",1,["read_fonts::tables::gpos::BaseRecord"]],["impl<'a> Send for Class1Record<'a>",1,["read_fonts::tables::gpos::Class1Record"]],["impl<'a> Send for ComponentRecord<'a>",1,["read_fonts::tables::gpos::ComponentRecord"]],["impl<'a> Send for Mark2Record<'a>",1,["read_fonts::tables::gpos::Mark2Record"]],["impl<'a> Send for CharIter<'a>",1,["read_fonts::tables::name::CharIter"]],["impl<'a> Send for NameString<'a>",1,["read_fonts::tables::name::NameString"]],["impl<'a> Send for PString<'a>",1,["read_fonts::tables::post::PString"]],["impl<'a> Send for BlendState<'a>",1,["read_fonts::tables::postscript::blend::BlendState"]],["impl<'a> Send for Latin1String<'a>",1,["read_fonts::tables::postscript::string::Latin1String"]],["impl<'a> Send for DeltaRunIter<'a>",1,["read_fonts::tables::variations::DeltaRunIter"]],["impl<'a> Send for PackedDeltas<'a>",1,["read_fonts::tables::variations::PackedDeltas"]],["impl<'a> Send for PackedPointNumbers<'a>",1,["read_fonts::tables::variations::PackedPointNumbers"]],["impl<'a> Send for PackedPointNumbersIter<'a>",1,["read_fonts::tables::variations::PackedPointNumbersIter"]],["impl<'a> Send for Tuple<'a>",1,["read_fonts::tables::variations::Tuple"]],["impl<'a> Send for TupleVariationHeaderIter<'a>",1,["read_fonts::tables::variations::TupleVariationHeaderIter"]],["impl<'a> Send for VariationRegion<'a>",1,["read_fonts::tables::variations::VariationRegion"]],["impl<'a, P> Send for PenSink<'a, P>
where\n P: Send,
",1,["read_fonts::tables::postscript::charstring::PenSink"]],["impl<'a, T> !Send for VarLenArray<'a, T>",1,["read_fonts::array::VarLenArray"]],["impl<'a, T> Send for ComputedArray<'a, T>
where\n <T as ReadArgs>::Args: Send,
",1,["read_fonts::array::ComputedArray"]],["impl<'a, T> Send for TableRef<'a, T>
where\n T: Send,
",1,["read_fonts::table_ref::TableRef"]],["impl<'a, T> Send for TupleDeltaIter<'a, T>",1,["read_fonts::tables::variations::TupleDeltaIter"]],["impl<'a, T> Send for TupleVariation<'a, T>",1,["read_fonts::tables::variations::TupleVariation"]],["impl<'a, T> Send for TupleVariationData<'a, T>",1,["read_fonts::tables::variations::TupleVariationData"]],["impl<'a, T> Send for TupleVariationIter<'a, T>",1,["read_fonts::tables::variations::TupleVariationIter"]],["impl<'a, T, Ext> Send for Subtables<'a, T, Ext>",1,["read_fonts::tables::layout::Subtables"]],["impl<'a, T, O> Send for ArrayOfNullableOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Send,\n <O as Scalar>::Raw: Sync,
",1,["read_fonts::offset_array::ArrayOfNullableOffsets"]],["impl<'a, T, O> Send for ArrayOfOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Send,\n <O as Scalar>::Raw: Sync,
",1,["read_fonts::offset_array::ArrayOfOffsets"]]], "roxmltree":[["impl Send for Error",1,["roxmltree::parse::Error"]],["impl Send for NodeType",1,["roxmltree::NodeType"]],["impl Send for NodeId",1,["roxmltree::NodeId"]],["impl Send for ParsingOptions",1,["roxmltree::parse::ParsingOptions"]],["impl Send for TextPos",1,["roxmltree::TextPos"]],["impl<'a, 'b> Send for ExpandedName<'a, 'b>",1,["roxmltree::ExpandedName"]],["impl<'a, 'input> Send for Attribute<'a, 'input>",1,["roxmltree::Attribute"]],["impl<'a, 'input> Send for Attributes<'a, 'input>",1,["roxmltree::Attributes"]],["impl<'a, 'input> Send for AxisIter<'a, 'input>",1,["roxmltree::AxisIter"]],["impl<'a, 'input> Send for Children<'a, 'input>",1,["roxmltree::Children"]],["impl<'a, 'input> Send for Descendants<'a, 'input>",1,["roxmltree::Descendants"]],["impl<'a, 'input> Send for NamespaceIter<'a, 'input>",1,["roxmltree::NamespaceIter"]],["impl<'a, 'input> Send for Node<'a, 'input>",1,["roxmltree::Node"]],["impl<'input> Send for StringStorage<'input>",1,["roxmltree::StringStorage"]],["impl<'input> Send for Document<'input>",1,["roxmltree::Document"]],["impl<'input> Send for Namespace<'input>",1,["roxmltree::Namespace"]],["impl<'input> Send for PI<'input>",1,["roxmltree::PI"]]], "rustc_hash":[["impl Send for FxHasher",1,["rustc_hash::FxHasher"]]], diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js index 84142cc266..bfa67c735d 100644 --- a/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,6 +1,9 @@ (function() {var implementors = { "bytemuck":[["impl StructuralPartialEq for CheckedCastError"],["impl StructuralPartialEq for PodCastError"]], "cosmic_text":[["impl StructuralPartialEq for Action"],["impl StructuralPartialEq for Affinity"],["impl StructuralPartialEq for Align"],["impl StructuralPartialEq for FamilyOwned"],["impl StructuralPartialEq for LineEnding"],["impl StructuralPartialEq for Motion"],["impl StructuralPartialEq for Selection"],["impl StructuralPartialEq for Shaping"],["impl StructuralPartialEq for SubpixelBin"],["impl StructuralPartialEq for Wrap"],["impl StructuralPartialEq for AttrsList"],["impl StructuralPartialEq for AttrsOwned"],["impl StructuralPartialEq for CacheKey"],["impl StructuralPartialEq for CacheKeyFlags"],["impl StructuralPartialEq for Color"],["impl StructuralPartialEq for Cursor"],["impl StructuralPartialEq for FontMatchAttrs"],["impl StructuralPartialEq for FontMatchKey"],["impl StructuralPartialEq for LayoutCursor"],["impl StructuralPartialEq for Metrics"],["impl StructuralPartialEq for Scroll"],["impl StructuralPartialEq for ShapeRunKey"],["impl<'a> StructuralPartialEq for Attrs<'a>"]], +"crossbeam_deque":[["impl<T> StructuralPartialEq for Steal<T>"]], +"crossbeam_utils":[["impl<T> StructuralPartialEq for CachePadded<T>"]], +"either":[["impl<L, R> StructuralPartialEq for Either<L, R>"]], "font_types":[["impl StructuralPartialEq for InvalidTag"],["impl StructuralPartialEq for PenCommand"],["impl StructuralPartialEq for F26Dot6"],["impl StructuralPartialEq for F2Dot14"],["impl StructuralPartialEq for FWord"],["impl StructuralPartialEq for Fixed"],["impl StructuralPartialEq for GlyphId"],["impl StructuralPartialEq for LongDateTime"],["impl StructuralPartialEq for MajorMinor"],["impl StructuralPartialEq for NameId"],["impl StructuralPartialEq for Offset16"],["impl StructuralPartialEq for Offset24"],["impl StructuralPartialEq for Offset32"],["impl StructuralPartialEq for Tag"],["impl StructuralPartialEq for UfWord"],["impl StructuralPartialEq for Uint24"],["impl StructuralPartialEq for Version16Dot16"],["impl<T> StructuralPartialEq for BoundingBox<T>"],["impl<T> StructuralPartialEq for Nullable<T>"],["impl<T> StructuralPartialEq for Point<T>"],["impl<T: Scalar> StructuralPartialEq for BigEndian<T>"]], "fontconfig_parser":[["impl StructuralPartialEq for BinaryOp"],["impl StructuralPartialEq for ConfigPart"],["impl StructuralPartialEq for Constant"],["impl StructuralPartialEq for DirPrefix"],["impl StructuralPartialEq for EditBinding"],["impl StructuralPartialEq for EditMode"],["impl StructuralPartialEq for Expression"],["impl StructuralPartialEq for FontMatch"],["impl StructuralPartialEq for IntOrRange"],["impl StructuralPartialEq for ListOp"],["impl StructuralPartialEq for MatchTarget"],["impl StructuralPartialEq for Property"],["impl StructuralPartialEq for PropertyKind"],["impl StructuralPartialEq for PropertyTarget"],["impl StructuralPartialEq for TernaryOp"],["impl StructuralPartialEq for TestCompare"],["impl StructuralPartialEq for TestQual"],["impl StructuralPartialEq for TestTarget"],["impl StructuralPartialEq for UnaryOp"],["impl StructuralPartialEq for Value"],["impl StructuralPartialEq for Alias"],["impl StructuralPartialEq for CacheDir"],["impl StructuralPartialEq for Config"],["impl StructuralPartialEq for Dir"],["impl StructuralPartialEq for DirData"],["impl StructuralPartialEq for Edit"],["impl StructuralPartialEq for FontConfig"],["impl StructuralPartialEq for Include"],["impl StructuralPartialEq for Match"],["impl StructuralPartialEq for RemapDir"],["impl StructuralPartialEq for RemapDirData"],["impl StructuralPartialEq for SelectFont"],["impl StructuralPartialEq for Test"]], "fontdb":[["impl StructuralPartialEq for Style"],["impl StructuralPartialEq for ID"],["impl StructuralPartialEq for Weight"],["impl<'a> StructuralPartialEq for Family<'a>"],["impl<'a> StructuralPartialEq for Query<'a>"]], @@ -8,6 +11,7 @@ "memmap2":[["impl StructuralPartialEq for Advice"],["impl StructuralPartialEq for UncheckedAdvice"]], "proc_macro2":[["impl StructuralPartialEq for Delimiter"],["impl StructuralPartialEq for Spacing"]], "rangemap":[["impl<T> StructuralPartialEq for RangeSet<T>"],["impl<T, StepFnsT> StructuralPartialEq for RangeInclusiveSet<T, StepFnsT>"]], +"rayon_core":[["impl StructuralPartialEq for Yield"]], "read_fonts":[["impl StructuralPartialEq for BitmapDataFormat"],["impl StructuralPartialEq for MapVariant"],["impl StructuralPartialEq for PlatformId"],["impl StructuralPartialEq for CompositeMode"],["impl StructuralPartialEq for Extend"],["impl StructuralPartialEq for GlyphClassDef"],["impl StructuralPartialEq for Opcode"],["impl StructuralPartialEq for Anchor"],["impl StructuralPartialEq for DeltaFormat"],["impl StructuralPartialEq for Encoding"],["impl StructuralPartialEq for Entry"],["impl StructuralPartialEq for Operator"],["impl StructuralPartialEq for Token"],["impl StructuralPartialEq for Number"],["impl StructuralPartialEq for TableRecord"],["impl StructuralPartialEq for AxisValueMap"],["impl StructuralPartialEq for BdtComponent"],["impl StructuralPartialEq for BigGlyphMetrics"],["impl StructuralPartialEq for BitmapFlags"],["impl StructuralPartialEq for BitmapSize"],["impl StructuralPartialEq for GlyphIdOffsetPair"],["impl StructuralPartialEq for SbitLineMetrics"],["impl StructuralPartialEq for SmallGlyphMetrics"],["impl StructuralPartialEq for ConstantMapGroup"],["impl StructuralPartialEq for SequentialMapGroup"],["impl StructuralPartialEq for SubHeader"],["impl StructuralPartialEq for UnicodeRange"],["impl StructuralPartialEq for UvsMapping"],["impl StructuralPartialEq for BaseGlyph"],["impl StructuralPartialEq for ColorIndex"],["impl StructuralPartialEq for ColorStop"],["impl StructuralPartialEq for Layer"],["impl StructuralPartialEq for VarColorIndex"],["impl StructuralPartialEq for VarColorStop"],["impl StructuralPartialEq for ColorRecord"],["impl StructuralPartialEq for PaletteType"],["impl StructuralPartialEq for CvtDelta"],["impl StructuralPartialEq for VariationAxisRecord"],["impl StructuralPartialEq for GaspRange"],["impl StructuralPartialEq for GaspRangeBehavior"],["impl StructuralPartialEq for Component"],["impl StructuralPartialEq for CompositeGlyphFlags"],["impl StructuralPartialEq for CurvePoint"],["impl StructuralPartialEq for PointFlags"],["impl StructuralPartialEq for PointMarker"],["impl StructuralPartialEq for SimpleGlyphFlags"],["impl StructuralPartialEq for Transform"],["impl StructuralPartialEq for ValueFormat"],["impl StructuralPartialEq for GlyphDelta"],["impl StructuralPartialEq for GvarFlags"],["impl StructuralPartialEq for MacStyle"],["impl StructuralPartialEq for LongMetric"],["impl StructuralPartialEq for ClassRangeRecord"],["impl StructuralPartialEq for LookupFlag"],["impl StructuralPartialEq for RangeRecord"],["impl StructuralPartialEq for SequenceLookupRecord"],["impl StructuralPartialEq for ValueRecord"],["impl StructuralPartialEq for SelectionFlags"],["impl StructuralPartialEq for Blues"],["impl StructuralPartialEq for StemSnaps"],["impl StructuralPartialEq for FdSelectRange3"],["impl StructuralPartialEq for FdSelectRange4"],["impl StructuralPartialEq for StringId"],["impl StructuralPartialEq for HeaderFlags"],["impl StructuralPartialEq for AxisRecord"],["impl StructuralPartialEq for AxisValueRecord"],["impl StructuralPartialEq for AxisValueTableFlags"],["impl StructuralPartialEq for DeltaSetIndex"],["impl StructuralPartialEq for EntryFormat"],["impl StructuralPartialEq for RegionAxisCoordinates"],["impl StructuralPartialEq for TupleIndex"],["impl StructuralPartialEq for TupleVariationCount"],["impl<'a> StructuralPartialEq for SegmentMaps<'a>"],["impl<'a> StructuralPartialEq for NameString<'a>"],["impl<'a> StructuralPartialEq for PString<'a>"],["impl<'a> StructuralPartialEq for Latin1String<'a>"],["impl<'a> StructuralPartialEq for Tuple<'a>"],["impl<'a> StructuralPartialEq for VariationRegion<'a>"]], "roxmltree":[["impl StructuralPartialEq for Error"],["impl StructuralPartialEq for NodeType"],["impl StructuralPartialEq for NodeId"],["impl StructuralPartialEq for ParsingOptions"],["impl StructuralPartialEq for TextPos"],["impl<'a, 'b> StructuralPartialEq for ExpandedName<'a, 'b>"],["impl<'input> StructuralPartialEq for Namespace<'input>"],["impl<'input> StructuralPartialEq for PI<'input>"]], "rustybuzz":[["impl StructuralPartialEq for BufferClusterLevel"],["impl StructuralPartialEq for Direction"],["impl StructuralPartialEq for Feature"],["impl StructuralPartialEq for Language"],["impl StructuralPartialEq for Script"],["impl StructuralPartialEq for Variation"]], diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js index 7907857da7..ed0fe676e9 100644 --- a/trait.impl/core/marker/trait.Sync.js +++ b/trait.impl/core/marker/trait.Sync.js @@ -2,6 +2,10 @@ "bitflags":[["impl Sync for ParseError",1,["bitflags::parser::ParseError"]],["impl<B> Sync for Iter<B>
where\n B: Sync,
",1,["bitflags::iter::Iter"]],["impl<B> Sync for IterNames<B>
where\n B: Sync,
",1,["bitflags::iter::IterNames"]],["impl<B> Sync for Flag<B>
where\n B: Sync,
",1,["bitflags::traits::Flag"]]], "bytemuck":[["impl !Sync for BoxBytes",1,["bytemuck::allocation::BoxBytes"]],["impl Sync for CheckedCastError",1,["bytemuck::checked::CheckedCastError"]],["impl Sync for PodCastError",1,["bytemuck::PodCastError"]]], "cosmic_text":[["impl Sync for Action",1,["cosmic_text::edit::Action"]],["impl Sync for Affinity",1,["cosmic_text::cursor::Affinity"]],["impl Sync for Align",1,["cosmic_text::layout::Align"]],["impl Sync for FamilyOwned",1,["cosmic_text::attrs::FamilyOwned"]],["impl Sync for LineEnding",1,["cosmic_text::line_ending::LineEnding"]],["impl Sync for Motion",1,["cosmic_text::cursor::Motion"]],["impl Sync for Selection",1,["cosmic_text::edit::Selection"]],["impl Sync for Shaping",1,["cosmic_text::shape::Shaping"]],["impl Sync for SubpixelBin",1,["cosmic_text::glyph_cache::SubpixelBin"]],["impl Sync for Wrap",1,["cosmic_text::layout::Wrap"]],["impl Sync for AttrsList",1,["cosmic_text::attrs::AttrsList"]],["impl Sync for AttrsOwned",1,["cosmic_text::attrs::AttrsOwned"]],["impl Sync for Buffer",1,["cosmic_text::buffer::Buffer"]],["impl Sync for BufferLine",1,["cosmic_text::buffer_line::BufferLine"]],["impl Sync for CacheKey",1,["cosmic_text::glyph_cache::CacheKey"]],["impl Sync for CacheKeyFlags",1,["cosmic_text::glyph_cache::CacheKeyFlags"]],["impl Sync for Change",1,["cosmic_text::edit::Change"]],["impl Sync for ChangeItem",1,["cosmic_text::edit::ChangeItem"]],["impl Sync for Color",1,["cosmic_text::attrs::Color"]],["impl Sync for Cursor",1,["cosmic_text::cursor::Cursor"]],["impl Sync for Font",1,["cosmic_text::font::Font"]],["impl Sync for FontMatchAttrs",1,["cosmic_text::attrs::FontMatchAttrs"]],["impl Sync for FontMatchKey",1,["cosmic_text::font::system::FontMatchKey"]],["impl Sync for FontSystem",1,["cosmic_text::font::system::FontSystem"]],["impl Sync for LayoutCursor",1,["cosmic_text::cursor::LayoutCursor"]],["impl Sync for LayoutGlyph",1,["cosmic_text::layout::LayoutGlyph"]],["impl Sync for LayoutLine",1,["cosmic_text::layout::LayoutLine"]],["impl Sync for Metrics",1,["cosmic_text::buffer::Metrics"]],["impl Sync for PhysicalGlyph",1,["cosmic_text::layout::PhysicalGlyph"]],["impl Sync for Scroll",1,["cosmic_text::cursor::Scroll"]],["impl Sync for ShapeBuffer",1,["cosmic_text::shape::ShapeBuffer"]],["impl Sync for ShapeGlyph",1,["cosmic_text::shape::ShapeGlyph"]],["impl Sync for ShapeLine",1,["cosmic_text::shape::ShapeLine"]],["impl Sync for ShapeRunCache",1,["cosmic_text::shape_run_cache::ShapeRunCache"]],["impl Sync for ShapeRunKey",1,["cosmic_text::shape_run_cache::ShapeRunKey"]],["impl Sync for ShapeSpan",1,["cosmic_text::shape::ShapeSpan"]],["impl Sync for ShapeWord",1,["cosmic_text::shape::ShapeWord"]],["impl Sync for SwashCache",1,["cosmic_text::swash::SwashCache"]],["impl<'a> Sync for Attrs<'a>",1,["cosmic_text::attrs::Attrs"]],["impl<'a> Sync for LayoutRun<'a>",1,["cosmic_text::buffer::LayoutRun"]],["impl<'a> Sync for LineIter<'a>",1,["cosmic_text::line_ending::LineIter"]],["impl<'a, T> Sync for BorrowedWithFontSystem<'a, T>
where\n T: Sync,
",1,["cosmic_text::font::system::BorrowedWithFontSystem"]],["impl<'b> Sync for LayoutRunIter<'b>",1,["cosmic_text::buffer::LayoutRunIter"]],["impl<'buffer> Sync for BufferRef<'buffer>",1,["cosmic_text::edit::BufferRef"]],["impl<'buffer> Sync for Editor<'buffer>",1,["cosmic_text::edit::editor::Editor"]],["impl<'text> Sync for BidiParagraphs<'text>",1,["cosmic_text::bidi_para::BidiParagraphs"]]], +"crossbeam_deque":[["impl<T> !Sync for Worker<T>",1,["crossbeam_deque::deque::Worker"]],["impl<T> Sync for Steal<T>
where\n T: Sync,
",1,["crossbeam_deque::deque::Steal"]],["impl<T: Send> Sync for Injector<T>"],["impl<T: Send> Sync for Stealer<T>"]], +"crossbeam_epoch":[["impl !Sync for Guard",1,["crossbeam_epoch::guard::Guard"]],["impl !Sync for LocalHandle",1,["crossbeam_epoch::collector::LocalHandle"]],["impl Sync for Collector"],["impl<'g, T> !Sync for Shared<'g, T>",1,["crossbeam_epoch::atomic::Shared"]],["impl<'g, T, P> !Sync for CompareExchangeError<'g, T, P>",1,["crossbeam_epoch::atomic::CompareExchangeError"]],["impl<T: ?Sized + Pointable + Send + Sync> Sync for Atomic<T>"],["impl<T: ?Sized> Sync for Owned<T>
where\n T: Sync,
",1,["crossbeam_epoch::atomic::Owned"]]], +"crossbeam_utils":[["impl !Sync for Backoff",1,["crossbeam_utils::backoff::Backoff"]],["impl !Sync for Parker",1,["crossbeam_utils::sync::parker::Parker"]],["impl Sync for Unparker"],["impl Sync for WaitGroup",1,["crossbeam_utils::sync::wait_group::WaitGroup"]],["impl Sync for Scope<'_>"],["impl<'scope, 'env> Sync for ScopedThreadBuilder<'scope, 'env>",1,["crossbeam_utils::thread::ScopedThreadBuilder"]],["impl<T> Sync for ScopedJoinHandle<'_, T>"],["impl<T: Send> Sync for AtomicCell<T>"],["impl<T: Sync> Sync for CachePadded<T>"],["impl<T: ?Sized + Send + Sync> Sync for ShardedLock<T>"],["impl<T: ?Sized + Sync> Sync for ShardedLockReadGuard<'_, T>"],["impl<T: ?Sized + Sync> Sync for ShardedLockWriteGuard<'_, T>"]], +"either":[["impl<L, R> Sync for Either<L, R>
where\n L: Sync,\n R: Sync,
",1,["either::Either"]],["impl<L, R> Sync for IterEither<L, R>
where\n L: Sync,\n R: Sync,
",1,["either::iterator::IterEither"]]], "font_types":[["impl Sync for InvalidTag",1,["font_types::tag::InvalidTag"]],["impl Sync for PenCommand",1,["font_types::pen::PenCommand"]],["impl Sync for F26Dot6",1,["font_types::fixed::F26Dot6"]],["impl Sync for F2Dot14",1,["font_types::fixed::F2Dot14"]],["impl Sync for FWord",1,["font_types::fword::FWord"]],["impl Sync for Fixed",1,["font_types::fixed::Fixed"]],["impl Sync for GlyphId",1,["font_types::glyph_id::GlyphId"]],["impl Sync for LongDateTime",1,["font_types::longdatetime::LongDateTime"]],["impl Sync for MajorMinor",1,["font_types::version::MajorMinor"]],["impl Sync for NameId",1,["font_types::name_id::NameId"]],["impl Sync for Offset16",1,["font_types::offset::Offset16"]],["impl Sync for Offset24",1,["font_types::offset::Offset24"]],["impl Sync for Offset32",1,["font_types::offset::Offset32"]],["impl Sync for Tag",1,["font_types::tag::Tag"]],["impl Sync for UfWord",1,["font_types::fword::UfWord"]],["impl Sync for Uint24",1,["font_types::uint24::Uint24"]],["impl Sync for Version16Dot16",1,["font_types::version::Version16Dot16"]],["impl<T> Sync for BigEndian<T>
where\n <T as Scalar>::Raw: Sync,
",1,["font_types::raw::BigEndian"]],["impl<T> Sync for BoundingBox<T>
where\n T: Sync,
",1,["font_types::bbox::BoundingBox"]],["impl<T> Sync for Nullable<T>
where\n T: Sync,
",1,["font_types::offset::Nullable"]],["impl<T> Sync for Point<T>
where\n T: Sync,
",1,["font_types::point::Point"]]], "fontconfig_parser":[["impl Sync for BinaryOp",1,["fontconfig_parser::types::value::BinaryOp"]],["impl Sync for ConfigPart",1,["fontconfig_parser::types::document::ConfigPart"]],["impl Sync for Constant",1,["fontconfig_parser::types::constant::Constant"]],["impl Sync for DirPrefix",1,["fontconfig_parser::types::dir::DirPrefix"]],["impl Sync for EditBinding",1,["fontconfig_parser::types::match_::edit::EditBinding"]],["impl Sync for EditMode",1,["fontconfig_parser::types::match_::edit::EditMode"]],["impl Sync for Error",1,["fontconfig_parser::error::Error"]],["impl Sync for Expression",1,["fontconfig_parser::types::value::Expression"]],["impl Sync for FontMatch",1,["fontconfig_parser::types::selectfont::FontMatch"]],["impl Sync for IntOrRange",1,["fontconfig_parser::types::IntOrRange"]],["impl Sync for ListOp",1,["fontconfig_parser::types::value::ListOp"]],["impl Sync for MatchTarget",1,["fontconfig_parser::types::match_::MatchTarget"]],["impl Sync for PrefixBehavior",1,["fontconfig_parser::types::dir::PrefixBehavior"]],["impl Sync for Property",1,["fontconfig_parser::types::property::Property"]],["impl Sync for PropertyKind",1,["fontconfig_parser::types::property::PropertyKind"]],["impl Sync for PropertyTarget",1,["fontconfig_parser::types::value::PropertyTarget"]],["impl Sync for TernaryOp",1,["fontconfig_parser::types::value::TernaryOp"]],["impl Sync for TestCompare",1,["fontconfig_parser::types::match_::test::TestCompare"]],["impl Sync for TestQual",1,["fontconfig_parser::types::match_::test::TestQual"]],["impl Sync for TestTarget",1,["fontconfig_parser::types::match_::test::TestTarget"]],["impl Sync for UnaryOp",1,["fontconfig_parser::types::value::UnaryOp"]],["impl Sync for Value",1,["fontconfig_parser::types::value::Value"]],["impl Sync for Alias",1,["fontconfig_parser::types::alias::Alias"]],["impl Sync for CacheDir",1,["fontconfig_parser::types::dir::CacheDir"]],["impl Sync for Config",1,["fontconfig_parser::types::config::Config"]],["impl Sync for Dir",1,["fontconfig_parser::types::dir::Dir"]],["impl Sync for DirData",1,["fontconfig_parser::types::document::DirData"]],["impl Sync for Edit",1,["fontconfig_parser::types::match_::edit::Edit"]],["impl Sync for FontConfig",1,["fontconfig_parser::types::document::FontConfig"]],["impl Sync for Include",1,["fontconfig_parser::types::dir::Include"]],["impl Sync for Match",1,["fontconfig_parser::types::match_::Match"]],["impl Sync for RemapDir",1,["fontconfig_parser::types::dir::RemapDir"]],["impl Sync for RemapDirData",1,["fontconfig_parser::types::document::RemapDirData"]],["impl Sync for SelectFont",1,["fontconfig_parser::types::selectfont::SelectFont"]],["impl Sync for Test",1,["fontconfig_parser::types::match_::test::Test"]]], "fontdb":[["impl Sync for Source",1,["fontdb::Source"]],["impl Sync for Style",1,["fontdb::Style"]],["impl Sync for Database",1,["fontdb::Database"]],["impl Sync for FaceInfo",1,["fontdb::FaceInfo"]],["impl Sync for ID",1,["fontdb::ID"]],["impl Sync for Weight",1,["fontdb::Weight"]],["impl<'a> Sync for Family<'a>",1,["fontdb::Family"]],["impl<'a> Sync for Query<'a>",1,["fontdb::Query"]]], @@ -11,6 +15,8 @@ "memmap2":[["impl Sync for Advice",1,["memmap2::advice::Advice"]],["impl Sync for UncheckedAdvice",1,["memmap2::advice::UncheckedAdvice"]],["impl Sync for Mmap",1,["memmap2::Mmap"]],["impl Sync for MmapMut",1,["memmap2::MmapMut"]],["impl Sync for MmapOptions",1,["memmap2::MmapOptions"]],["impl Sync for MmapRaw",1,["memmap2::MmapRaw"]],["impl Sync for MmapRawDescriptor",1,["memmap2::MmapRawDescriptor"]],["impl Sync for RemapOptions",1,["memmap2::RemapOptions"]]], "proc_macro2":[["impl !Sync for TokenTree",1,["proc_macro2::TokenTree"]],["impl !Sync for DelimSpan",1,["proc_macro2::extra::DelimSpan"]],["impl !Sync for Group",1,["proc_macro2::Group"]],["impl !Sync for Ident",1,["proc_macro2::Ident"]],["impl !Sync for LexError",1,["proc_macro2::LexError"]],["impl !Sync for Literal",1,["proc_macro2::Literal"]],["impl !Sync for Punct",1,["proc_macro2::Punct"]],["impl !Sync for Span",1,["proc_macro2::Span"]],["impl !Sync for TokenStream",1,["proc_macro2::TokenStream"]],["impl !Sync for IntoIter",1,["proc_macro2::token_stream::IntoIter"]],["impl Sync for Delimiter",1,["proc_macro2::Delimiter"]],["impl Sync for Spacing",1,["proc_macro2::Spacing"]]], "rangemap":[["impl<'a, K, V> Sync for Iter<'a, K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::inclusive_map::Iter"]],["impl<'a, K, V> Sync for Gaps<'a, K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::map::Gaps"]],["impl<'a, K, V> Sync for Iter<'a, K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::map::Iter"]],["impl<'a, K, V, R> Sync for Overlapping<'a, K, V, R>
where\n K: Sync,\n R: Sync,\n V: Sync,
",1,["rangemap::inclusive_map::Overlapping"]],["impl<'a, K, V, R> Sync for Overlapping<'a, K, V, R>
where\n K: Sync,\n R: Sync,\n V: Sync,
",1,["rangemap::map::Overlapping"]],["impl<'a, K, V, StepFnsT> Sync for Gaps<'a, K, V, StepFnsT>
where\n K: Sync,\n StepFnsT: Sync,\n V: Sync,
",1,["rangemap::inclusive_map::Gaps"]],["impl<'a, T> Sync for Iter<'a, T>
where\n T: Sync,
",1,["rangemap::inclusive_set::Iter"]],["impl<'a, T> Sync for Gaps<'a, T>
where\n T: Sync,
",1,["rangemap::set::Gaps"]],["impl<'a, T> Sync for Iter<'a, T>
where\n T: Sync,
",1,["rangemap::set::Iter"]],["impl<'a, T, R> Sync for Overlapping<'a, T, R>
where\n R: Sync,\n T: Sync,
",1,["rangemap::inclusive_set::Overlapping"]],["impl<'a, T, R> Sync for Overlapping<'a, T, R>
where\n R: Sync,\n T: Sync,
",1,["rangemap::set::Overlapping"]],["impl<'a, T, StepFnsT> Sync for Gaps<'a, T, StepFnsT>
where\n StepFnsT: Sync,\n T: Sync,
",1,["rangemap::inclusive_set::Gaps"]],["impl<K, V> Sync for IntoIter<K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::inclusive_map::IntoIter"]],["impl<K, V> Sync for IntoIter<K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::map::IntoIter"]],["impl<K, V> Sync for RangeMap<K, V>
where\n K: Sync,\n V: Sync,
",1,["rangemap::map::RangeMap"]],["impl<K, V, StepFnsT> Sync for RangeInclusiveMap<K, V, StepFnsT>
where\n K: Sync,\n StepFnsT: Sync,\n V: Sync,
",1,["rangemap::inclusive_map::RangeInclusiveMap"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rangemap::inclusive_set::IntoIter"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rangemap::set::IntoIter"]],["impl<T> Sync for RangeSet<T>
where\n T: Sync,
",1,["rangemap::set::RangeSet"]],["impl<T, StepFnsT> Sync for RangeInclusiveSet<T, StepFnsT>
where\n StepFnsT: Sync,\n T: Sync,
",1,["rangemap::inclusive_set::RangeInclusiveSet"]]], +"rayon":[["impl<'a> Sync for Drain<'a>",1,["rayon::string::Drain"]],["impl<'a, K, V> Sync for Iter<'a, K, V>",1,["rayon::collections::btree_map::Iter"]],["impl<'a, K, V> Sync for IterMut<'a, K, V>
where\n V: Sync,
",1,["rayon::collections::btree_map::IterMut"]],["impl<'a, K, V> Sync for Drain<'a, K, V>
where\n K: Sync,\n V: Sync,
",1,["rayon::collections::hash_map::Drain"]],["impl<'a, K, V> Sync for Iter<'a, K, V>",1,["rayon::collections::hash_map::Iter"]],["impl<'a, K, V> Sync for IterMut<'a, K, V>
where\n V: Sync,
",1,["rayon::collections::hash_map::IterMut"]],["impl<'a, T> Sync for Drain<'a, T>
where\n T: Sync,
",1,["rayon::collections::binary_heap::Drain"]],["impl<'a, T> Sync for Iter<'a, T>",1,["rayon::collections::binary_heap::Iter"]],["impl<'a, T> Sync for Iter<'a, T>",1,["rayon::collections::btree_set::Iter"]],["impl<'a, T> Sync for Drain<'a, T>
where\n T: Sync,
",1,["rayon::collections::hash_set::Drain"]],["impl<'a, T> Sync for Iter<'a, T>",1,["rayon::collections::hash_set::Iter"]],["impl<'a, T> Sync for Iter<'a, T>",1,["rayon::collections::linked_list::Iter"]],["impl<'a, T> Sync for IterMut<'a, T>
where\n T: Sync,
",1,["rayon::collections::linked_list::IterMut"]],["impl<'a, T> Sync for Drain<'a, T>
where\n T: Sync,
",1,["rayon::collections::vec_deque::Drain"]],["impl<'a, T> Sync for Iter<'a, T>",1,["rayon::collections::vec_deque::Iter"]],["impl<'a, T> Sync for IterMut<'a, T>
where\n T: Sync,
",1,["rayon::collections::vec_deque::IterMut"]],["impl<'a, T> Sync for Iter<'a, T>",1,["rayon::option::Iter"]],["impl<'a, T> Sync for IterMut<'a, T>
where\n T: Sync,
",1,["rayon::option::IterMut"]],["impl<'a, T> Sync for Iter<'a, T>",1,["rayon::result::Iter"]],["impl<'a, T> Sync for IterMut<'a, T>
where\n T: Sync,
",1,["rayon::result::IterMut"]],["impl<'ch> Sync for Bytes<'ch>",1,["rayon::str::Bytes"]],["impl<'ch> Sync for CharIndices<'ch>",1,["rayon::str::CharIndices"]],["impl<'ch> Sync for Chars<'ch>",1,["rayon::str::Chars"]],["impl<'ch> Sync for EncodeUtf16<'ch>",1,["rayon::str::EncodeUtf16"]],["impl<'ch> Sync for Lines<'ch>",1,["rayon::str::Lines"]],["impl<'ch> Sync for SplitAsciiWhitespace<'ch>",1,["rayon::str::SplitAsciiWhitespace"]],["impl<'ch> Sync for SplitWhitespace<'ch>",1,["rayon::str::SplitWhitespace"]],["impl<'ch, P> Sync for MatchIndices<'ch, P>",1,["rayon::str::MatchIndices"]],["impl<'ch, P> Sync for Matches<'ch, P>",1,["rayon::str::Matches"]],["impl<'ch, P> Sync for Split<'ch, P>",1,["rayon::str::Split"]],["impl<'ch, P> Sync for SplitInclusive<'ch, P>",1,["rayon::str::SplitInclusive"]],["impl<'ch, P> Sync for SplitTerminator<'ch, P>",1,["rayon::str::SplitTerminator"]],["impl<'data, T> Sync for Chunks<'data, T>",1,["rayon::slice::chunks::Chunks"]],["impl<'data, T> Sync for ChunksExact<'data, T>",1,["rayon::slice::chunks::ChunksExact"]],["impl<'data, T> Sync for ChunksExactMut<'data, T>
where\n T: Sync,
",1,["rayon::slice::chunks::ChunksExactMut"]],["impl<'data, T> Sync for ChunksMut<'data, T>
where\n T: Sync,
",1,["rayon::slice::chunks::ChunksMut"]],["impl<'data, T> Sync for Iter<'data, T>",1,["rayon::slice::Iter"]],["impl<'data, T> Sync for IterMut<'data, T>
where\n T: Sync,
",1,["rayon::slice::IterMut"]],["impl<'data, T> Sync for RChunks<'data, T>",1,["rayon::slice::rchunks::RChunks"]],["impl<'data, T> Sync for RChunksExact<'data, T>",1,["rayon::slice::rchunks::RChunksExact"]],["impl<'data, T> Sync for RChunksExactMut<'data, T>
where\n T: Sync,
",1,["rayon::slice::rchunks::RChunksExactMut"]],["impl<'data, T> Sync for RChunksMut<'data, T>
where\n T: Sync,
",1,["rayon::slice::rchunks::RChunksMut"]],["impl<'data, T> Sync for Windows<'data, T>",1,["rayon::slice::Windows"]],["impl<'data, T> Sync for Drain<'data, T>
where\n T: Sync,
",1,["rayon::vec::Drain"]],["impl<'data, T, P> Sync for ChunkBy<'data, T, P>
where\n P: Sync,\n T: Sync,
",1,["rayon::slice::chunk_by::ChunkBy"]],["impl<'data, T, P> Sync for ChunkByMut<'data, T, P>
where\n P: Sync,\n T: Sync,
",1,["rayon::slice::chunk_by::ChunkByMut"]],["impl<'data, T, P> Sync for Split<'data, T, P>
where\n P: Sync,\n T: Sync,
",1,["rayon::slice::Split"]],["impl<'data, T, P> Sync for SplitInclusive<'data, T, P>
where\n P: Sync,\n T: Sync,
",1,["rayon::slice::SplitInclusive"]],["impl<'data, T, P> Sync for SplitInclusiveMut<'data, T, P>
where\n P: Sync,\n T: Sync,
",1,["rayon::slice::SplitInclusiveMut"]],["impl<'data, T, P> Sync for SplitMut<'data, T, P>
where\n P: Sync,\n T: Sync,
",1,["rayon::slice::SplitMut"]],["impl<A, B> Sync for Chain<A, B>
where\n A: Sync,\n B: Sync,
",1,["rayon::iter::chain::Chain"]],["impl<A, B> Sync for Zip<A, B>
where\n A: Sync,\n B: Sync,
",1,["rayon::iter::zip::Zip"]],["impl<A, B> Sync for ZipEq<A, B>
where\n A: Sync,\n B: Sync,
",1,["rayon::iter::zip_eq::ZipEq"]],["impl<D, S> Sync for Split<D, S>
where\n D: Sync,\n S: Sync,
",1,["rayon::iter::splitter::Split"]],["impl<I> Sync for Chunks<I>
where\n I: Sync,
",1,["rayon::iter::chunks::Chunks"]],["impl<I> Sync for Cloned<I>
where\n I: Sync,
",1,["rayon::iter::cloned::Cloned"]],["impl<I> Sync for Copied<I>
where\n I: Sync,
",1,["rayon::iter::copied::Copied"]],["impl<I> Sync for Enumerate<I>
where\n I: Sync,
",1,["rayon::iter::enumerate::Enumerate"]],["impl<I> Sync for ExponentialBlocks<I>
where\n I: Sync,
",1,["rayon::iter::blocks::ExponentialBlocks"]],["impl<I> Sync for Flatten<I>
where\n I: Sync,
",1,["rayon::iter::flatten::Flatten"]],["impl<I> Sync for FlattenIter<I>
where\n I: Sync,
",1,["rayon::iter::flatten_iter::FlattenIter"]],["impl<I> Sync for Intersperse<I>
where\n I: Sync,\n <I as ParallelIterator>::Item: Sync,
",1,["rayon::iter::intersperse::Intersperse"]],["impl<I> Sync for MaxLen<I>
where\n I: Sync,
",1,["rayon::iter::len::MaxLen"]],["impl<I> Sync for MinLen<I>
where\n I: Sync,
",1,["rayon::iter::len::MinLen"]],["impl<I> Sync for PanicFuse<I>
where\n I: Sync,
",1,["rayon::iter::panic_fuse::PanicFuse"]],["impl<I> Sync for Rev<I>
where\n I: Sync,
",1,["rayon::iter::rev::Rev"]],["impl<I> Sync for Skip<I>
where\n I: Sync,
",1,["rayon::iter::skip::Skip"]],["impl<I> Sync for SkipAny<I>
where\n I: Sync,
",1,["rayon::iter::skip_any::SkipAny"]],["impl<I> Sync for StepBy<I>
where\n I: Sync,
",1,["rayon::iter::step_by::StepBy"]],["impl<I> Sync for Take<I>
where\n I: Sync,
",1,["rayon::iter::take::Take"]],["impl<I> Sync for TakeAny<I>
where\n I: Sync,
",1,["rayon::iter::take_any::TakeAny"]],["impl<I> Sync for UniformBlocks<I>
where\n I: Sync,
",1,["rayon::iter::blocks::UniformBlocks"]],["impl<I> Sync for WhileSome<I>
where\n I: Sync,
",1,["rayon::iter::while_some::WhileSome"]],["impl<I, F> Sync for FlatMap<I, F>
where\n F: Sync,\n I: Sync,
",1,["rayon::iter::flat_map::FlatMap"]],["impl<I, F> Sync for FlatMapIter<I, F>
where\n F: Sync,\n I: Sync,
",1,["rayon::iter::flat_map_iter::FlatMapIter"]],["impl<I, F> Sync for Inspect<I, F>
where\n F: Sync,\n I: Sync,
",1,["rayon::iter::inspect::Inspect"]],["impl<I, F> Sync for Map<I, F>
where\n F: Sync,\n I: Sync,
",1,["rayon::iter::map::Map"]],["impl<I, F> Sync for Update<I, F>
where\n F: Sync,\n I: Sync,
",1,["rayon::iter::update::Update"]],["impl<I, ID, F> Sync for Fold<I, ID, F>
where\n F: Sync,\n I: Sync,\n ID: Sync,
",1,["rayon::iter::fold::Fold"]],["impl<I, ID, F> Sync for FoldChunks<I, ID, F>
where\n F: Sync,\n I: Sync,\n ID: Sync,
",1,["rayon::iter::fold_chunks::FoldChunks"]],["impl<I, INIT, F> Sync for MapInit<I, INIT, F>
where\n F: Sync,\n I: Sync,\n INIT: Sync,
",1,["rayon::iter::map_with::MapInit"]],["impl<I, J> Sync for Interleave<I, J>
where\n I: Sync,\n J: Sync,
",1,["rayon::iter::interleave::Interleave"]],["impl<I, J> Sync for InterleaveShortest<I, J>
where\n I: Sync,\n J: Sync,
",1,["rayon::iter::interleave_shortest::InterleaveShortest"]],["impl<I, P> Sync for Filter<I, P>
where\n I: Sync,\n P: Sync,
",1,["rayon::iter::filter::Filter"]],["impl<I, P> Sync for FilterMap<I, P>
where\n I: Sync,\n P: Sync,
",1,["rayon::iter::filter_map::FilterMap"]],["impl<I, P> Sync for Positions<I, P>
where\n I: Sync,\n P: Sync,
",1,["rayon::iter::positions::Positions"]],["impl<I, P> Sync for SkipAnyWhile<I, P>
where\n I: Sync,\n P: Sync,
",1,["rayon::iter::skip_any_while::SkipAnyWhile"]],["impl<I, P> Sync for TakeAnyWhile<I, P>
where\n I: Sync,\n P: Sync,
",1,["rayon::iter::take_any_while::TakeAnyWhile"]],["impl<I, T, F> Sync for MapWith<I, T, F>
where\n F: Sync,\n I: Sync,\n T: Sync,
",1,["rayon::iter::map_with::MapWith"]],["impl<I, U, F> Sync for FoldChunksWith<I, U, F>
where\n F: Sync,\n I: Sync,\n U: Sync,
",1,["rayon::iter::fold_chunks_with::FoldChunksWith"]],["impl<I, U, F> Sync for FoldWith<I, U, F>
where\n F: Sync,\n I: Sync,\n U: Sync,
",1,["rayon::iter::fold::FoldWith"]],["impl<I, U, F> Sync for TryFoldWith<I, U, F>
where\n F: Sync,\n I: Sync,\n <U as Try>::Output: Sync,
",1,["rayon::iter::try_fold::TryFoldWith"]],["impl<I, U, ID, F> Sync for TryFold<I, U, ID, F>
where\n F: Sync,\n I: Sync,\n ID: Sync,\n U: Sync,
",1,["rayon::iter::try_fold::TryFold"]],["impl<Iter> Sync for IterBridge<Iter>
where\n Iter: Sync,
",1,["rayon::iter::par_bridge::IterBridge"]],["impl<K, V> Sync for IntoIter<K, V>
where\n K: Sync,\n V: Sync,
",1,["rayon::collections::btree_map::IntoIter"]],["impl<K, V> Sync for IntoIter<K, V>
where\n K: Sync,\n V: Sync,
",1,["rayon::collections::hash_map::IntoIter"]],["impl<S, B> Sync for WalkTree<S, B>
where\n B: Sync,\n S: Sync,
",1,["rayon::iter::walk_tree::WalkTree"]],["impl<S, B> Sync for WalkTreePostfix<S, B>
where\n B: Sync,\n S: Sync,
",1,["rayon::iter::walk_tree::WalkTreePostfix"]],["impl<S, B> Sync for WalkTreePrefix<S, B>
where\n B: Sync,\n S: Sync,
",1,["rayon::iter::walk_tree::WalkTreePrefix"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::collections::binary_heap::IntoIter"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::collections::btree_set::IntoIter"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::collections::hash_set::IntoIter"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::collections::linked_list::IntoIter"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::collections::vec_deque::IntoIter"]],["impl<T> Sync for Empty<T>
where\n T: Sync,
",1,["rayon::iter::empty::Empty"]],["impl<T> Sync for MultiZip<T>
where\n T: Sync,
",1,["rayon::iter::multizip::MultiZip"]],["impl<T> Sync for Once<T>
where\n T: Sync,
",1,["rayon::iter::once::Once"]],["impl<T> Sync for Repeat<T>
where\n T: Sync,
",1,["rayon::iter::repeat::Repeat"]],["impl<T> Sync for RepeatN<T>
where\n T: Sync,
",1,["rayon::iter::repeat::RepeatN"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::option::IntoIter"]],["impl<T> Sync for Iter<T>
where\n T: Sync,
",1,["rayon::range::Iter"]],["impl<T> Sync for Iter<T>
where\n T: Sync,
",1,["rayon::range_inclusive::Iter"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::result::IntoIter"]],["impl<T> Sync for IntoIter<T>
where\n T: Sync,
",1,["rayon::vec::IntoIter"]],["impl<T, const N: usize> Sync for IntoIter<T, N>
where\n T: Sync,
",1,["rayon::array::IntoIter"]]], +"rayon_core":[["impl !Sync for Configuration",1,["rayon_core::Configuration"]],["impl !Sync for FnContext",1,["rayon_core::FnContext"]],["impl !Sync for ThreadBuilder",1,["rayon_core::registry::ThreadBuilder"]],["impl Sync for Yield",1,["rayon_core::thread_pool::Yield"]],["impl Sync for ThreadPool",1,["rayon_core::thread_pool::ThreadPool"]],["impl Sync for ThreadPoolBuildError",1,["rayon_core::ThreadPoolBuildError"]],["impl<'a> !Sync for BroadcastContext<'a>",1,["rayon_core::broadcast::BroadcastContext"]],["impl<'scope> Sync for Scope<'scope>",1,["rayon_core::scope::Scope"]],["impl<'scope> Sync for ScopeFifo<'scope>",1,["rayon_core::scope::ScopeFifo"]],["impl<S = DefaultSpawn> !Sync for ThreadPoolBuilder<S>",1,["rayon_core::ThreadPoolBuilder"]]], "read_fonts":[["impl Sync for ReadError",1,["read_fonts::read::ReadError"]],["impl Sync for BitmapDataFormat",1,["read_fonts::tables::bitmap::BitmapDataFormat"]],["impl Sync for BitmapMetrics",1,["read_fonts::tables::bitmap::BitmapMetrics"]],["impl Sync for MapVariant",1,["read_fonts::tables::cmap::MapVariant"]],["impl Sync for PlatformId",1,["read_fonts::tables::cmap::PlatformId"]],["impl Sync for CompositeMode",1,["read_fonts::tables::colr::CompositeMode"]],["impl Sync for Extend",1,["read_fonts::tables::colr::Extend"]],["impl Sync for GlyphClassDef",1,["read_fonts::tables::gdef::GlyphClassDef"]],["impl Sync for Opcode",1,["read_fonts::tables::glyf::bytecode::opcode::Opcode"]],["impl Sync for Anchor",1,["read_fonts::tables::glyf::Anchor"]],["impl Sync for ToPathError",1,["read_fonts::tables::glyf::ToPathError"]],["impl Sync for ToPathStyle",1,["read_fonts::tables::glyf::ToPathStyle"]],["impl Sync for DeltaFormat",1,["read_fonts::tables::layout::DeltaFormat"]],["impl Sync for Encoding",1,["read_fonts::tables::name::Encoding"]],["impl Sync for Entry",1,["read_fonts::tables::postscript::dict::Entry"]],["impl Sync for Operator",1,["read_fonts::tables::postscript::dict::Operator"]],["impl Sync for Token",1,["read_fonts::tables::postscript::dict::Token"]],["impl Sync for Error",1,["read_fonts::tables::postscript::Error"]],["impl Sync for Number",1,["read_fonts::tables::postscript::stack::Number"]],["impl Sync for TableRecord",1,["read_fonts::TableRecord"]],["impl Sync for AxisValueMap",1,["read_fonts::tables::avar::AxisValueMap"]],["impl Sync for BaseLangSysRecord",1,["read_fonts::tables::base::BaseLangSysRecord"]],["impl Sync for BaseScriptRecord",1,["read_fonts::tables::base::BaseScriptRecord"]],["impl Sync for FeatMinMaxRecord",1,["read_fonts::tables::base::FeatMinMaxRecord"]],["impl Sync for BdtComponent",1,["read_fonts::tables::bitmap::BdtComponent"]],["impl Sync for BigGlyphMetrics",1,["read_fonts::tables::bitmap::BigGlyphMetrics"]],["impl Sync for BitmapFlags",1,["read_fonts::tables::bitmap::BitmapFlags"]],["impl Sync for BitmapLocation",1,["read_fonts::tables::bitmap::BitmapLocation"]],["impl Sync for BitmapSize",1,["read_fonts::tables::bitmap::BitmapSize"]],["impl Sync for GlyphIdOffsetPair",1,["read_fonts::tables::bitmap::GlyphIdOffsetPair"]],["impl Sync for SbitLineMetrics",1,["read_fonts::tables::bitmap::SbitLineMetrics"]],["impl Sync for SmallGlyphMetrics",1,["read_fonts::tables::bitmap::SmallGlyphMetrics"]],["impl Sync for ConstantMapGroup",1,["read_fonts::tables::cmap::ConstantMapGroup"]],["impl Sync for EncodingRecord",1,["read_fonts::tables::cmap::EncodingRecord"]],["impl Sync for SequentialMapGroup",1,["read_fonts::tables::cmap::SequentialMapGroup"]],["impl Sync for SubHeader",1,["read_fonts::tables::cmap::SubHeader"]],["impl Sync for UnicodeRange",1,["read_fonts::tables::cmap::UnicodeRange"]],["impl Sync for UvsMapping",1,["read_fonts::tables::cmap::UvsMapping"]],["impl Sync for VariationSelector",1,["read_fonts::tables::cmap::VariationSelector"]],["impl Sync for BaseGlyph",1,["read_fonts::tables::colr::BaseGlyph"]],["impl Sync for BaseGlyphPaint",1,["read_fonts::tables::colr::BaseGlyphPaint"]],["impl Sync for Clip",1,["read_fonts::tables::colr::Clip"]],["impl Sync for ColorIndex",1,["read_fonts::tables::colr::ColorIndex"]],["impl Sync for ColorStop",1,["read_fonts::tables::colr::ColorStop"]],["impl Sync for Layer",1,["read_fonts::tables::colr::Layer"]],["impl Sync for VarColorIndex",1,["read_fonts::tables::colr::VarColorIndex"]],["impl Sync for VarColorStop",1,["read_fonts::tables::colr::VarColorStop"]],["impl Sync for ColorRecord",1,["read_fonts::tables::cpal::ColorRecord"]],["impl Sync for PaletteType",1,["read_fonts::tables::cpal::PaletteType"]],["impl Sync for CvtDelta",1,["read_fonts::tables::cvar::CvtDelta"]],["impl Sync for VariationAxisRecord",1,["read_fonts::tables::fvar::VariationAxisRecord"]],["impl Sync for GaspRange",1,["read_fonts::tables::gasp::GaspRange"]],["impl Sync for GaspRangeBehavior",1,["read_fonts::tables::gasp::GaspRangeBehavior"]],["impl Sync for DecodeError",1,["read_fonts::tables::glyf::bytecode::decode::DecodeError"]],["impl Sync for Component",1,["read_fonts::tables::glyf::Component"]],["impl Sync for CompositeGlyphFlags",1,["read_fonts::tables::glyf::CompositeGlyphFlags"]],["impl Sync for CurvePoint",1,["read_fonts::tables::glyf::CurvePoint"]],["impl Sync for PointFlags",1,["read_fonts::tables::glyf::PointFlags"]],["impl Sync for PointMarker",1,["read_fonts::tables::glyf::PointMarker"]],["impl Sync for SimpleGlyphFlags",1,["read_fonts::tables::glyf::SimpleGlyphFlags"]],["impl Sync for Transform",1,["read_fonts::tables::glyf::Transform"]],["impl Sync for Class2Record",1,["read_fonts::tables::gpos::Class2Record"]],["impl Sync for EntryExitRecord",1,["read_fonts::tables::gpos::EntryExitRecord"]],["impl Sync for MarkRecord",1,["read_fonts::tables::gpos::MarkRecord"]],["impl Sync for PairValueRecord",1,["read_fonts::tables::gpos::PairValueRecord"]],["impl Sync for ValueFormat",1,["read_fonts::tables::gpos::ValueFormat"]],["impl Sync for ValueRecord",1,["read_fonts::tables::gpos::value_record::ValueRecord"]],["impl Sync for GlyphDelta",1,["read_fonts::tables::gvar::GlyphDelta"]],["impl Sync for GvarFlags",1,["read_fonts::tables::gvar::GvarFlags"]],["impl Sync for U16Or32",1,["read_fonts::tables::gvar::U16Or32"]],["impl Sync for MacStyle",1,["read_fonts::tables::head::MacStyle"]],["impl Sync for LongMetric",1,["read_fonts::tables::hmtx::LongMetric"]],["impl Sync for ClassRangeRecord",1,["read_fonts::tables::layout::ClassRangeRecord"]],["impl Sync for FeatureRecord",1,["read_fonts::tables::layout::FeatureRecord"]],["impl Sync for FeatureTableSubstitutionRecord",1,["read_fonts::tables::layout::FeatureTableSubstitutionRecord"]],["impl Sync for FeatureVariationRecord",1,["read_fonts::tables::layout::FeatureVariationRecord"]],["impl Sync for LangSysRecord",1,["read_fonts::tables::layout::LangSysRecord"]],["impl Sync for LookupFlag",1,["read_fonts::tables::layout::lookupflag::LookupFlag"]],["impl Sync for RangeRecord",1,["read_fonts::tables::layout::RangeRecord"]],["impl Sync for ScriptRecord",1,["read_fonts::tables::layout::ScriptRecord"]],["impl Sync for SequenceLookupRecord",1,["read_fonts::tables::layout::SequenceLookupRecord"]],["impl Sync for ValueRecord",1,["read_fonts::tables::mvar::ValueRecord"]],["impl Sync for LangTagRecord",1,["read_fonts::tables::name::LangTagRecord"]],["impl Sync for MacRomanMapping",1,["read_fonts::tables::name::MacRomanMapping"]],["impl Sync for NameRecord",1,["read_fonts::tables::name::NameRecord"]],["impl Sync for SelectionFlags",1,["read_fonts::tables::os2::SelectionFlags"]],["impl Sync for Blues",1,["read_fonts::tables::postscript::dict::Blues"]],["impl Sync for StemSnaps",1,["read_fonts::tables::postscript::dict::StemSnaps"]],["impl Sync for FdSelectRange3",1,["read_fonts::tables::postscript::FdSelectRange3"]],["impl Sync for FdSelectRange4",1,["read_fonts::tables::postscript::FdSelectRange4"]],["impl Sync for Stack",1,["read_fonts::tables::postscript::stack::Stack"]],["impl Sync for StringId",1,["read_fonts::tables::postscript::string::StringId"]],["impl Sync for HeaderFlags",1,["read_fonts::tables::sbix::HeaderFlags"]],["impl Sync for AxisRecord",1,["read_fonts::tables::stat::AxisRecord"]],["impl Sync for AxisValueRecord",1,["read_fonts::tables::stat::AxisValueRecord"]],["impl Sync for AxisValueTableFlags",1,["read_fonts::tables::stat::AxisValueTableFlags"]],["impl Sync for DeltaSetIndex",1,["read_fonts::tables::variations::DeltaSetIndex"]],["impl Sync for EntryFormat",1,["read_fonts::tables::variations::EntryFormat"]],["impl Sync for FloatItemDelta",1,["read_fonts::tables::variations::FloatItemDelta"]],["impl Sync for RegionAxisCoordinates",1,["read_fonts::tables::variations::RegionAxisCoordinates"]],["impl Sync for TupleIndex",1,["read_fonts::tables::variations::TupleIndex"]],["impl Sync for TupleVariationCount",1,["read_fonts::tables::variations::TupleVariationCount"]],["impl<'a> !Sync for ExtensionSubtable<'a>",1,["read_fonts::tables::gpos::ExtensionSubtable"]],["impl<'a> !Sync for PositionLookup<'a>",1,["read_fonts::tables::gpos::PositionLookup"]],["impl<'a> !Sync for ExtensionSubtable<'a>",1,["read_fonts::tables::gsub::ExtensionSubtable"]],["impl<'a> !Sync for SubstitutionLookup<'a>",1,["read_fonts::tables::gsub::SubstitutionLookup"]],["impl<'a> Sync for FileRef<'a>",1,["read_fonts::FileRef"]],["impl<'a> Sync for BaseCoord<'a>",1,["read_fonts::tables::base::BaseCoord"]],["impl<'a> Sync for BitmapContent<'a>",1,["read_fonts::tables::bitmap::BitmapContent"]],["impl<'a> Sync for IndexSubtable<'a>",1,["read_fonts::tables::bitmap::IndexSubtable"]],["impl<'a> Sync for CmapSubtable<'a>",1,["read_fonts::tables::cmap::CmapSubtable"]],["impl<'a> Sync for ClipBox<'a>",1,["read_fonts::tables::colr::ClipBox"]],["impl<'a> Sync for Paint<'a>",1,["read_fonts::tables::colr::Paint"]],["impl<'a> Sync for CaretValue<'a>",1,["read_fonts::tables::gdef::CaretValue"]],["impl<'a> Sync for Glyph<'a>",1,["read_fonts::tables::glyf::Glyph"]],["impl<'a> Sync for AnchorTable<'a>",1,["read_fonts::tables::gpos::AnchorTable"]],["impl<'a> Sync for PairPos<'a>",1,["read_fonts::tables::gpos::PairPos"]],["impl<'a> Sync for PositionSubtables<'a>",1,["read_fonts::tables::gpos::PositionSubtables"]],["impl<'a> Sync for SinglePos<'a>",1,["read_fonts::tables::gpos::SinglePos"]],["impl<'a> Sync for SingleSubst<'a>",1,["read_fonts::tables::gsub::SingleSubst"]],["impl<'a> Sync for SubstitutionSubtables<'a>",1,["read_fonts::tables::gsub::SubstitutionSubtables"]],["impl<'a> Sync for ChainedSequenceContext<'a>",1,["read_fonts::tables::layout::ChainedSequenceContext"]],["impl<'a> Sync for ClassDef<'a>",1,["read_fonts::tables::layout::ClassDef"]],["impl<'a> Sync for CoverageTable<'a>",1,["read_fonts::tables::layout::CoverageTable"]],["impl<'a> Sync for DeviceOrVariationIndex<'a>",1,["read_fonts::tables::layout::DeviceOrVariationIndex"]],["impl<'a> Sync for FeatureParams<'a>",1,["read_fonts::tables::layout::FeatureParams"]],["impl<'a> Sync for SequenceContext<'a>",1,["read_fonts::tables::layout::SequenceContext"]],["impl<'a> Sync for Loca<'a>",1,["read_fonts::tables::loca::Loca"]],["impl<'a> Sync for FdSelect<'a>",1,["read_fonts::tables::postscript::FdSelect"]],["impl<'a> Sync for Index<'a>",1,["read_fonts::tables::postscript::index::Index"]],["impl<'a> Sync for AxisValue<'a>",1,["read_fonts::tables::stat::AxisValue"]],["impl<'a> Sync for DeltaSetIndexMap<'a>",1,["read_fonts::tables::variations::DeltaSetIndexMap"]],["impl<'a> Sync for CollectionRef<'a>",1,["read_fonts::CollectionRef"]],["impl<'a> Sync for FontData<'a>",1,["read_fonts::font_data::FontData"]],["impl<'a> Sync for FontRef<'a>",1,["read_fonts::FontRef"]],["impl<'a> Sync for SegmentMaps<'a>",1,["read_fonts::tables::avar::SegmentMaps"]],["impl<'a> Sync for BitmapData<'a>",1,["read_fonts::tables::bitmap::BitmapData"]],["impl<'a> Sync for Cff<'a>",1,["read_fonts::tables::cff::Cff"]],["impl<'a> Sync for Cff2<'a>",1,["read_fonts::tables::cff2::Cff2"]],["impl<'a> Sync for Cmap12Iter<'a>",1,["read_fonts::tables::cmap::Cmap12Iter"]],["impl<'a> Sync for Cmap14Iter<'a>",1,["read_fonts::tables::cmap::Cmap14Iter"]],["impl<'a> Sync for Cmap4Iter<'a>",1,["read_fonts::tables::cmap::Cmap4Iter"]],["impl<'a> Sync for InstanceRecord<'a>",1,["read_fonts::tables::fvar::instance_record::InstanceRecord"]],["impl<'a> Sync for Decoder<'a>",1,["read_fonts::tables::glyf::bytecode::decode::Decoder"]],["impl<'a> Sync for InlineOperands<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::InlineOperands"]],["impl<'a> Sync for Instruction<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::Instruction"]],["impl<'a> Sync for BaseRecord<'a>",1,["read_fonts::tables::gpos::BaseRecord"]],["impl<'a> Sync for Class1Record<'a>",1,["read_fonts::tables::gpos::Class1Record"]],["impl<'a> Sync for ComponentRecord<'a>",1,["read_fonts::tables::gpos::ComponentRecord"]],["impl<'a> Sync for Mark2Record<'a>",1,["read_fonts::tables::gpos::Mark2Record"]],["impl<'a> Sync for CharIter<'a>",1,["read_fonts::tables::name::CharIter"]],["impl<'a> Sync for NameString<'a>",1,["read_fonts::tables::name::NameString"]],["impl<'a> Sync for PString<'a>",1,["read_fonts::tables::post::PString"]],["impl<'a> Sync for BlendState<'a>",1,["read_fonts::tables::postscript::blend::BlendState"]],["impl<'a> Sync for Latin1String<'a>",1,["read_fonts::tables::postscript::string::Latin1String"]],["impl<'a> Sync for DeltaRunIter<'a>",1,["read_fonts::tables::variations::DeltaRunIter"]],["impl<'a> Sync for PackedDeltas<'a>",1,["read_fonts::tables::variations::PackedDeltas"]],["impl<'a> Sync for PackedPointNumbers<'a>",1,["read_fonts::tables::variations::PackedPointNumbers"]],["impl<'a> Sync for PackedPointNumbersIter<'a>",1,["read_fonts::tables::variations::PackedPointNumbersIter"]],["impl<'a> Sync for Tuple<'a>",1,["read_fonts::tables::variations::Tuple"]],["impl<'a> Sync for TupleVariationHeaderIter<'a>",1,["read_fonts::tables::variations::TupleVariationHeaderIter"]],["impl<'a> Sync for VariationRegion<'a>",1,["read_fonts::tables::variations::VariationRegion"]],["impl<'a, P> Sync for PenSink<'a, P>
where\n P: Sync,
",1,["read_fonts::tables::postscript::charstring::PenSink"]],["impl<'a, T> !Sync for VarLenArray<'a, T>",1,["read_fonts::array::VarLenArray"]],["impl<'a, T> Sync for ComputedArray<'a, T>
where\n <T as ReadArgs>::Args: Sync,
",1,["read_fonts::array::ComputedArray"]],["impl<'a, T> Sync for TableRef<'a, T>
where\n T: Sync,
",1,["read_fonts::table_ref::TableRef"]],["impl<'a, T> Sync for TupleDeltaIter<'a, T>",1,["read_fonts::tables::variations::TupleDeltaIter"]],["impl<'a, T> Sync for TupleVariation<'a, T>",1,["read_fonts::tables::variations::TupleVariation"]],["impl<'a, T> Sync for TupleVariationData<'a, T>",1,["read_fonts::tables::variations::TupleVariationData"]],["impl<'a, T> Sync for TupleVariationIter<'a, T>",1,["read_fonts::tables::variations::TupleVariationIter"]],["impl<'a, T, Ext> Sync for Subtables<'a, T, Ext>",1,["read_fonts::tables::layout::Subtables"]],["impl<'a, T, O> Sync for ArrayOfNullableOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Sync,\n <O as Scalar>::Raw: Sync,
",1,["read_fonts::offset_array::ArrayOfNullableOffsets"]],["impl<'a, T, O> Sync for ArrayOfOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Sync,\n <O as Scalar>::Raw: Sync,
",1,["read_fonts::offset_array::ArrayOfOffsets"]]], "roxmltree":[["impl Sync for Error",1,["roxmltree::parse::Error"]],["impl Sync for NodeType",1,["roxmltree::NodeType"]],["impl Sync for NodeId",1,["roxmltree::NodeId"]],["impl Sync for ParsingOptions",1,["roxmltree::parse::ParsingOptions"]],["impl Sync for TextPos",1,["roxmltree::TextPos"]],["impl<'a, 'b> Sync for ExpandedName<'a, 'b>",1,["roxmltree::ExpandedName"]],["impl<'a, 'input> Sync for Attribute<'a, 'input>",1,["roxmltree::Attribute"]],["impl<'a, 'input> Sync for Attributes<'a, 'input>",1,["roxmltree::Attributes"]],["impl<'a, 'input> Sync for AxisIter<'a, 'input>",1,["roxmltree::AxisIter"]],["impl<'a, 'input> Sync for Children<'a, 'input>",1,["roxmltree::Children"]],["impl<'a, 'input> Sync for Descendants<'a, 'input>",1,["roxmltree::Descendants"]],["impl<'a, 'input> Sync for NamespaceIter<'a, 'input>",1,["roxmltree::NamespaceIter"]],["impl<'a, 'input> Sync for Node<'a, 'input>",1,["roxmltree::Node"]],["impl<'input> Sync for StringStorage<'input>",1,["roxmltree::StringStorage"]],["impl<'input> Sync for Document<'input>",1,["roxmltree::Document"]],["impl<'input> Sync for Namespace<'input>",1,["roxmltree::Namespace"]],["impl<'input> Sync for PI<'input>",1,["roxmltree::PI"]]], "rustc_hash":[["impl Sync for FxHasher",1,["rustc_hash::FxHasher"]]], diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js index d6e9379698..3217f9b5ce 100644 --- a/trait.impl/core/marker/trait.Unpin.js +++ b/trait.impl/core/marker/trait.Unpin.js @@ -2,6 +2,10 @@ "bitflags":[["impl Unpin for ParseError",1,["bitflags::parser::ParseError"]],["impl<B> Unpin for Iter<B>
where\n B: Unpin,
",1,["bitflags::iter::Iter"]],["impl<B> Unpin for IterNames<B>
where\n B: Unpin,
",1,["bitflags::iter::IterNames"]],["impl<B> Unpin for Flag<B>
where\n B: Unpin,
",1,["bitflags::traits::Flag"]]], "bytemuck":[["impl Unpin for CheckedCastError",1,["bytemuck::checked::CheckedCastError"]],["impl Unpin for PodCastError",1,["bytemuck::PodCastError"]],["impl Unpin for BoxBytes",1,["bytemuck::allocation::BoxBytes"]]], "cosmic_text":[["impl Unpin for Action",1,["cosmic_text::edit::Action"]],["impl Unpin for Affinity",1,["cosmic_text::cursor::Affinity"]],["impl Unpin for Align",1,["cosmic_text::layout::Align"]],["impl Unpin for FamilyOwned",1,["cosmic_text::attrs::FamilyOwned"]],["impl Unpin for LineEnding",1,["cosmic_text::line_ending::LineEnding"]],["impl Unpin for Motion",1,["cosmic_text::cursor::Motion"]],["impl Unpin for Selection",1,["cosmic_text::edit::Selection"]],["impl Unpin for Shaping",1,["cosmic_text::shape::Shaping"]],["impl Unpin for SubpixelBin",1,["cosmic_text::glyph_cache::SubpixelBin"]],["impl Unpin for Wrap",1,["cosmic_text::layout::Wrap"]],["impl Unpin for AttrsList",1,["cosmic_text::attrs::AttrsList"]],["impl Unpin for AttrsOwned",1,["cosmic_text::attrs::AttrsOwned"]],["impl Unpin for Buffer",1,["cosmic_text::buffer::Buffer"]],["impl Unpin for BufferLine",1,["cosmic_text::buffer_line::BufferLine"]],["impl Unpin for CacheKey",1,["cosmic_text::glyph_cache::CacheKey"]],["impl Unpin for CacheKeyFlags",1,["cosmic_text::glyph_cache::CacheKeyFlags"]],["impl Unpin for Change",1,["cosmic_text::edit::Change"]],["impl Unpin for ChangeItem",1,["cosmic_text::edit::ChangeItem"]],["impl Unpin for Color",1,["cosmic_text::attrs::Color"]],["impl Unpin for Cursor",1,["cosmic_text::cursor::Cursor"]],["impl Unpin for Font",1,["cosmic_text::font::Font"]],["impl Unpin for FontMatchAttrs",1,["cosmic_text::attrs::FontMatchAttrs"]],["impl Unpin for FontMatchKey",1,["cosmic_text::font::system::FontMatchKey"]],["impl Unpin for FontSystem",1,["cosmic_text::font::system::FontSystem"]],["impl Unpin for LayoutCursor",1,["cosmic_text::cursor::LayoutCursor"]],["impl Unpin for LayoutGlyph",1,["cosmic_text::layout::LayoutGlyph"]],["impl Unpin for LayoutLine",1,["cosmic_text::layout::LayoutLine"]],["impl Unpin for Metrics",1,["cosmic_text::buffer::Metrics"]],["impl Unpin for PhysicalGlyph",1,["cosmic_text::layout::PhysicalGlyph"]],["impl Unpin for Scroll",1,["cosmic_text::cursor::Scroll"]],["impl Unpin for ShapeBuffer",1,["cosmic_text::shape::ShapeBuffer"]],["impl Unpin for ShapeGlyph",1,["cosmic_text::shape::ShapeGlyph"]],["impl Unpin for ShapeLine",1,["cosmic_text::shape::ShapeLine"]],["impl Unpin for ShapeRunCache",1,["cosmic_text::shape_run_cache::ShapeRunCache"]],["impl Unpin for ShapeRunKey",1,["cosmic_text::shape_run_cache::ShapeRunKey"]],["impl Unpin for ShapeSpan",1,["cosmic_text::shape::ShapeSpan"]],["impl Unpin for ShapeWord",1,["cosmic_text::shape::ShapeWord"]],["impl Unpin for SwashCache",1,["cosmic_text::swash::SwashCache"]],["impl<'a> Unpin for Attrs<'a>",1,["cosmic_text::attrs::Attrs"]],["impl<'a> Unpin for LayoutRun<'a>",1,["cosmic_text::buffer::LayoutRun"]],["impl<'a> Unpin for LineIter<'a>",1,["cosmic_text::line_ending::LineIter"]],["impl<'a, T> Unpin for BorrowedWithFontSystem<'a, T>",1,["cosmic_text::font::system::BorrowedWithFontSystem"]],["impl<'b> Unpin for LayoutRunIter<'b>",1,["cosmic_text::buffer::LayoutRunIter"]],["impl<'buffer> Unpin for BufferRef<'buffer>",1,["cosmic_text::edit::BufferRef"]],["impl<'buffer> Unpin for Editor<'buffer>",1,["cosmic_text::edit::editor::Editor"]],["impl<'text> Unpin for BidiParagraphs<'text>",1,["cosmic_text::bidi_para::BidiParagraphs"]]], +"crossbeam_deque":[["impl<T> Unpin for Steal<T>
where\n T: Unpin,
",1,["crossbeam_deque::deque::Steal"]],["impl<T> Unpin for Injector<T>
where\n T: Unpin,
",1,["crossbeam_deque::deque::Injector"]],["impl<T> Unpin for Stealer<T>",1,["crossbeam_deque::deque::Stealer"]],["impl<T> Unpin for Worker<T>",1,["crossbeam_deque::deque::Worker"]]], +"crossbeam_epoch":[["impl Unpin for Collector",1,["crossbeam_epoch::collector::Collector"]],["impl Unpin for Guard",1,["crossbeam_epoch::guard::Guard"]],["impl Unpin for LocalHandle",1,["crossbeam_epoch::collector::LocalHandle"]],["impl<'g, T: ?Sized> Unpin for Shared<'g, T>",1,["crossbeam_epoch::atomic::Shared"]],["impl<'g, T: ?Sized, P> Unpin for CompareExchangeError<'g, T, P>
where\n P: Unpin,
",1,["crossbeam_epoch::atomic::CompareExchangeError"]],["impl<T: ?Sized> Unpin for Atomic<T>",1,["crossbeam_epoch::atomic::Atomic"]],["impl<T: ?Sized> Unpin for Owned<T>",1,["crossbeam_epoch::atomic::Owned"]]], +"crossbeam_utils":[["impl Unpin for Backoff",1,["crossbeam_utils::backoff::Backoff"]],["impl Unpin for Parker",1,["crossbeam_utils::sync::parker::Parker"]],["impl Unpin for Unparker",1,["crossbeam_utils::sync::parker::Unparker"]],["impl Unpin for WaitGroup",1,["crossbeam_utils::sync::wait_group::WaitGroup"]],["impl<'a, T: ?Sized> Unpin for ShardedLockReadGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockReadGuard"]],["impl<'a, T: ?Sized> Unpin for ShardedLockWriteGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockWriteGuard"]],["impl<'env> Unpin for Scope<'env>",1,["crossbeam_utils::thread::Scope"]],["impl<'scope, 'env> Unpin for ScopedThreadBuilder<'scope, 'env>",1,["crossbeam_utils::thread::ScopedThreadBuilder"]],["impl<'scope, T> Unpin for ScopedJoinHandle<'scope, T>",1,["crossbeam_utils::thread::ScopedJoinHandle"]],["impl<T> Unpin for AtomicCell<T>
where\n T: Unpin,
",1,["crossbeam_utils::atomic::atomic_cell::AtomicCell"]],["impl<T> Unpin for CachePadded<T>
where\n T: Unpin,
",1,["crossbeam_utils::cache_padded::CachePadded"]],["impl<T: ?Sized> Unpin for ShardedLock<T>
where\n T: Unpin,
",1,["crossbeam_utils::sync::sharded_lock::ShardedLock"]]], +"either":[["impl<L, R> Unpin for Either<L, R>
where\n L: Unpin,\n R: Unpin,
",1,["either::Either"]],["impl<L, R> Unpin for IterEither<L, R>
where\n L: Unpin,\n R: Unpin,
",1,["either::iterator::IterEither"]]], "font_types":[["impl Unpin for InvalidTag",1,["font_types::tag::InvalidTag"]],["impl Unpin for PenCommand",1,["font_types::pen::PenCommand"]],["impl Unpin for F26Dot6",1,["font_types::fixed::F26Dot6"]],["impl Unpin for F2Dot14",1,["font_types::fixed::F2Dot14"]],["impl Unpin for FWord",1,["font_types::fword::FWord"]],["impl Unpin for Fixed",1,["font_types::fixed::Fixed"]],["impl Unpin for GlyphId",1,["font_types::glyph_id::GlyphId"]],["impl Unpin for LongDateTime",1,["font_types::longdatetime::LongDateTime"]],["impl Unpin for MajorMinor",1,["font_types::version::MajorMinor"]],["impl Unpin for NameId",1,["font_types::name_id::NameId"]],["impl Unpin for Offset16",1,["font_types::offset::Offset16"]],["impl Unpin for Offset24",1,["font_types::offset::Offset24"]],["impl Unpin for Offset32",1,["font_types::offset::Offset32"]],["impl Unpin for Tag",1,["font_types::tag::Tag"]],["impl Unpin for UfWord",1,["font_types::fword::UfWord"]],["impl Unpin for Uint24",1,["font_types::uint24::Uint24"]],["impl Unpin for Version16Dot16",1,["font_types::version::Version16Dot16"]],["impl<T> Unpin for BigEndian<T>
where\n <T as Scalar>::Raw: Unpin,
",1,["font_types::raw::BigEndian"]],["impl<T> Unpin for BoundingBox<T>
where\n T: Unpin,
",1,["font_types::bbox::BoundingBox"]],["impl<T> Unpin for Nullable<T>
where\n T: Unpin,
",1,["font_types::offset::Nullable"]],["impl<T> Unpin for Point<T>
where\n T: Unpin,
",1,["font_types::point::Point"]]], "fontconfig_parser":[["impl Unpin for BinaryOp",1,["fontconfig_parser::types::value::BinaryOp"]],["impl Unpin for ConfigPart",1,["fontconfig_parser::types::document::ConfigPart"]],["impl Unpin for Constant",1,["fontconfig_parser::types::constant::Constant"]],["impl Unpin for DirPrefix",1,["fontconfig_parser::types::dir::DirPrefix"]],["impl Unpin for EditBinding",1,["fontconfig_parser::types::match_::edit::EditBinding"]],["impl Unpin for EditMode",1,["fontconfig_parser::types::match_::edit::EditMode"]],["impl Unpin for Error",1,["fontconfig_parser::error::Error"]],["impl Unpin for Expression",1,["fontconfig_parser::types::value::Expression"]],["impl Unpin for FontMatch",1,["fontconfig_parser::types::selectfont::FontMatch"]],["impl Unpin for IntOrRange",1,["fontconfig_parser::types::IntOrRange"]],["impl Unpin for ListOp",1,["fontconfig_parser::types::value::ListOp"]],["impl Unpin for MatchTarget",1,["fontconfig_parser::types::match_::MatchTarget"]],["impl Unpin for PrefixBehavior",1,["fontconfig_parser::types::dir::PrefixBehavior"]],["impl Unpin for Property",1,["fontconfig_parser::types::property::Property"]],["impl Unpin for PropertyKind",1,["fontconfig_parser::types::property::PropertyKind"]],["impl Unpin for PropertyTarget",1,["fontconfig_parser::types::value::PropertyTarget"]],["impl Unpin for TernaryOp",1,["fontconfig_parser::types::value::TernaryOp"]],["impl Unpin for TestCompare",1,["fontconfig_parser::types::match_::test::TestCompare"]],["impl Unpin for TestQual",1,["fontconfig_parser::types::match_::test::TestQual"]],["impl Unpin for TestTarget",1,["fontconfig_parser::types::match_::test::TestTarget"]],["impl Unpin for UnaryOp",1,["fontconfig_parser::types::value::UnaryOp"]],["impl Unpin for Value",1,["fontconfig_parser::types::value::Value"]],["impl Unpin for Alias",1,["fontconfig_parser::types::alias::Alias"]],["impl Unpin for CacheDir",1,["fontconfig_parser::types::dir::CacheDir"]],["impl Unpin for Config",1,["fontconfig_parser::types::config::Config"]],["impl Unpin for Dir",1,["fontconfig_parser::types::dir::Dir"]],["impl Unpin for DirData",1,["fontconfig_parser::types::document::DirData"]],["impl Unpin for Edit",1,["fontconfig_parser::types::match_::edit::Edit"]],["impl Unpin for FontConfig",1,["fontconfig_parser::types::document::FontConfig"]],["impl Unpin for Include",1,["fontconfig_parser::types::dir::Include"]],["impl Unpin for Match",1,["fontconfig_parser::types::match_::Match"]],["impl Unpin for RemapDir",1,["fontconfig_parser::types::dir::RemapDir"]],["impl Unpin for RemapDirData",1,["fontconfig_parser::types::document::RemapDirData"]],["impl Unpin for SelectFont",1,["fontconfig_parser::types::selectfont::SelectFont"]],["impl Unpin for Test",1,["fontconfig_parser::types::match_::test::Test"]]], "fontdb":[["impl Unpin for Source",1,["fontdb::Source"]],["impl Unpin for Style",1,["fontdb::Style"]],["impl Unpin for Database",1,["fontdb::Database"]],["impl Unpin for FaceInfo",1,["fontdb::FaceInfo"]],["impl Unpin for ID",1,["fontdb::ID"]],["impl Unpin for Weight",1,["fontdb::Weight"]],["impl<'a> Unpin for Family<'a>",1,["fontdb::Family"]],["impl<'a> Unpin for Query<'a>",1,["fontdb::Query"]]], @@ -11,6 +15,8 @@ "memmap2":[["impl Unpin for Advice",1,["memmap2::advice::Advice"]],["impl Unpin for UncheckedAdvice",1,["memmap2::advice::UncheckedAdvice"]],["impl Unpin for Mmap",1,["memmap2::Mmap"]],["impl Unpin for MmapMut",1,["memmap2::MmapMut"]],["impl Unpin for MmapOptions",1,["memmap2::MmapOptions"]],["impl Unpin for MmapRaw",1,["memmap2::MmapRaw"]],["impl Unpin for MmapRawDescriptor",1,["memmap2::MmapRawDescriptor"]],["impl Unpin for RemapOptions",1,["memmap2::RemapOptions"]]], "proc_macro2":[["impl Unpin for Delimiter",1,["proc_macro2::Delimiter"]],["impl Unpin for Spacing",1,["proc_macro2::Spacing"]],["impl Unpin for TokenTree",1,["proc_macro2::TokenTree"]],["impl Unpin for DelimSpan",1,["proc_macro2::extra::DelimSpan"]],["impl Unpin for Group",1,["proc_macro2::Group"]],["impl Unpin for Ident",1,["proc_macro2::Ident"]],["impl Unpin for LexError",1,["proc_macro2::LexError"]],["impl Unpin for Literal",1,["proc_macro2::Literal"]],["impl Unpin for Punct",1,["proc_macro2::Punct"]],["impl Unpin for Span",1,["proc_macro2::Span"]],["impl Unpin for TokenStream",1,["proc_macro2::TokenStream"]],["impl Unpin for IntoIter",1,["proc_macro2::token_stream::IntoIter"]]], "rangemap":[["impl<'a, K, V> Unpin for Iter<'a, K, V>",1,["rangemap::inclusive_map::Iter"]],["impl<'a, K, V> Unpin for Gaps<'a, K, V>",1,["rangemap::map::Gaps"]],["impl<'a, K, V> Unpin for Iter<'a, K, V>",1,["rangemap::map::Iter"]],["impl<'a, K, V, R> Unpin for Overlapping<'a, K, V, R>
where\n R: Unpin,
",1,["rangemap::inclusive_map::Overlapping"]],["impl<'a, K, V, R> Unpin for Overlapping<'a, K, V, R>
where\n R: Unpin,
",1,["rangemap::map::Overlapping"]],["impl<'a, K, V, StepFnsT> Unpin for Gaps<'a, K, V, StepFnsT>
where\n K: Unpin,\n StepFnsT: Unpin,
",1,["rangemap::inclusive_map::Gaps"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rangemap::inclusive_set::Iter"]],["impl<'a, T> Unpin for Gaps<'a, T>",1,["rangemap::set::Gaps"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rangemap::set::Iter"]],["impl<'a, T, R> Unpin for Overlapping<'a, T, R>
where\n R: Unpin,
",1,["rangemap::inclusive_set::Overlapping"]],["impl<'a, T, R> Unpin for Overlapping<'a, T, R>
where\n R: Unpin,
",1,["rangemap::set::Overlapping"]],["impl<'a, T, StepFnsT> Unpin for Gaps<'a, T, StepFnsT>
where\n StepFnsT: Unpin,\n T: Unpin,
",1,["rangemap::inclusive_set::Gaps"]],["impl<K, V> Unpin for IntoIter<K, V>",1,["rangemap::inclusive_map::IntoIter"]],["impl<K, V> Unpin for IntoIter<K, V>",1,["rangemap::map::IntoIter"]],["impl<K, V> Unpin for RangeMap<K, V>",1,["rangemap::map::RangeMap"]],["impl<K, V, StepFnsT> Unpin for RangeInclusiveMap<K, V, StepFnsT>
where\n StepFnsT: Unpin,
",1,["rangemap::inclusive_map::RangeInclusiveMap"]],["impl<T> Unpin for IntoIter<T>",1,["rangemap::inclusive_set::IntoIter"]],["impl<T> Unpin for IntoIter<T>",1,["rangemap::set::IntoIter"]],["impl<T> Unpin for RangeSet<T>",1,["rangemap::set::RangeSet"]],["impl<T, StepFnsT> Unpin for RangeInclusiveSet<T, StepFnsT>
where\n StepFnsT: Unpin,
",1,["rangemap::inclusive_set::RangeInclusiveSet"]]], +"rayon":[["impl<'a> Unpin for Drain<'a>",1,["rayon::string::Drain"]],["impl<'a, K, V> Unpin for Iter<'a, K, V>",1,["rayon::collections::btree_map::Iter"]],["impl<'a, K, V> Unpin for IterMut<'a, K, V>",1,["rayon::collections::btree_map::IterMut"]],["impl<'a, K, V> Unpin for Drain<'a, K, V>
where\n K: Unpin,\n V: Unpin,
",1,["rayon::collections::hash_map::Drain"]],["impl<'a, K, V> Unpin for Iter<'a, K, V>",1,["rayon::collections::hash_map::Iter"]],["impl<'a, K, V> Unpin for IterMut<'a, K, V>",1,["rayon::collections::hash_map::IterMut"]],["impl<'a, T> Unpin for Drain<'a, T>",1,["rayon::collections::binary_heap::Drain"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rayon::collections::binary_heap::Iter"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rayon::collections::btree_set::Iter"]],["impl<'a, T> Unpin for Drain<'a, T>
where\n T: Unpin,
",1,["rayon::collections::hash_set::Drain"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rayon::collections::hash_set::Iter"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rayon::collections::linked_list::Iter"]],["impl<'a, T> Unpin for IterMut<'a, T>",1,["rayon::collections::linked_list::IterMut"]],["impl<'a, T> Unpin for Drain<'a, T>",1,["rayon::collections::vec_deque::Drain"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rayon::collections::vec_deque::Iter"]],["impl<'a, T> Unpin for IterMut<'a, T>",1,["rayon::collections::vec_deque::IterMut"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rayon::option::Iter"]],["impl<'a, T> Unpin for IterMut<'a, T>",1,["rayon::option::IterMut"]],["impl<'a, T> Unpin for Iter<'a, T>",1,["rayon::result::Iter"]],["impl<'a, T> Unpin for IterMut<'a, T>",1,["rayon::result::IterMut"]],["impl<'ch> Unpin for Bytes<'ch>",1,["rayon::str::Bytes"]],["impl<'ch> Unpin for CharIndices<'ch>",1,["rayon::str::CharIndices"]],["impl<'ch> Unpin for Chars<'ch>",1,["rayon::str::Chars"]],["impl<'ch> Unpin for EncodeUtf16<'ch>",1,["rayon::str::EncodeUtf16"]],["impl<'ch> Unpin for Lines<'ch>",1,["rayon::str::Lines"]],["impl<'ch> Unpin for SplitAsciiWhitespace<'ch>",1,["rayon::str::SplitAsciiWhitespace"]],["impl<'ch> Unpin for SplitWhitespace<'ch>",1,["rayon::str::SplitWhitespace"]],["impl<'ch, P> Unpin for MatchIndices<'ch, P>
where\n P: Unpin,
",1,["rayon::str::MatchIndices"]],["impl<'ch, P> Unpin for Matches<'ch, P>
where\n P: Unpin,
",1,["rayon::str::Matches"]],["impl<'ch, P> Unpin for Split<'ch, P>
where\n P: Unpin,
",1,["rayon::str::Split"]],["impl<'ch, P> Unpin for SplitInclusive<'ch, P>
where\n P: Unpin,
",1,["rayon::str::SplitInclusive"]],["impl<'ch, P> Unpin for SplitTerminator<'ch, P>
where\n P: Unpin,
",1,["rayon::str::SplitTerminator"]],["impl<'data, T> Unpin for Chunks<'data, T>",1,["rayon::slice::chunks::Chunks"]],["impl<'data, T> Unpin for ChunksExact<'data, T>",1,["rayon::slice::chunks::ChunksExact"]],["impl<'data, T> Unpin for ChunksExactMut<'data, T>",1,["rayon::slice::chunks::ChunksExactMut"]],["impl<'data, T> Unpin for ChunksMut<'data, T>",1,["rayon::slice::chunks::ChunksMut"]],["impl<'data, T> Unpin for Iter<'data, T>",1,["rayon::slice::Iter"]],["impl<'data, T> Unpin for IterMut<'data, T>",1,["rayon::slice::IterMut"]],["impl<'data, T> Unpin for RChunks<'data, T>",1,["rayon::slice::rchunks::RChunks"]],["impl<'data, T> Unpin for RChunksExact<'data, T>",1,["rayon::slice::rchunks::RChunksExact"]],["impl<'data, T> Unpin for RChunksExactMut<'data, T>",1,["rayon::slice::rchunks::RChunksExactMut"]],["impl<'data, T> Unpin for RChunksMut<'data, T>",1,["rayon::slice::rchunks::RChunksMut"]],["impl<'data, T> Unpin for Windows<'data, T>",1,["rayon::slice::Windows"]],["impl<'data, T> Unpin for Drain<'data, T>",1,["rayon::vec::Drain"]],["impl<'data, T, P> Unpin for ChunkBy<'data, T, P>
where\n P: Unpin,
",1,["rayon::slice::chunk_by::ChunkBy"]],["impl<'data, T, P> Unpin for ChunkByMut<'data, T, P>
where\n P: Unpin,
",1,["rayon::slice::chunk_by::ChunkByMut"]],["impl<'data, T, P> Unpin for Split<'data, T, P>
where\n P: Unpin,
",1,["rayon::slice::Split"]],["impl<'data, T, P> Unpin for SplitInclusive<'data, T, P>
where\n P: Unpin,
",1,["rayon::slice::SplitInclusive"]],["impl<'data, T, P> Unpin for SplitInclusiveMut<'data, T, P>
where\n P: Unpin,
",1,["rayon::slice::SplitInclusiveMut"]],["impl<'data, T, P> Unpin for SplitMut<'data, T, P>
where\n P: Unpin,
",1,["rayon::slice::SplitMut"]],["impl<A, B> Unpin for Chain<A, B>
where\n A: Unpin,\n B: Unpin,
",1,["rayon::iter::chain::Chain"]],["impl<A, B> Unpin for Zip<A, B>
where\n A: Unpin,\n B: Unpin,
",1,["rayon::iter::zip::Zip"]],["impl<A, B> Unpin for ZipEq<A, B>
where\n A: Unpin,\n B: Unpin,
",1,["rayon::iter::zip_eq::ZipEq"]],["impl<D, S> Unpin for Split<D, S>
where\n D: Unpin,\n S: Unpin,
",1,["rayon::iter::splitter::Split"]],["impl<I> Unpin for Chunks<I>
where\n I: Unpin,
",1,["rayon::iter::chunks::Chunks"]],["impl<I> Unpin for Cloned<I>
where\n I: Unpin,
",1,["rayon::iter::cloned::Cloned"]],["impl<I> Unpin for Copied<I>
where\n I: Unpin,
",1,["rayon::iter::copied::Copied"]],["impl<I> Unpin for Enumerate<I>
where\n I: Unpin,
",1,["rayon::iter::enumerate::Enumerate"]],["impl<I> Unpin for ExponentialBlocks<I>
where\n I: Unpin,
",1,["rayon::iter::blocks::ExponentialBlocks"]],["impl<I> Unpin for Flatten<I>
where\n I: Unpin,
",1,["rayon::iter::flatten::Flatten"]],["impl<I> Unpin for FlattenIter<I>
where\n I: Unpin,
",1,["rayon::iter::flatten_iter::FlattenIter"]],["impl<I> Unpin for Intersperse<I>
where\n I: Unpin,\n <I as ParallelIterator>::Item: Unpin,
",1,["rayon::iter::intersperse::Intersperse"]],["impl<I> Unpin for MaxLen<I>
where\n I: Unpin,
",1,["rayon::iter::len::MaxLen"]],["impl<I> Unpin for MinLen<I>
where\n I: Unpin,
",1,["rayon::iter::len::MinLen"]],["impl<I> Unpin for PanicFuse<I>
where\n I: Unpin,
",1,["rayon::iter::panic_fuse::PanicFuse"]],["impl<I> Unpin for Rev<I>
where\n I: Unpin,
",1,["rayon::iter::rev::Rev"]],["impl<I> Unpin for Skip<I>
where\n I: Unpin,
",1,["rayon::iter::skip::Skip"]],["impl<I> Unpin for SkipAny<I>
where\n I: Unpin,
",1,["rayon::iter::skip_any::SkipAny"]],["impl<I> Unpin for StepBy<I>
where\n I: Unpin,
",1,["rayon::iter::step_by::StepBy"]],["impl<I> Unpin for Take<I>
where\n I: Unpin,
",1,["rayon::iter::take::Take"]],["impl<I> Unpin for TakeAny<I>
where\n I: Unpin,
",1,["rayon::iter::take_any::TakeAny"]],["impl<I> Unpin for UniformBlocks<I>
where\n I: Unpin,
",1,["rayon::iter::blocks::UniformBlocks"]],["impl<I> Unpin for WhileSome<I>
where\n I: Unpin,
",1,["rayon::iter::while_some::WhileSome"]],["impl<I, F> Unpin for FlatMap<I, F>
where\n F: Unpin,\n I: Unpin,
",1,["rayon::iter::flat_map::FlatMap"]],["impl<I, F> Unpin for FlatMapIter<I, F>
where\n F: Unpin,\n I: Unpin,
",1,["rayon::iter::flat_map_iter::FlatMapIter"]],["impl<I, F> Unpin for Inspect<I, F>
where\n F: Unpin,\n I: Unpin,
",1,["rayon::iter::inspect::Inspect"]],["impl<I, F> Unpin for Map<I, F>
where\n F: Unpin,\n I: Unpin,
",1,["rayon::iter::map::Map"]],["impl<I, F> Unpin for Update<I, F>
where\n F: Unpin,\n I: Unpin,
",1,["rayon::iter::update::Update"]],["impl<I, ID, F> Unpin for Fold<I, ID, F>
where\n F: Unpin,\n I: Unpin,\n ID: Unpin,
",1,["rayon::iter::fold::Fold"]],["impl<I, ID, F> Unpin for FoldChunks<I, ID, F>
where\n F: Unpin,\n I: Unpin,\n ID: Unpin,
",1,["rayon::iter::fold_chunks::FoldChunks"]],["impl<I, INIT, F> Unpin for MapInit<I, INIT, F>
where\n F: Unpin,\n I: Unpin,\n INIT: Unpin,
",1,["rayon::iter::map_with::MapInit"]],["impl<I, J> Unpin for Interleave<I, J>
where\n I: Unpin,\n J: Unpin,
",1,["rayon::iter::interleave::Interleave"]],["impl<I, J> Unpin for InterleaveShortest<I, J>
where\n I: Unpin,\n J: Unpin,
",1,["rayon::iter::interleave_shortest::InterleaveShortest"]],["impl<I, P> Unpin for Filter<I, P>
where\n I: Unpin,\n P: Unpin,
",1,["rayon::iter::filter::Filter"]],["impl<I, P> Unpin for FilterMap<I, P>
where\n I: Unpin,\n P: Unpin,
",1,["rayon::iter::filter_map::FilterMap"]],["impl<I, P> Unpin for Positions<I, P>
where\n I: Unpin,\n P: Unpin,
",1,["rayon::iter::positions::Positions"]],["impl<I, P> Unpin for SkipAnyWhile<I, P>
where\n I: Unpin,\n P: Unpin,
",1,["rayon::iter::skip_any_while::SkipAnyWhile"]],["impl<I, P> Unpin for TakeAnyWhile<I, P>
where\n I: Unpin,\n P: Unpin,
",1,["rayon::iter::take_any_while::TakeAnyWhile"]],["impl<I, T, F> Unpin for MapWith<I, T, F>
where\n F: Unpin,\n I: Unpin,\n T: Unpin,
",1,["rayon::iter::map_with::MapWith"]],["impl<I, U, F> Unpin for FoldChunksWith<I, U, F>
where\n F: Unpin,\n I: Unpin,\n U: Unpin,
",1,["rayon::iter::fold_chunks_with::FoldChunksWith"]],["impl<I, U, F> Unpin for FoldWith<I, U, F>
where\n F: Unpin,\n I: Unpin,\n U: Unpin,
",1,["rayon::iter::fold::FoldWith"]],["impl<I, U, F> Unpin for TryFoldWith<I, U, F>
where\n F: Unpin,\n I: Unpin,\n <U as Try>::Output: Unpin,
",1,["rayon::iter::try_fold::TryFoldWith"]],["impl<I, U, ID, F> Unpin for TryFold<I, U, ID, F>
where\n F: Unpin,\n I: Unpin,\n ID: Unpin,\n U: Unpin,
",1,["rayon::iter::try_fold::TryFold"]],["impl<Iter> Unpin for IterBridge<Iter>
where\n Iter: Unpin,
",1,["rayon::iter::par_bridge::IterBridge"]],["impl<K, V> Unpin for IntoIter<K, V>
where\n K: Unpin,\n V: Unpin,
",1,["rayon::collections::btree_map::IntoIter"]],["impl<K, V> Unpin for IntoIter<K, V>
where\n K: Unpin,\n V: Unpin,
",1,["rayon::collections::hash_map::IntoIter"]],["impl<S, B> Unpin for WalkTree<S, B>
where\n B: Unpin,\n S: Unpin,
",1,["rayon::iter::walk_tree::WalkTree"]],["impl<S, B> Unpin for WalkTreePostfix<S, B>
where\n B: Unpin,\n S: Unpin,
",1,["rayon::iter::walk_tree::WalkTreePostfix"]],["impl<S, B> Unpin for WalkTreePrefix<S, B>
where\n B: Unpin,\n S: Unpin,
",1,["rayon::iter::walk_tree::WalkTreePrefix"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::collections::binary_heap::IntoIter"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::collections::btree_set::IntoIter"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::collections::hash_set::IntoIter"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::collections::linked_list::IntoIter"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::collections::vec_deque::IntoIter"]],["impl<T> Unpin for Empty<T>
where\n T: Unpin,
",1,["rayon::iter::empty::Empty"]],["impl<T> Unpin for MultiZip<T>
where\n T: Unpin,
",1,["rayon::iter::multizip::MultiZip"]],["impl<T> Unpin for Once<T>
where\n T: Unpin,
",1,["rayon::iter::once::Once"]],["impl<T> Unpin for Repeat<T>
where\n T: Unpin,
",1,["rayon::iter::repeat::Repeat"]],["impl<T> Unpin for RepeatN<T>
where\n T: Unpin,
",1,["rayon::iter::repeat::RepeatN"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::option::IntoIter"]],["impl<T> Unpin for Iter<T>
where\n T: Unpin,
",1,["rayon::range::Iter"]],["impl<T> Unpin for Iter<T>
where\n T: Unpin,
",1,["rayon::range_inclusive::Iter"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::result::IntoIter"]],["impl<T> Unpin for IntoIter<T>
where\n T: Unpin,
",1,["rayon::vec::IntoIter"]],["impl<T, const N: usize> Unpin for IntoIter<T, N>
where\n T: Unpin,
",1,["rayon::array::IntoIter"]]], +"rayon_core":[["impl Unpin for Yield",1,["rayon_core::thread_pool::Yield"]],["impl Unpin for Configuration",1,["rayon_core::Configuration"]],["impl Unpin for FnContext",1,["rayon_core::FnContext"]],["impl Unpin for ThreadBuilder",1,["rayon_core::registry::ThreadBuilder"]],["impl Unpin for ThreadPool",1,["rayon_core::thread_pool::ThreadPool"]],["impl Unpin for ThreadPoolBuildError",1,["rayon_core::ThreadPoolBuildError"]],["impl<'a> Unpin for BroadcastContext<'a>",1,["rayon_core::broadcast::BroadcastContext"]],["impl<'scope> Unpin for Scope<'scope>",1,["rayon_core::scope::Scope"]],["impl<'scope> Unpin for ScopeFifo<'scope>",1,["rayon_core::scope::ScopeFifo"]],["impl<S> Unpin for ThreadPoolBuilder<S>
where\n S: Unpin,
",1,["rayon_core::ThreadPoolBuilder"]]], "read_fonts":[["impl Unpin for ReadError",1,["read_fonts::read::ReadError"]],["impl Unpin for BitmapDataFormat",1,["read_fonts::tables::bitmap::BitmapDataFormat"]],["impl Unpin for BitmapMetrics",1,["read_fonts::tables::bitmap::BitmapMetrics"]],["impl Unpin for MapVariant",1,["read_fonts::tables::cmap::MapVariant"]],["impl Unpin for PlatformId",1,["read_fonts::tables::cmap::PlatformId"]],["impl Unpin for CompositeMode",1,["read_fonts::tables::colr::CompositeMode"]],["impl Unpin for Extend",1,["read_fonts::tables::colr::Extend"]],["impl Unpin for GlyphClassDef",1,["read_fonts::tables::gdef::GlyphClassDef"]],["impl Unpin for Opcode",1,["read_fonts::tables::glyf::bytecode::opcode::Opcode"]],["impl Unpin for Anchor",1,["read_fonts::tables::glyf::Anchor"]],["impl Unpin for ToPathError",1,["read_fonts::tables::glyf::ToPathError"]],["impl Unpin for ToPathStyle",1,["read_fonts::tables::glyf::ToPathStyle"]],["impl Unpin for DeltaFormat",1,["read_fonts::tables::layout::DeltaFormat"]],["impl Unpin for Encoding",1,["read_fonts::tables::name::Encoding"]],["impl Unpin for Entry",1,["read_fonts::tables::postscript::dict::Entry"]],["impl Unpin for Operator",1,["read_fonts::tables::postscript::dict::Operator"]],["impl Unpin for Token",1,["read_fonts::tables::postscript::dict::Token"]],["impl Unpin for Error",1,["read_fonts::tables::postscript::Error"]],["impl Unpin for Number",1,["read_fonts::tables::postscript::stack::Number"]],["impl Unpin for TableRecord",1,["read_fonts::TableRecord"]],["impl Unpin for AxisValueMap",1,["read_fonts::tables::avar::AxisValueMap"]],["impl Unpin for BaseLangSysRecord",1,["read_fonts::tables::base::BaseLangSysRecord"]],["impl Unpin for BaseScriptRecord",1,["read_fonts::tables::base::BaseScriptRecord"]],["impl Unpin for FeatMinMaxRecord",1,["read_fonts::tables::base::FeatMinMaxRecord"]],["impl Unpin for BdtComponent",1,["read_fonts::tables::bitmap::BdtComponent"]],["impl Unpin for BigGlyphMetrics",1,["read_fonts::tables::bitmap::BigGlyphMetrics"]],["impl Unpin for BitmapFlags",1,["read_fonts::tables::bitmap::BitmapFlags"]],["impl Unpin for BitmapLocation",1,["read_fonts::tables::bitmap::BitmapLocation"]],["impl Unpin for BitmapSize",1,["read_fonts::tables::bitmap::BitmapSize"]],["impl Unpin for GlyphIdOffsetPair",1,["read_fonts::tables::bitmap::GlyphIdOffsetPair"]],["impl Unpin for SbitLineMetrics",1,["read_fonts::tables::bitmap::SbitLineMetrics"]],["impl Unpin for SmallGlyphMetrics",1,["read_fonts::tables::bitmap::SmallGlyphMetrics"]],["impl Unpin for ConstantMapGroup",1,["read_fonts::tables::cmap::ConstantMapGroup"]],["impl Unpin for EncodingRecord",1,["read_fonts::tables::cmap::EncodingRecord"]],["impl Unpin for SequentialMapGroup",1,["read_fonts::tables::cmap::SequentialMapGroup"]],["impl Unpin for SubHeader",1,["read_fonts::tables::cmap::SubHeader"]],["impl Unpin for UnicodeRange",1,["read_fonts::tables::cmap::UnicodeRange"]],["impl Unpin for UvsMapping",1,["read_fonts::tables::cmap::UvsMapping"]],["impl Unpin for VariationSelector",1,["read_fonts::tables::cmap::VariationSelector"]],["impl Unpin for BaseGlyph",1,["read_fonts::tables::colr::BaseGlyph"]],["impl Unpin for BaseGlyphPaint",1,["read_fonts::tables::colr::BaseGlyphPaint"]],["impl Unpin for Clip",1,["read_fonts::tables::colr::Clip"]],["impl Unpin for ColorIndex",1,["read_fonts::tables::colr::ColorIndex"]],["impl Unpin for ColorStop",1,["read_fonts::tables::colr::ColorStop"]],["impl Unpin for Layer",1,["read_fonts::tables::colr::Layer"]],["impl Unpin for VarColorIndex",1,["read_fonts::tables::colr::VarColorIndex"]],["impl Unpin for VarColorStop",1,["read_fonts::tables::colr::VarColorStop"]],["impl Unpin for ColorRecord",1,["read_fonts::tables::cpal::ColorRecord"]],["impl Unpin for PaletteType",1,["read_fonts::tables::cpal::PaletteType"]],["impl Unpin for CvtDelta",1,["read_fonts::tables::cvar::CvtDelta"]],["impl Unpin for VariationAxisRecord",1,["read_fonts::tables::fvar::VariationAxisRecord"]],["impl Unpin for GaspRange",1,["read_fonts::tables::gasp::GaspRange"]],["impl Unpin for GaspRangeBehavior",1,["read_fonts::tables::gasp::GaspRangeBehavior"]],["impl Unpin for DecodeError",1,["read_fonts::tables::glyf::bytecode::decode::DecodeError"]],["impl Unpin for Component",1,["read_fonts::tables::glyf::Component"]],["impl Unpin for CompositeGlyphFlags",1,["read_fonts::tables::glyf::CompositeGlyphFlags"]],["impl Unpin for CurvePoint",1,["read_fonts::tables::glyf::CurvePoint"]],["impl Unpin for PointFlags",1,["read_fonts::tables::glyf::PointFlags"]],["impl Unpin for PointMarker",1,["read_fonts::tables::glyf::PointMarker"]],["impl Unpin for SimpleGlyphFlags",1,["read_fonts::tables::glyf::SimpleGlyphFlags"]],["impl Unpin for Transform",1,["read_fonts::tables::glyf::Transform"]],["impl Unpin for Class2Record",1,["read_fonts::tables::gpos::Class2Record"]],["impl Unpin for EntryExitRecord",1,["read_fonts::tables::gpos::EntryExitRecord"]],["impl Unpin for MarkRecord",1,["read_fonts::tables::gpos::MarkRecord"]],["impl Unpin for PairValueRecord",1,["read_fonts::tables::gpos::PairValueRecord"]],["impl Unpin for ValueFormat",1,["read_fonts::tables::gpos::ValueFormat"]],["impl Unpin for ValueRecord",1,["read_fonts::tables::gpos::value_record::ValueRecord"]],["impl Unpin for GlyphDelta",1,["read_fonts::tables::gvar::GlyphDelta"]],["impl Unpin for GvarFlags",1,["read_fonts::tables::gvar::GvarFlags"]],["impl Unpin for U16Or32",1,["read_fonts::tables::gvar::U16Or32"]],["impl Unpin for MacStyle",1,["read_fonts::tables::head::MacStyle"]],["impl Unpin for LongMetric",1,["read_fonts::tables::hmtx::LongMetric"]],["impl Unpin for ClassRangeRecord",1,["read_fonts::tables::layout::ClassRangeRecord"]],["impl Unpin for FeatureRecord",1,["read_fonts::tables::layout::FeatureRecord"]],["impl Unpin for FeatureTableSubstitutionRecord",1,["read_fonts::tables::layout::FeatureTableSubstitutionRecord"]],["impl Unpin for FeatureVariationRecord",1,["read_fonts::tables::layout::FeatureVariationRecord"]],["impl Unpin for LangSysRecord",1,["read_fonts::tables::layout::LangSysRecord"]],["impl Unpin for LookupFlag",1,["read_fonts::tables::layout::lookupflag::LookupFlag"]],["impl Unpin for RangeRecord",1,["read_fonts::tables::layout::RangeRecord"]],["impl Unpin for ScriptRecord",1,["read_fonts::tables::layout::ScriptRecord"]],["impl Unpin for SequenceLookupRecord",1,["read_fonts::tables::layout::SequenceLookupRecord"]],["impl Unpin for ValueRecord",1,["read_fonts::tables::mvar::ValueRecord"]],["impl Unpin for LangTagRecord",1,["read_fonts::tables::name::LangTagRecord"]],["impl Unpin for MacRomanMapping",1,["read_fonts::tables::name::MacRomanMapping"]],["impl Unpin for NameRecord",1,["read_fonts::tables::name::NameRecord"]],["impl Unpin for SelectionFlags",1,["read_fonts::tables::os2::SelectionFlags"]],["impl Unpin for Blues",1,["read_fonts::tables::postscript::dict::Blues"]],["impl Unpin for StemSnaps",1,["read_fonts::tables::postscript::dict::StemSnaps"]],["impl Unpin for FdSelectRange3",1,["read_fonts::tables::postscript::FdSelectRange3"]],["impl Unpin for FdSelectRange4",1,["read_fonts::tables::postscript::FdSelectRange4"]],["impl Unpin for Stack",1,["read_fonts::tables::postscript::stack::Stack"]],["impl Unpin for StringId",1,["read_fonts::tables::postscript::string::StringId"]],["impl Unpin for HeaderFlags",1,["read_fonts::tables::sbix::HeaderFlags"]],["impl Unpin for AxisRecord",1,["read_fonts::tables::stat::AxisRecord"]],["impl Unpin for AxisValueRecord",1,["read_fonts::tables::stat::AxisValueRecord"]],["impl Unpin for AxisValueTableFlags",1,["read_fonts::tables::stat::AxisValueTableFlags"]],["impl Unpin for DeltaSetIndex",1,["read_fonts::tables::variations::DeltaSetIndex"]],["impl Unpin for EntryFormat",1,["read_fonts::tables::variations::EntryFormat"]],["impl Unpin for FloatItemDelta",1,["read_fonts::tables::variations::FloatItemDelta"]],["impl Unpin for RegionAxisCoordinates",1,["read_fonts::tables::variations::RegionAxisCoordinates"]],["impl Unpin for TupleIndex",1,["read_fonts::tables::variations::TupleIndex"]],["impl Unpin for TupleVariationCount",1,["read_fonts::tables::variations::TupleVariationCount"]],["impl<'a> Unpin for FileRef<'a>",1,["read_fonts::FileRef"]],["impl<'a> Unpin for BaseCoord<'a>",1,["read_fonts::tables::base::BaseCoord"]],["impl<'a> Unpin for BitmapContent<'a>",1,["read_fonts::tables::bitmap::BitmapContent"]],["impl<'a> Unpin for IndexSubtable<'a>",1,["read_fonts::tables::bitmap::IndexSubtable"]],["impl<'a> Unpin for CmapSubtable<'a>",1,["read_fonts::tables::cmap::CmapSubtable"]],["impl<'a> Unpin for ClipBox<'a>",1,["read_fonts::tables::colr::ClipBox"]],["impl<'a> Unpin for Paint<'a>",1,["read_fonts::tables::colr::Paint"]],["impl<'a> Unpin for CaretValue<'a>",1,["read_fonts::tables::gdef::CaretValue"]],["impl<'a> Unpin for Glyph<'a>",1,["read_fonts::tables::glyf::Glyph"]],["impl<'a> Unpin for AnchorTable<'a>",1,["read_fonts::tables::gpos::AnchorTable"]],["impl<'a> Unpin for ExtensionSubtable<'a>",1,["read_fonts::tables::gpos::ExtensionSubtable"]],["impl<'a> Unpin for PairPos<'a>",1,["read_fonts::tables::gpos::PairPos"]],["impl<'a> Unpin for PositionLookup<'a>",1,["read_fonts::tables::gpos::PositionLookup"]],["impl<'a> Unpin for PositionSubtables<'a>",1,["read_fonts::tables::gpos::PositionSubtables"]],["impl<'a> Unpin for SinglePos<'a>",1,["read_fonts::tables::gpos::SinglePos"]],["impl<'a> Unpin for ExtensionSubtable<'a>",1,["read_fonts::tables::gsub::ExtensionSubtable"]],["impl<'a> Unpin for SingleSubst<'a>",1,["read_fonts::tables::gsub::SingleSubst"]],["impl<'a> Unpin for SubstitutionLookup<'a>",1,["read_fonts::tables::gsub::SubstitutionLookup"]],["impl<'a> Unpin for SubstitutionSubtables<'a>",1,["read_fonts::tables::gsub::SubstitutionSubtables"]],["impl<'a> Unpin for ChainedSequenceContext<'a>",1,["read_fonts::tables::layout::ChainedSequenceContext"]],["impl<'a> Unpin for ClassDef<'a>",1,["read_fonts::tables::layout::ClassDef"]],["impl<'a> Unpin for CoverageTable<'a>",1,["read_fonts::tables::layout::CoverageTable"]],["impl<'a> Unpin for DeviceOrVariationIndex<'a>",1,["read_fonts::tables::layout::DeviceOrVariationIndex"]],["impl<'a> Unpin for FeatureParams<'a>",1,["read_fonts::tables::layout::FeatureParams"]],["impl<'a> Unpin for SequenceContext<'a>",1,["read_fonts::tables::layout::SequenceContext"]],["impl<'a> Unpin for Loca<'a>",1,["read_fonts::tables::loca::Loca"]],["impl<'a> Unpin for FdSelect<'a>",1,["read_fonts::tables::postscript::FdSelect"]],["impl<'a> Unpin for Index<'a>",1,["read_fonts::tables::postscript::index::Index"]],["impl<'a> Unpin for AxisValue<'a>",1,["read_fonts::tables::stat::AxisValue"]],["impl<'a> Unpin for DeltaSetIndexMap<'a>",1,["read_fonts::tables::variations::DeltaSetIndexMap"]],["impl<'a> Unpin for CollectionRef<'a>",1,["read_fonts::CollectionRef"]],["impl<'a> Unpin for FontData<'a>",1,["read_fonts::font_data::FontData"]],["impl<'a> Unpin for FontRef<'a>",1,["read_fonts::FontRef"]],["impl<'a> Unpin for SegmentMaps<'a>",1,["read_fonts::tables::avar::SegmentMaps"]],["impl<'a> Unpin for BitmapData<'a>",1,["read_fonts::tables::bitmap::BitmapData"]],["impl<'a> Unpin for Cff<'a>",1,["read_fonts::tables::cff::Cff"]],["impl<'a> Unpin for Cff2<'a>",1,["read_fonts::tables::cff2::Cff2"]],["impl<'a> Unpin for Cmap12Iter<'a>",1,["read_fonts::tables::cmap::Cmap12Iter"]],["impl<'a> Unpin for Cmap14Iter<'a>",1,["read_fonts::tables::cmap::Cmap14Iter"]],["impl<'a> Unpin for Cmap4Iter<'a>",1,["read_fonts::tables::cmap::Cmap4Iter"]],["impl<'a> Unpin for InstanceRecord<'a>",1,["read_fonts::tables::fvar::instance_record::InstanceRecord"]],["impl<'a> Unpin for Decoder<'a>",1,["read_fonts::tables::glyf::bytecode::decode::Decoder"]],["impl<'a> Unpin for InlineOperands<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::InlineOperands"]],["impl<'a> Unpin for Instruction<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::Instruction"]],["impl<'a> Unpin for BaseRecord<'a>",1,["read_fonts::tables::gpos::BaseRecord"]],["impl<'a> Unpin for Class1Record<'a>",1,["read_fonts::tables::gpos::Class1Record"]],["impl<'a> Unpin for ComponentRecord<'a>",1,["read_fonts::tables::gpos::ComponentRecord"]],["impl<'a> Unpin for Mark2Record<'a>",1,["read_fonts::tables::gpos::Mark2Record"]],["impl<'a> Unpin for CharIter<'a>",1,["read_fonts::tables::name::CharIter"]],["impl<'a> Unpin for NameString<'a>",1,["read_fonts::tables::name::NameString"]],["impl<'a> Unpin for PString<'a>",1,["read_fonts::tables::post::PString"]],["impl<'a> Unpin for BlendState<'a>",1,["read_fonts::tables::postscript::blend::BlendState"]],["impl<'a> Unpin for Latin1String<'a>",1,["read_fonts::tables::postscript::string::Latin1String"]],["impl<'a> Unpin for DeltaRunIter<'a>",1,["read_fonts::tables::variations::DeltaRunIter"]],["impl<'a> Unpin for PackedDeltas<'a>",1,["read_fonts::tables::variations::PackedDeltas"]],["impl<'a> Unpin for PackedPointNumbers<'a>",1,["read_fonts::tables::variations::PackedPointNumbers"]],["impl<'a> Unpin for PackedPointNumbersIter<'a>",1,["read_fonts::tables::variations::PackedPointNumbersIter"]],["impl<'a> Unpin for Tuple<'a>",1,["read_fonts::tables::variations::Tuple"]],["impl<'a> Unpin for TupleVariationHeaderIter<'a>",1,["read_fonts::tables::variations::TupleVariationHeaderIter"]],["impl<'a> Unpin for VariationRegion<'a>",1,["read_fonts::tables::variations::VariationRegion"]],["impl<'a, P> Unpin for PenSink<'a, P>",1,["read_fonts::tables::postscript::charstring::PenSink"]],["impl<'a, T> Unpin for ComputedArray<'a, T>
where\n <T as ReadArgs>::Args: Unpin,
",1,["read_fonts::array::ComputedArray"]],["impl<'a, T> Unpin for VarLenArray<'a, T>",1,["read_fonts::array::VarLenArray"]],["impl<'a, T> Unpin for TableRef<'a, T>
where\n T: Unpin,
",1,["read_fonts::table_ref::TableRef"]],["impl<'a, T> Unpin for TupleDeltaIter<'a, T>",1,["read_fonts::tables::variations::TupleDeltaIter"]],["impl<'a, T> Unpin for TupleVariation<'a, T>",1,["read_fonts::tables::variations::TupleVariation"]],["impl<'a, T> Unpin for TupleVariationData<'a, T>",1,["read_fonts::tables::variations::TupleVariationData"]],["impl<'a, T> Unpin for TupleVariationIter<'a, T>",1,["read_fonts::tables::variations::TupleVariationIter"]],["impl<'a, T, Ext> Unpin for Subtables<'a, T, Ext>",1,["read_fonts::tables::layout::Subtables"]],["impl<'a, T, O> Unpin for ArrayOfNullableOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Unpin,
",1,["read_fonts::offset_array::ArrayOfNullableOffsets"]],["impl<'a, T, O> Unpin for ArrayOfOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: Unpin,
",1,["read_fonts::offset_array::ArrayOfOffsets"]]], "roxmltree":[["impl Unpin for Error",1,["roxmltree::parse::Error"]],["impl Unpin for NodeType",1,["roxmltree::NodeType"]],["impl Unpin for NodeId",1,["roxmltree::NodeId"]],["impl Unpin for ParsingOptions",1,["roxmltree::parse::ParsingOptions"]],["impl Unpin for TextPos",1,["roxmltree::TextPos"]],["impl<'a, 'b> Unpin for ExpandedName<'a, 'b>",1,["roxmltree::ExpandedName"]],["impl<'a, 'input> Unpin for Attribute<'a, 'input>",1,["roxmltree::Attribute"]],["impl<'a, 'input> Unpin for Attributes<'a, 'input>",1,["roxmltree::Attributes"]],["impl<'a, 'input> Unpin for AxisIter<'a, 'input>",1,["roxmltree::AxisIter"]],["impl<'a, 'input> Unpin for Children<'a, 'input>",1,["roxmltree::Children"]],["impl<'a, 'input> Unpin for Descendants<'a, 'input>",1,["roxmltree::Descendants"]],["impl<'a, 'input> Unpin for NamespaceIter<'a, 'input>",1,["roxmltree::NamespaceIter"]],["impl<'a, 'input> Unpin for Node<'a, 'input>",1,["roxmltree::Node"]],["impl<'input> Unpin for StringStorage<'input>",1,["roxmltree::StringStorage"]],["impl<'input> Unpin for Document<'input>",1,["roxmltree::Document"]],["impl<'input> Unpin for Namespace<'input>",1,["roxmltree::Namespace"]],["impl<'input> Unpin for PI<'input>",1,["roxmltree::PI"]]], "rustc_hash":[["impl Unpin for FxHasher",1,["rustc_hash::FxHasher"]]], diff --git a/trait.impl/core/ops/deref/trait.Deref.js b/trait.impl/core/ops/deref/trait.Deref.js index 135ca976a3..0ef5f3a8cb 100644 --- a/trait.impl/core/ops/deref/trait.Deref.js +++ b/trait.impl/core/ops/deref/trait.Deref.js @@ -1,6 +1,9 @@ (function() {var implementors = { "bytemuck":[["impl Deref for BoxBytes"]], "cosmic_text":[["impl<'a, T> Deref for BorrowedWithFontSystem<'a, T>"]], +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> Deref for Owned<T>"]], +"crossbeam_utils":[["impl<T> Deref for CachePadded<T>"],["impl<T: ?Sized> Deref for ShardedLockReadGuard<'_, T>"],["impl<T: ?Sized> Deref for ShardedLockWriteGuard<'_, T>"]], +"either":[["impl<L, R> Deref for Either<L, R>
where\n L: Deref,\n R: Deref<Target = L::Target>,
"]], "memmap2":[["impl Deref for Mmap"],["impl Deref for MmapMut"]], "read_fonts":[["impl<'a> Deref for PString<'a>"]], "roxmltree":[["impl Deref for StringStorage<'_>"]], diff --git a/trait.impl/core/ops/deref/trait.DerefMut.js b/trait.impl/core/ops/deref/trait.DerefMut.js index abd39bf756..6ce9eb094c 100644 --- a/trait.impl/core/ops/deref/trait.DerefMut.js +++ b/trait.impl/core/ops/deref/trait.DerefMut.js @@ -1,6 +1,9 @@ (function() {var implementors = { "bytemuck":[["impl DerefMut for BoxBytes"]], "cosmic_text":[["impl<'a, T> DerefMut for BorrowedWithFontSystem<'a, T>"]], +"crossbeam_epoch":[["impl<T: ?Sized + Pointable> DerefMut for Owned<T>"]], +"crossbeam_utils":[["impl<T> DerefMut for CachePadded<T>"],["impl<T: ?Sized> DerefMut for ShardedLockWriteGuard<'_, T>"]], +"either":[["impl<L, R> DerefMut for Either<L, R>
where\n L: DerefMut,\n R: DerefMut<Target = L::Target>,
"]], "memmap2":[["impl DerefMut for MmapMut"]], "rustybuzz":[["impl<'a> DerefMut for Face<'a>"]], "smallvec":[["impl<A: Array> DerefMut for SmallVec<A>"]], diff --git a/trait.impl/core/ops/drop/trait.Drop.js b/trait.impl/core/ops/drop/trait.Drop.js index e35badb4fd..1f219a394e 100644 --- a/trait.impl/core/ops/drop/trait.Drop.js +++ b/trait.impl/core/ops/drop/trait.Drop.js @@ -1,5 +1,10 @@ (function() {var implementors = { "bytemuck":[["impl Drop for BoxBytes"]], +"crossbeam_deque":[["impl<T> Drop for Injector<T>"]], +"crossbeam_epoch":[["impl Drop for Guard"],["impl Drop for LocalHandle"],["impl<T: ?Sized + Pointable> Drop for Owned<T>"]], +"crossbeam_utils":[["impl Drop for WaitGroup"],["impl<T> Drop for AtomicCell<T>"],["impl<T: ?Sized> Drop for ShardedLockWriteGuard<'_, T>"]], +"rayon":[["impl<'a> Drop for Drain<'a>"],["impl<'a, T: Ord + Send> Drop for Drain<'a, T>"],["impl<'a, T: Send> Drop for Drain<'a, T>"],["impl<'data, T: Send> Drop for Drain<'data, T>"]], +"rayon_core":[["impl Drop for ThreadPool"]], "slotmap":[["impl<'a, K: Key, V> Drop for Drain<'a, K, V>"],["impl<'a, K: Key, V> Drop for Drain<'a, K, V>"],["impl<'a, K: Key, V> Drop for Drain<'a, K, V>"],["impl<'a, K: Key, V> Drop for Drain<'a, K, V>"]], "smallvec":[["impl<'a, T: 'a + Array> Drop for Drain<'a, T>"],["impl<A: Array> Drop for IntoIter<A>"],["impl<A: Array> Drop for SmallVec<A>"]], "syn":[["impl<'a> Drop for ParseBuffer<'a>"]], diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index ba2e911e9e..1d55cd91e4 100644 --- a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -2,6 +2,10 @@ "bitflags":[["impl RefUnwindSafe for ParseError",1,["bitflags::parser::ParseError"]],["impl<B> RefUnwindSafe for Iter<B>
where\n B: RefUnwindSafe,
",1,["bitflags::iter::Iter"]],["impl<B> RefUnwindSafe for IterNames<B>
where\n B: RefUnwindSafe,
",1,["bitflags::iter::IterNames"]],["impl<B> RefUnwindSafe for Flag<B>
where\n B: RefUnwindSafe,
",1,["bitflags::traits::Flag"]]], "bytemuck":[["impl RefUnwindSafe for CheckedCastError",1,["bytemuck::checked::CheckedCastError"]],["impl RefUnwindSafe for PodCastError",1,["bytemuck::PodCastError"]],["impl RefUnwindSafe for BoxBytes",1,["bytemuck::allocation::BoxBytes"]]], "cosmic_text":[["impl !RefUnwindSafe for Font",1,["cosmic_text::font::Font"]],["impl !RefUnwindSafe for FontSystem",1,["cosmic_text::font::system::FontSystem"]],["impl RefUnwindSafe for Action",1,["cosmic_text::edit::Action"]],["impl RefUnwindSafe for Affinity",1,["cosmic_text::cursor::Affinity"]],["impl RefUnwindSafe for Align",1,["cosmic_text::layout::Align"]],["impl RefUnwindSafe for FamilyOwned",1,["cosmic_text::attrs::FamilyOwned"]],["impl RefUnwindSafe for LineEnding",1,["cosmic_text::line_ending::LineEnding"]],["impl RefUnwindSafe for Motion",1,["cosmic_text::cursor::Motion"]],["impl RefUnwindSafe for Selection",1,["cosmic_text::edit::Selection"]],["impl RefUnwindSafe for Shaping",1,["cosmic_text::shape::Shaping"]],["impl RefUnwindSafe for SubpixelBin",1,["cosmic_text::glyph_cache::SubpixelBin"]],["impl RefUnwindSafe for Wrap",1,["cosmic_text::layout::Wrap"]],["impl RefUnwindSafe for AttrsList",1,["cosmic_text::attrs::AttrsList"]],["impl RefUnwindSafe for AttrsOwned",1,["cosmic_text::attrs::AttrsOwned"]],["impl RefUnwindSafe for Buffer",1,["cosmic_text::buffer::Buffer"]],["impl RefUnwindSafe for BufferLine",1,["cosmic_text::buffer_line::BufferLine"]],["impl RefUnwindSafe for CacheKey",1,["cosmic_text::glyph_cache::CacheKey"]],["impl RefUnwindSafe for CacheKeyFlags",1,["cosmic_text::glyph_cache::CacheKeyFlags"]],["impl RefUnwindSafe for Change",1,["cosmic_text::edit::Change"]],["impl RefUnwindSafe for ChangeItem",1,["cosmic_text::edit::ChangeItem"]],["impl RefUnwindSafe for Color",1,["cosmic_text::attrs::Color"]],["impl RefUnwindSafe for Cursor",1,["cosmic_text::cursor::Cursor"]],["impl RefUnwindSafe for FontMatchAttrs",1,["cosmic_text::attrs::FontMatchAttrs"]],["impl RefUnwindSafe for FontMatchKey",1,["cosmic_text::font::system::FontMatchKey"]],["impl RefUnwindSafe for LayoutCursor",1,["cosmic_text::cursor::LayoutCursor"]],["impl RefUnwindSafe for LayoutGlyph",1,["cosmic_text::layout::LayoutGlyph"]],["impl RefUnwindSafe for LayoutLine",1,["cosmic_text::layout::LayoutLine"]],["impl RefUnwindSafe for Metrics",1,["cosmic_text::buffer::Metrics"]],["impl RefUnwindSafe for PhysicalGlyph",1,["cosmic_text::layout::PhysicalGlyph"]],["impl RefUnwindSafe for Scroll",1,["cosmic_text::cursor::Scroll"]],["impl RefUnwindSafe for ShapeBuffer",1,["cosmic_text::shape::ShapeBuffer"]],["impl RefUnwindSafe for ShapeGlyph",1,["cosmic_text::shape::ShapeGlyph"]],["impl RefUnwindSafe for ShapeLine",1,["cosmic_text::shape::ShapeLine"]],["impl RefUnwindSafe for ShapeRunCache",1,["cosmic_text::shape_run_cache::ShapeRunCache"]],["impl RefUnwindSafe for ShapeRunKey",1,["cosmic_text::shape_run_cache::ShapeRunKey"]],["impl RefUnwindSafe for ShapeSpan",1,["cosmic_text::shape::ShapeSpan"]],["impl RefUnwindSafe for ShapeWord",1,["cosmic_text::shape::ShapeWord"]],["impl RefUnwindSafe for SwashCache",1,["cosmic_text::swash::SwashCache"]],["impl<'a> RefUnwindSafe for Attrs<'a>",1,["cosmic_text::attrs::Attrs"]],["impl<'a> RefUnwindSafe for LayoutRun<'a>",1,["cosmic_text::buffer::LayoutRun"]],["impl<'a> RefUnwindSafe for LineIter<'a>",1,["cosmic_text::line_ending::LineIter"]],["impl<'a, T> !RefUnwindSafe for BorrowedWithFontSystem<'a, T>",1,["cosmic_text::font::system::BorrowedWithFontSystem"]],["impl<'b> RefUnwindSafe for LayoutRunIter<'b>",1,["cosmic_text::buffer::LayoutRunIter"]],["impl<'buffer> RefUnwindSafe for BufferRef<'buffer>",1,["cosmic_text::edit::BufferRef"]],["impl<'buffer> RefUnwindSafe for Editor<'buffer>",1,["cosmic_text::edit::editor::Editor"]],["impl<'text> RefUnwindSafe for BidiParagraphs<'text>",1,["cosmic_text::bidi_para::BidiParagraphs"]]], +"crossbeam_deque":[["impl<T> !RefUnwindSafe for Worker<T>",1,["crossbeam_deque::deque::Worker"]],["impl<T> RefUnwindSafe for Steal<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_deque::deque::Steal"]],["impl<T> RefUnwindSafe for Injector<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_deque::deque::Injector"]],["impl<T> RefUnwindSafe for Stealer<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_deque::deque::Stealer"]]], +"crossbeam_epoch":[["impl !RefUnwindSafe for Collector",1,["crossbeam_epoch::collector::Collector"]],["impl !RefUnwindSafe for Guard",1,["crossbeam_epoch::guard::Guard"]],["impl !RefUnwindSafe for LocalHandle",1,["crossbeam_epoch::collector::LocalHandle"]],["impl<'g, T: ?Sized> RefUnwindSafe for Shared<'g, T>
where\n T: RefUnwindSafe,
",1,["crossbeam_epoch::atomic::Shared"]],["impl<'g, T: ?Sized, P> RefUnwindSafe for CompareExchangeError<'g, T, P>
where\n P: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["crossbeam_epoch::atomic::CompareExchangeError"]],["impl<T: ?Sized> RefUnwindSafe for Atomic<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_epoch::atomic::Atomic"]],["impl<T: ?Sized> RefUnwindSafe for Owned<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_epoch::atomic::Owned"]]], +"crossbeam_utils":[["impl !RefUnwindSafe for Backoff",1,["crossbeam_utils::backoff::Backoff"]],["impl RefUnwindSafe for Parker",1,["crossbeam_utils::sync::parker::Parker"]],["impl RefUnwindSafe for Unparker",1,["crossbeam_utils::sync::parker::Unparker"]],["impl RefUnwindSafe for WaitGroup",1,["crossbeam_utils::sync::wait_group::WaitGroup"]],["impl<'a, T: ?Sized> RefUnwindSafe for ShardedLockReadGuard<'a, T>
where\n T: RefUnwindSafe,
",1,["crossbeam_utils::sync::sharded_lock::ShardedLockReadGuard"]],["impl<'a, T: ?Sized> RefUnwindSafe for ShardedLockWriteGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockWriteGuard"]],["impl<'env> RefUnwindSafe for Scope<'env>",1,["crossbeam_utils::thread::Scope"]],["impl<'scope, 'env> RefUnwindSafe for ScopedThreadBuilder<'scope, 'env>",1,["crossbeam_utils::thread::ScopedThreadBuilder"]],["impl<'scope, T> RefUnwindSafe for ScopedJoinHandle<'scope, T>",1,["crossbeam_utils::thread::ScopedJoinHandle"]],["impl<T> RefUnwindSafe for AtomicCell<T>"],["impl<T> RefUnwindSafe for CachePadded<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_utils::cache_padded::CachePadded"]],["impl<T: ?Sized> RefUnwindSafe for ShardedLock<T>"]], +"either":[["impl<L, R> RefUnwindSafe for Either<L, R>
where\n L: RefUnwindSafe,\n R: RefUnwindSafe,
",1,["either::Either"]],["impl<L, R> RefUnwindSafe for IterEither<L, R>
where\n L: RefUnwindSafe,\n R: RefUnwindSafe,
",1,["either::iterator::IterEither"]]], "font_types":[["impl RefUnwindSafe for InvalidTag",1,["font_types::tag::InvalidTag"]],["impl RefUnwindSafe for PenCommand",1,["font_types::pen::PenCommand"]],["impl RefUnwindSafe for F26Dot6",1,["font_types::fixed::F26Dot6"]],["impl RefUnwindSafe for F2Dot14",1,["font_types::fixed::F2Dot14"]],["impl RefUnwindSafe for FWord",1,["font_types::fword::FWord"]],["impl RefUnwindSafe for Fixed",1,["font_types::fixed::Fixed"]],["impl RefUnwindSafe for GlyphId",1,["font_types::glyph_id::GlyphId"]],["impl RefUnwindSafe for LongDateTime",1,["font_types::longdatetime::LongDateTime"]],["impl RefUnwindSafe for MajorMinor",1,["font_types::version::MajorMinor"]],["impl RefUnwindSafe for NameId",1,["font_types::name_id::NameId"]],["impl RefUnwindSafe for Offset16",1,["font_types::offset::Offset16"]],["impl RefUnwindSafe for Offset24",1,["font_types::offset::Offset24"]],["impl RefUnwindSafe for Offset32",1,["font_types::offset::Offset32"]],["impl RefUnwindSafe for Tag",1,["font_types::tag::Tag"]],["impl RefUnwindSafe for UfWord",1,["font_types::fword::UfWord"]],["impl RefUnwindSafe for Uint24",1,["font_types::uint24::Uint24"]],["impl RefUnwindSafe for Version16Dot16",1,["font_types::version::Version16Dot16"]],["impl<T> RefUnwindSafe for BigEndian<T>
where\n <T as Scalar>::Raw: RefUnwindSafe,
",1,["font_types::raw::BigEndian"]],["impl<T> RefUnwindSafe for BoundingBox<T>
where\n T: RefUnwindSafe,
",1,["font_types::bbox::BoundingBox"]],["impl<T> RefUnwindSafe for Nullable<T>
where\n T: RefUnwindSafe,
",1,["font_types::offset::Nullable"]],["impl<T> RefUnwindSafe for Point<T>
where\n T: RefUnwindSafe,
",1,["font_types::point::Point"]]], "fontconfig_parser":[["impl !RefUnwindSafe for Error",1,["fontconfig_parser::error::Error"]],["impl RefUnwindSafe for BinaryOp",1,["fontconfig_parser::types::value::BinaryOp"]],["impl RefUnwindSafe for ConfigPart",1,["fontconfig_parser::types::document::ConfigPart"]],["impl RefUnwindSafe for Constant",1,["fontconfig_parser::types::constant::Constant"]],["impl RefUnwindSafe for DirPrefix",1,["fontconfig_parser::types::dir::DirPrefix"]],["impl RefUnwindSafe for EditBinding",1,["fontconfig_parser::types::match_::edit::EditBinding"]],["impl RefUnwindSafe for EditMode",1,["fontconfig_parser::types::match_::edit::EditMode"]],["impl RefUnwindSafe for Expression",1,["fontconfig_parser::types::value::Expression"]],["impl RefUnwindSafe for FontMatch",1,["fontconfig_parser::types::selectfont::FontMatch"]],["impl RefUnwindSafe for IntOrRange",1,["fontconfig_parser::types::IntOrRange"]],["impl RefUnwindSafe for ListOp",1,["fontconfig_parser::types::value::ListOp"]],["impl RefUnwindSafe for MatchTarget",1,["fontconfig_parser::types::match_::MatchTarget"]],["impl RefUnwindSafe for PrefixBehavior",1,["fontconfig_parser::types::dir::PrefixBehavior"]],["impl RefUnwindSafe for Property",1,["fontconfig_parser::types::property::Property"]],["impl RefUnwindSafe for PropertyKind",1,["fontconfig_parser::types::property::PropertyKind"]],["impl RefUnwindSafe for PropertyTarget",1,["fontconfig_parser::types::value::PropertyTarget"]],["impl RefUnwindSafe for TernaryOp",1,["fontconfig_parser::types::value::TernaryOp"]],["impl RefUnwindSafe for TestCompare",1,["fontconfig_parser::types::match_::test::TestCompare"]],["impl RefUnwindSafe for TestQual",1,["fontconfig_parser::types::match_::test::TestQual"]],["impl RefUnwindSafe for TestTarget",1,["fontconfig_parser::types::match_::test::TestTarget"]],["impl RefUnwindSafe for UnaryOp",1,["fontconfig_parser::types::value::UnaryOp"]],["impl RefUnwindSafe for Value",1,["fontconfig_parser::types::value::Value"]],["impl RefUnwindSafe for Alias",1,["fontconfig_parser::types::alias::Alias"]],["impl RefUnwindSafe for CacheDir",1,["fontconfig_parser::types::dir::CacheDir"]],["impl RefUnwindSafe for Config",1,["fontconfig_parser::types::config::Config"]],["impl RefUnwindSafe for Dir",1,["fontconfig_parser::types::dir::Dir"]],["impl RefUnwindSafe for DirData",1,["fontconfig_parser::types::document::DirData"]],["impl RefUnwindSafe for Edit",1,["fontconfig_parser::types::match_::edit::Edit"]],["impl RefUnwindSafe for FontConfig",1,["fontconfig_parser::types::document::FontConfig"]],["impl RefUnwindSafe for Include",1,["fontconfig_parser::types::dir::Include"]],["impl RefUnwindSafe for Match",1,["fontconfig_parser::types::match_::Match"]],["impl RefUnwindSafe for RemapDir",1,["fontconfig_parser::types::dir::RemapDir"]],["impl RefUnwindSafe for RemapDirData",1,["fontconfig_parser::types::document::RemapDirData"]],["impl RefUnwindSafe for SelectFont",1,["fontconfig_parser::types::selectfont::SelectFont"]],["impl RefUnwindSafe for Test",1,["fontconfig_parser::types::match_::test::Test"]]], "fontdb":[["impl !RefUnwindSafe for Source",1,["fontdb::Source"]],["impl !RefUnwindSafe for Database",1,["fontdb::Database"]],["impl !RefUnwindSafe for FaceInfo",1,["fontdb::FaceInfo"]],["impl RefUnwindSafe for Style",1,["fontdb::Style"]],["impl RefUnwindSafe for ID",1,["fontdb::ID"]],["impl RefUnwindSafe for Weight",1,["fontdb::Weight"]],["impl<'a> RefUnwindSafe for Family<'a>",1,["fontdb::Family"]],["impl<'a> RefUnwindSafe for Query<'a>",1,["fontdb::Query"]]], @@ -11,6 +15,8 @@ "memmap2":[["impl RefUnwindSafe for Advice",1,["memmap2::advice::Advice"]],["impl RefUnwindSafe for UncheckedAdvice",1,["memmap2::advice::UncheckedAdvice"]],["impl RefUnwindSafe for Mmap",1,["memmap2::Mmap"]],["impl RefUnwindSafe for MmapMut",1,["memmap2::MmapMut"]],["impl RefUnwindSafe for MmapOptions",1,["memmap2::MmapOptions"]],["impl RefUnwindSafe for MmapRaw",1,["memmap2::MmapRaw"]],["impl RefUnwindSafe for MmapRawDescriptor",1,["memmap2::MmapRawDescriptor"]],["impl RefUnwindSafe for RemapOptions",1,["memmap2::RemapOptions"]]], "proc_macro2":[["impl RefUnwindSafe for Delimiter",1,["proc_macro2::Delimiter"]],["impl RefUnwindSafe for Spacing",1,["proc_macro2::Spacing"]],["impl RefUnwindSafe for TokenTree",1,["proc_macro2::TokenTree"]],["impl RefUnwindSafe for DelimSpan",1,["proc_macro2::extra::DelimSpan"]],["impl RefUnwindSafe for Group",1,["proc_macro2::Group"]],["impl RefUnwindSafe for Ident",1,["proc_macro2::Ident"]],["impl RefUnwindSafe for LexError",1,["proc_macro2::LexError"]],["impl RefUnwindSafe for Literal",1,["proc_macro2::Literal"]],["impl RefUnwindSafe for Punct",1,["proc_macro2::Punct"]],["impl RefUnwindSafe for Span",1,["proc_macro2::Span"]],["impl RefUnwindSafe for TokenStream",1,["proc_macro2::TokenStream"]],["impl RefUnwindSafe for IntoIter",1,["proc_macro2::token_stream::IntoIter"]]], "rangemap":[["impl<'a, K, V> RefUnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::Iter"]],["impl<'a, K, V> RefUnwindSafe for Gaps<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::Gaps"]],["impl<'a, K, V> RefUnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::Iter"]],["impl<'a, K, V, R> RefUnwindSafe for Overlapping<'a, K, V, R>
where\n K: RefUnwindSafe,\n R: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::Overlapping"]],["impl<'a, K, V, R> RefUnwindSafe for Overlapping<'a, K, V, R>
where\n K: RefUnwindSafe,\n R: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::Overlapping"]],["impl<'a, K, V, StepFnsT> RefUnwindSafe for Gaps<'a, K, V, StepFnsT>
where\n K: RefUnwindSafe,\n StepFnsT: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::Gaps"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::Iter"]],["impl<'a, T> RefUnwindSafe for Gaps<'a, T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::Gaps"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::Iter"]],["impl<'a, T, R> RefUnwindSafe for Overlapping<'a, T, R>
where\n R: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::Overlapping"]],["impl<'a, T, R> RefUnwindSafe for Overlapping<'a, T, R>
where\n R: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rangemap::set::Overlapping"]],["impl<'a, T, StepFnsT> RefUnwindSafe for Gaps<'a, T, StepFnsT>
where\n StepFnsT: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::Gaps"]],["impl<K, V> RefUnwindSafe for IntoIter<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::IntoIter"]],["impl<K, V> RefUnwindSafe for IntoIter<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::IntoIter"]],["impl<K, V> RefUnwindSafe for RangeMap<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::RangeMap"]],["impl<K, V, StepFnsT> RefUnwindSafe for RangeInclusiveMap<K, V, StepFnsT>
where\n K: RefUnwindSafe,\n StepFnsT: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::RangeInclusiveMap"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::IntoIter"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::IntoIter"]],["impl<T> RefUnwindSafe for RangeSet<T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::RangeSet"]],["impl<T, StepFnsT> RefUnwindSafe for RangeInclusiveSet<T, StepFnsT>
where\n StepFnsT: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::RangeInclusiveSet"]]], +"rayon":[["impl<'a> RefUnwindSafe for Drain<'a>",1,["rayon::string::Drain"]],["impl<'a, K, V> RefUnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::btree_map::Iter"]],["impl<'a, K, V> RefUnwindSafe for IterMut<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::btree_map::IterMut"]],["impl<'a, K, V> RefUnwindSafe for Drain<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::hash_map::Drain"]],["impl<'a, K, V> RefUnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::hash_map::Iter"]],["impl<'a, K, V> RefUnwindSafe for IterMut<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::hash_map::IterMut"]],["impl<'a, T> RefUnwindSafe for Drain<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::binary_heap::Drain"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::binary_heap::Iter"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::btree_set::Iter"]],["impl<'a, T> RefUnwindSafe for Drain<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::hash_set::Drain"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::hash_set::Iter"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::linked_list::Iter"]],["impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::linked_list::IterMut"]],["impl<'a, T> RefUnwindSafe for Drain<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::vec_deque::Drain"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::vec_deque::Iter"]],["impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::vec_deque::IterMut"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::option::Iter"]],["impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::option::IterMut"]],["impl<'a, T> RefUnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::result::Iter"]],["impl<'a, T> RefUnwindSafe for IterMut<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::result::IterMut"]],["impl<'ch> RefUnwindSafe for Bytes<'ch>",1,["rayon::str::Bytes"]],["impl<'ch> RefUnwindSafe for CharIndices<'ch>",1,["rayon::str::CharIndices"]],["impl<'ch> RefUnwindSafe for Chars<'ch>",1,["rayon::str::Chars"]],["impl<'ch> RefUnwindSafe for EncodeUtf16<'ch>",1,["rayon::str::EncodeUtf16"]],["impl<'ch> RefUnwindSafe for Lines<'ch>",1,["rayon::str::Lines"]],["impl<'ch> RefUnwindSafe for SplitAsciiWhitespace<'ch>",1,["rayon::str::SplitAsciiWhitespace"]],["impl<'ch> RefUnwindSafe for SplitWhitespace<'ch>",1,["rayon::str::SplitWhitespace"]],["impl<'ch, P> RefUnwindSafe for MatchIndices<'ch, P>
where\n P: RefUnwindSafe,
",1,["rayon::str::MatchIndices"]],["impl<'ch, P> RefUnwindSafe for Matches<'ch, P>
where\n P: RefUnwindSafe,
",1,["rayon::str::Matches"]],["impl<'ch, P> RefUnwindSafe for Split<'ch, P>
where\n P: RefUnwindSafe,
",1,["rayon::str::Split"]],["impl<'ch, P> RefUnwindSafe for SplitInclusive<'ch, P>
where\n P: RefUnwindSafe,
",1,["rayon::str::SplitInclusive"]],["impl<'ch, P> RefUnwindSafe for SplitTerminator<'ch, P>
where\n P: RefUnwindSafe,
",1,["rayon::str::SplitTerminator"]],["impl<'data, T> RefUnwindSafe for Chunks<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::chunks::Chunks"]],["impl<'data, T> RefUnwindSafe for ChunksExact<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::chunks::ChunksExact"]],["impl<'data, T> RefUnwindSafe for ChunksExactMut<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::chunks::ChunksExactMut"]],["impl<'data, T> RefUnwindSafe for ChunksMut<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::chunks::ChunksMut"]],["impl<'data, T> RefUnwindSafe for Iter<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::Iter"]],["impl<'data, T> RefUnwindSafe for IterMut<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::IterMut"]],["impl<'data, T> RefUnwindSafe for RChunks<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::rchunks::RChunks"]],["impl<'data, T> RefUnwindSafe for RChunksExact<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::rchunks::RChunksExact"]],["impl<'data, T> RefUnwindSafe for RChunksExactMut<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::rchunks::RChunksExactMut"]],["impl<'data, T> RefUnwindSafe for RChunksMut<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::rchunks::RChunksMut"]],["impl<'data, T> RefUnwindSafe for Windows<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::Windows"]],["impl<'data, T> RefUnwindSafe for Drain<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::vec::Drain"]],["impl<'data, T, P> RefUnwindSafe for ChunkBy<'data, T, P>
where\n P: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::chunk_by::ChunkBy"]],["impl<'data, T, P> RefUnwindSafe for ChunkByMut<'data, T, P>
where\n P: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::chunk_by::ChunkByMut"]],["impl<'data, T, P> RefUnwindSafe for Split<'data, T, P>
where\n P: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::Split"]],["impl<'data, T, P> RefUnwindSafe for SplitInclusive<'data, T, P>
where\n P: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::SplitInclusive"]],["impl<'data, T, P> RefUnwindSafe for SplitInclusiveMut<'data, T, P>
where\n P: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::SplitInclusiveMut"]],["impl<'data, T, P> RefUnwindSafe for SplitMut<'data, T, P>
where\n P: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::SplitMut"]],["impl<A, B> RefUnwindSafe for Chain<A, B>
where\n A: RefUnwindSafe,\n B: RefUnwindSafe,
",1,["rayon::iter::chain::Chain"]],["impl<A, B> RefUnwindSafe for Zip<A, B>
where\n A: RefUnwindSafe,\n B: RefUnwindSafe,
",1,["rayon::iter::zip::Zip"]],["impl<A, B> RefUnwindSafe for ZipEq<A, B>
where\n A: RefUnwindSafe,\n B: RefUnwindSafe,
",1,["rayon::iter::zip_eq::ZipEq"]],["impl<D, S> RefUnwindSafe for Split<D, S>
where\n D: RefUnwindSafe,\n S: RefUnwindSafe,
",1,["rayon::iter::splitter::Split"]],["impl<I> RefUnwindSafe for Chunks<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::chunks::Chunks"]],["impl<I> RefUnwindSafe for Cloned<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::cloned::Cloned"]],["impl<I> RefUnwindSafe for Copied<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::copied::Copied"]],["impl<I> RefUnwindSafe for Enumerate<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::enumerate::Enumerate"]],["impl<I> RefUnwindSafe for ExponentialBlocks<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::blocks::ExponentialBlocks"]],["impl<I> RefUnwindSafe for Flatten<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::flatten::Flatten"]],["impl<I> RefUnwindSafe for FlattenIter<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::flatten_iter::FlattenIter"]],["impl<I> RefUnwindSafe for Intersperse<I>",1,["rayon::iter::intersperse::Intersperse"]],["impl<I> RefUnwindSafe for MaxLen<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::len::MaxLen"]],["impl<I> RefUnwindSafe for MinLen<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::len::MinLen"]],["impl<I> RefUnwindSafe for PanicFuse<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::panic_fuse::PanicFuse"]],["impl<I> RefUnwindSafe for Rev<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::rev::Rev"]],["impl<I> RefUnwindSafe for Skip<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::skip::Skip"]],["impl<I> RefUnwindSafe for SkipAny<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::skip_any::SkipAny"]],["impl<I> RefUnwindSafe for StepBy<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::step_by::StepBy"]],["impl<I> RefUnwindSafe for Take<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::take::Take"]],["impl<I> RefUnwindSafe for TakeAny<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::take_any::TakeAny"]],["impl<I> RefUnwindSafe for UniformBlocks<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::blocks::UniformBlocks"]],["impl<I> RefUnwindSafe for WhileSome<I>
where\n I: RefUnwindSafe,
",1,["rayon::iter::while_some::WhileSome"]],["impl<I, F> RefUnwindSafe for FlatMap<I, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,
",1,["rayon::iter::flat_map::FlatMap"]],["impl<I, F> RefUnwindSafe for FlatMapIter<I, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,
",1,["rayon::iter::flat_map_iter::FlatMapIter"]],["impl<I, F> RefUnwindSafe for Inspect<I, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,
",1,["rayon::iter::inspect::Inspect"]],["impl<I, F> RefUnwindSafe for Map<I, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,
",1,["rayon::iter::map::Map"]],["impl<I, F> RefUnwindSafe for Update<I, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,
",1,["rayon::iter::update::Update"]],["impl<I, ID, F> RefUnwindSafe for Fold<I, ID, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,\n ID: RefUnwindSafe,
",1,["rayon::iter::fold::Fold"]],["impl<I, ID, F> RefUnwindSafe for FoldChunks<I, ID, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,\n ID: RefUnwindSafe,
",1,["rayon::iter::fold_chunks::FoldChunks"]],["impl<I, INIT, F> RefUnwindSafe for MapInit<I, INIT, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,\n INIT: RefUnwindSafe,
",1,["rayon::iter::map_with::MapInit"]],["impl<I, J> RefUnwindSafe for Interleave<I, J>
where\n I: RefUnwindSafe,\n J: RefUnwindSafe,
",1,["rayon::iter::interleave::Interleave"]],["impl<I, J> RefUnwindSafe for InterleaveShortest<I, J>
where\n I: RefUnwindSafe,\n J: RefUnwindSafe,
",1,["rayon::iter::interleave_shortest::InterleaveShortest"]],["impl<I, P> RefUnwindSafe for Filter<I, P>
where\n I: RefUnwindSafe,\n P: RefUnwindSafe,
",1,["rayon::iter::filter::Filter"]],["impl<I, P> RefUnwindSafe for FilterMap<I, P>
where\n I: RefUnwindSafe,\n P: RefUnwindSafe,
",1,["rayon::iter::filter_map::FilterMap"]],["impl<I, P> RefUnwindSafe for Positions<I, P>
where\n I: RefUnwindSafe,\n P: RefUnwindSafe,
",1,["rayon::iter::positions::Positions"]],["impl<I, P> RefUnwindSafe for SkipAnyWhile<I, P>
where\n I: RefUnwindSafe,\n P: RefUnwindSafe,
",1,["rayon::iter::skip_any_while::SkipAnyWhile"]],["impl<I, P> RefUnwindSafe for TakeAnyWhile<I, P>
where\n I: RefUnwindSafe,\n P: RefUnwindSafe,
",1,["rayon::iter::take_any_while::TakeAnyWhile"]],["impl<I, T, F> RefUnwindSafe for MapWith<I, T, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::iter::map_with::MapWith"]],["impl<I, U, F> RefUnwindSafe for FoldChunksWith<I, U, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,\n U: RefUnwindSafe,
",1,["rayon::iter::fold_chunks_with::FoldChunksWith"]],["impl<I, U, F> RefUnwindSafe for FoldWith<I, U, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,\n U: RefUnwindSafe,
",1,["rayon::iter::fold::FoldWith"]],["impl<I, U, F> RefUnwindSafe for TryFoldWith<I, U, F>
where\n F: RefUnwindSafe,\n I: RefUnwindSafe,\n <U as Try>::Output: RefUnwindSafe,
",1,["rayon::iter::try_fold::TryFoldWith"]],["impl<I, U, ID, F> RefUnwindSafe for TryFold<I, U, ID, F>",1,["rayon::iter::try_fold::TryFold"]],["impl<Iter> RefUnwindSafe for IterBridge<Iter>
where\n Iter: RefUnwindSafe,
",1,["rayon::iter::par_bridge::IterBridge"]],["impl<K, V> RefUnwindSafe for IntoIter<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::btree_map::IntoIter"]],["impl<K, V> RefUnwindSafe for IntoIter<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::hash_map::IntoIter"]],["impl<S, B> RefUnwindSafe for WalkTree<S, B>
where\n B: RefUnwindSafe,\n S: RefUnwindSafe,
",1,["rayon::iter::walk_tree::WalkTree"]],["impl<S, B> RefUnwindSafe for WalkTreePostfix<S, B>
where\n B: RefUnwindSafe,\n S: RefUnwindSafe,
",1,["rayon::iter::walk_tree::WalkTreePostfix"]],["impl<S, B> RefUnwindSafe for WalkTreePrefix<S, B>
where\n B: RefUnwindSafe,\n S: RefUnwindSafe,
",1,["rayon::iter::walk_tree::WalkTreePrefix"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::binary_heap::IntoIter"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::btree_set::IntoIter"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::hash_set::IntoIter"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::linked_list::IntoIter"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::vec_deque::IntoIter"]],["impl<T> RefUnwindSafe for Empty<T>
where\n T: RefUnwindSafe,
",1,["rayon::iter::empty::Empty"]],["impl<T> RefUnwindSafe for MultiZip<T>
where\n T: RefUnwindSafe,
",1,["rayon::iter::multizip::MultiZip"]],["impl<T> RefUnwindSafe for Once<T>
where\n T: RefUnwindSafe,
",1,["rayon::iter::once::Once"]],["impl<T> RefUnwindSafe for Repeat<T>
where\n T: RefUnwindSafe,
",1,["rayon::iter::repeat::Repeat"]],["impl<T> RefUnwindSafe for RepeatN<T>
where\n T: RefUnwindSafe,
",1,["rayon::iter::repeat::RepeatN"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::option::IntoIter"]],["impl<T> RefUnwindSafe for Iter<T>
where\n T: RefUnwindSafe,
",1,["rayon::range::Iter"]],["impl<T> RefUnwindSafe for Iter<T>
where\n T: RefUnwindSafe,
",1,["rayon::range_inclusive::Iter"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::result::IntoIter"]],["impl<T> RefUnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rayon::vec::IntoIter"]],["impl<T, const N: usize> RefUnwindSafe for IntoIter<T, N>
where\n T: RefUnwindSafe,
",1,["rayon::array::IntoIter"]]], +"rayon_core":[["impl !RefUnwindSafe for Configuration",1,["rayon_core::Configuration"]],["impl !RefUnwindSafe for ThreadBuilder",1,["rayon_core::registry::ThreadBuilder"]],["impl !RefUnwindSafe for ThreadPool",1,["rayon_core::thread_pool::ThreadPool"]],["impl !RefUnwindSafe for ThreadPoolBuildError",1,["rayon_core::ThreadPoolBuildError"]],["impl RefUnwindSafe for Yield",1,["rayon_core::thread_pool::Yield"]],["impl RefUnwindSafe for FnContext",1,["rayon_core::FnContext"]],["impl<'a> !RefUnwindSafe for BroadcastContext<'a>",1,["rayon_core::broadcast::BroadcastContext"]],["impl<'scope> !RefUnwindSafe for Scope<'scope>",1,["rayon_core::scope::Scope"]],["impl<'scope> !RefUnwindSafe for ScopeFifo<'scope>",1,["rayon_core::scope::ScopeFifo"]],["impl<S = DefaultSpawn> !RefUnwindSafe for ThreadPoolBuilder<S>",1,["rayon_core::ThreadPoolBuilder"]]], "read_fonts":[["impl RefUnwindSafe for ReadError",1,["read_fonts::read::ReadError"]],["impl RefUnwindSafe for BitmapDataFormat",1,["read_fonts::tables::bitmap::BitmapDataFormat"]],["impl RefUnwindSafe for BitmapMetrics",1,["read_fonts::tables::bitmap::BitmapMetrics"]],["impl RefUnwindSafe for MapVariant",1,["read_fonts::tables::cmap::MapVariant"]],["impl RefUnwindSafe for PlatformId",1,["read_fonts::tables::cmap::PlatformId"]],["impl RefUnwindSafe for CompositeMode",1,["read_fonts::tables::colr::CompositeMode"]],["impl RefUnwindSafe for Extend",1,["read_fonts::tables::colr::Extend"]],["impl RefUnwindSafe for GlyphClassDef",1,["read_fonts::tables::gdef::GlyphClassDef"]],["impl RefUnwindSafe for Opcode",1,["read_fonts::tables::glyf::bytecode::opcode::Opcode"]],["impl RefUnwindSafe for Anchor",1,["read_fonts::tables::glyf::Anchor"]],["impl RefUnwindSafe for ToPathError",1,["read_fonts::tables::glyf::ToPathError"]],["impl RefUnwindSafe for ToPathStyle",1,["read_fonts::tables::glyf::ToPathStyle"]],["impl RefUnwindSafe for DeltaFormat",1,["read_fonts::tables::layout::DeltaFormat"]],["impl RefUnwindSafe for Encoding",1,["read_fonts::tables::name::Encoding"]],["impl RefUnwindSafe for Entry",1,["read_fonts::tables::postscript::dict::Entry"]],["impl RefUnwindSafe for Operator",1,["read_fonts::tables::postscript::dict::Operator"]],["impl RefUnwindSafe for Token",1,["read_fonts::tables::postscript::dict::Token"]],["impl RefUnwindSafe for Error",1,["read_fonts::tables::postscript::Error"]],["impl RefUnwindSafe for Number",1,["read_fonts::tables::postscript::stack::Number"]],["impl RefUnwindSafe for TableRecord",1,["read_fonts::TableRecord"]],["impl RefUnwindSafe for AxisValueMap",1,["read_fonts::tables::avar::AxisValueMap"]],["impl RefUnwindSafe for BaseLangSysRecord",1,["read_fonts::tables::base::BaseLangSysRecord"]],["impl RefUnwindSafe for BaseScriptRecord",1,["read_fonts::tables::base::BaseScriptRecord"]],["impl RefUnwindSafe for FeatMinMaxRecord",1,["read_fonts::tables::base::FeatMinMaxRecord"]],["impl RefUnwindSafe for BdtComponent",1,["read_fonts::tables::bitmap::BdtComponent"]],["impl RefUnwindSafe for BigGlyphMetrics",1,["read_fonts::tables::bitmap::BigGlyphMetrics"]],["impl RefUnwindSafe for BitmapFlags",1,["read_fonts::tables::bitmap::BitmapFlags"]],["impl RefUnwindSafe for BitmapLocation",1,["read_fonts::tables::bitmap::BitmapLocation"]],["impl RefUnwindSafe for BitmapSize",1,["read_fonts::tables::bitmap::BitmapSize"]],["impl RefUnwindSafe for GlyphIdOffsetPair",1,["read_fonts::tables::bitmap::GlyphIdOffsetPair"]],["impl RefUnwindSafe for SbitLineMetrics",1,["read_fonts::tables::bitmap::SbitLineMetrics"]],["impl RefUnwindSafe for SmallGlyphMetrics",1,["read_fonts::tables::bitmap::SmallGlyphMetrics"]],["impl RefUnwindSafe for ConstantMapGroup",1,["read_fonts::tables::cmap::ConstantMapGroup"]],["impl RefUnwindSafe for EncodingRecord",1,["read_fonts::tables::cmap::EncodingRecord"]],["impl RefUnwindSafe for SequentialMapGroup",1,["read_fonts::tables::cmap::SequentialMapGroup"]],["impl RefUnwindSafe for SubHeader",1,["read_fonts::tables::cmap::SubHeader"]],["impl RefUnwindSafe for UnicodeRange",1,["read_fonts::tables::cmap::UnicodeRange"]],["impl RefUnwindSafe for UvsMapping",1,["read_fonts::tables::cmap::UvsMapping"]],["impl RefUnwindSafe for VariationSelector",1,["read_fonts::tables::cmap::VariationSelector"]],["impl RefUnwindSafe for BaseGlyph",1,["read_fonts::tables::colr::BaseGlyph"]],["impl RefUnwindSafe for BaseGlyphPaint",1,["read_fonts::tables::colr::BaseGlyphPaint"]],["impl RefUnwindSafe for Clip",1,["read_fonts::tables::colr::Clip"]],["impl RefUnwindSafe for ColorIndex",1,["read_fonts::tables::colr::ColorIndex"]],["impl RefUnwindSafe for ColorStop",1,["read_fonts::tables::colr::ColorStop"]],["impl RefUnwindSafe for Layer",1,["read_fonts::tables::colr::Layer"]],["impl RefUnwindSafe for VarColorIndex",1,["read_fonts::tables::colr::VarColorIndex"]],["impl RefUnwindSafe for VarColorStop",1,["read_fonts::tables::colr::VarColorStop"]],["impl RefUnwindSafe for ColorRecord",1,["read_fonts::tables::cpal::ColorRecord"]],["impl RefUnwindSafe for PaletteType",1,["read_fonts::tables::cpal::PaletteType"]],["impl RefUnwindSafe for CvtDelta",1,["read_fonts::tables::cvar::CvtDelta"]],["impl RefUnwindSafe for VariationAxisRecord",1,["read_fonts::tables::fvar::VariationAxisRecord"]],["impl RefUnwindSafe for GaspRange",1,["read_fonts::tables::gasp::GaspRange"]],["impl RefUnwindSafe for GaspRangeBehavior",1,["read_fonts::tables::gasp::GaspRangeBehavior"]],["impl RefUnwindSafe for DecodeError",1,["read_fonts::tables::glyf::bytecode::decode::DecodeError"]],["impl RefUnwindSafe for Component",1,["read_fonts::tables::glyf::Component"]],["impl RefUnwindSafe for CompositeGlyphFlags",1,["read_fonts::tables::glyf::CompositeGlyphFlags"]],["impl RefUnwindSafe for CurvePoint",1,["read_fonts::tables::glyf::CurvePoint"]],["impl RefUnwindSafe for PointFlags",1,["read_fonts::tables::glyf::PointFlags"]],["impl RefUnwindSafe for PointMarker",1,["read_fonts::tables::glyf::PointMarker"]],["impl RefUnwindSafe for SimpleGlyphFlags",1,["read_fonts::tables::glyf::SimpleGlyphFlags"]],["impl RefUnwindSafe for Transform",1,["read_fonts::tables::glyf::Transform"]],["impl RefUnwindSafe for Class2Record",1,["read_fonts::tables::gpos::Class2Record"]],["impl RefUnwindSafe for EntryExitRecord",1,["read_fonts::tables::gpos::EntryExitRecord"]],["impl RefUnwindSafe for MarkRecord",1,["read_fonts::tables::gpos::MarkRecord"]],["impl RefUnwindSafe for PairValueRecord",1,["read_fonts::tables::gpos::PairValueRecord"]],["impl RefUnwindSafe for ValueFormat",1,["read_fonts::tables::gpos::ValueFormat"]],["impl RefUnwindSafe for ValueRecord",1,["read_fonts::tables::gpos::value_record::ValueRecord"]],["impl RefUnwindSafe for GlyphDelta",1,["read_fonts::tables::gvar::GlyphDelta"]],["impl RefUnwindSafe for GvarFlags",1,["read_fonts::tables::gvar::GvarFlags"]],["impl RefUnwindSafe for U16Or32",1,["read_fonts::tables::gvar::U16Or32"]],["impl RefUnwindSafe for MacStyle",1,["read_fonts::tables::head::MacStyle"]],["impl RefUnwindSafe for LongMetric",1,["read_fonts::tables::hmtx::LongMetric"]],["impl RefUnwindSafe for ClassRangeRecord",1,["read_fonts::tables::layout::ClassRangeRecord"]],["impl RefUnwindSafe for FeatureRecord",1,["read_fonts::tables::layout::FeatureRecord"]],["impl RefUnwindSafe for FeatureTableSubstitutionRecord",1,["read_fonts::tables::layout::FeatureTableSubstitutionRecord"]],["impl RefUnwindSafe for FeatureVariationRecord",1,["read_fonts::tables::layout::FeatureVariationRecord"]],["impl RefUnwindSafe for LangSysRecord",1,["read_fonts::tables::layout::LangSysRecord"]],["impl RefUnwindSafe for LookupFlag",1,["read_fonts::tables::layout::lookupflag::LookupFlag"]],["impl RefUnwindSafe for RangeRecord",1,["read_fonts::tables::layout::RangeRecord"]],["impl RefUnwindSafe for ScriptRecord",1,["read_fonts::tables::layout::ScriptRecord"]],["impl RefUnwindSafe for SequenceLookupRecord",1,["read_fonts::tables::layout::SequenceLookupRecord"]],["impl RefUnwindSafe for ValueRecord",1,["read_fonts::tables::mvar::ValueRecord"]],["impl RefUnwindSafe for LangTagRecord",1,["read_fonts::tables::name::LangTagRecord"]],["impl RefUnwindSafe for MacRomanMapping",1,["read_fonts::tables::name::MacRomanMapping"]],["impl RefUnwindSafe for NameRecord",1,["read_fonts::tables::name::NameRecord"]],["impl RefUnwindSafe for SelectionFlags",1,["read_fonts::tables::os2::SelectionFlags"]],["impl RefUnwindSafe for Blues",1,["read_fonts::tables::postscript::dict::Blues"]],["impl RefUnwindSafe for StemSnaps",1,["read_fonts::tables::postscript::dict::StemSnaps"]],["impl RefUnwindSafe for FdSelectRange3",1,["read_fonts::tables::postscript::FdSelectRange3"]],["impl RefUnwindSafe for FdSelectRange4",1,["read_fonts::tables::postscript::FdSelectRange4"]],["impl RefUnwindSafe for Stack",1,["read_fonts::tables::postscript::stack::Stack"]],["impl RefUnwindSafe for StringId",1,["read_fonts::tables::postscript::string::StringId"]],["impl RefUnwindSafe for HeaderFlags",1,["read_fonts::tables::sbix::HeaderFlags"]],["impl RefUnwindSafe for AxisRecord",1,["read_fonts::tables::stat::AxisRecord"]],["impl RefUnwindSafe for AxisValueRecord",1,["read_fonts::tables::stat::AxisValueRecord"]],["impl RefUnwindSafe for AxisValueTableFlags",1,["read_fonts::tables::stat::AxisValueTableFlags"]],["impl RefUnwindSafe for DeltaSetIndex",1,["read_fonts::tables::variations::DeltaSetIndex"]],["impl RefUnwindSafe for EntryFormat",1,["read_fonts::tables::variations::EntryFormat"]],["impl RefUnwindSafe for FloatItemDelta",1,["read_fonts::tables::variations::FloatItemDelta"]],["impl RefUnwindSafe for RegionAxisCoordinates",1,["read_fonts::tables::variations::RegionAxisCoordinates"]],["impl RefUnwindSafe for TupleIndex",1,["read_fonts::tables::variations::TupleIndex"]],["impl RefUnwindSafe for TupleVariationCount",1,["read_fonts::tables::variations::TupleVariationCount"]],["impl<'a> RefUnwindSafe for FileRef<'a>",1,["read_fonts::FileRef"]],["impl<'a> RefUnwindSafe for BaseCoord<'a>",1,["read_fonts::tables::base::BaseCoord"]],["impl<'a> RefUnwindSafe for BitmapContent<'a>",1,["read_fonts::tables::bitmap::BitmapContent"]],["impl<'a> RefUnwindSafe for IndexSubtable<'a>",1,["read_fonts::tables::bitmap::IndexSubtable"]],["impl<'a> RefUnwindSafe for CmapSubtable<'a>",1,["read_fonts::tables::cmap::CmapSubtable"]],["impl<'a> RefUnwindSafe for ClipBox<'a>",1,["read_fonts::tables::colr::ClipBox"]],["impl<'a> RefUnwindSafe for Paint<'a>",1,["read_fonts::tables::colr::Paint"]],["impl<'a> RefUnwindSafe for CaretValue<'a>",1,["read_fonts::tables::gdef::CaretValue"]],["impl<'a> RefUnwindSafe for Glyph<'a>",1,["read_fonts::tables::glyf::Glyph"]],["impl<'a> RefUnwindSafe for AnchorTable<'a>",1,["read_fonts::tables::gpos::AnchorTable"]],["impl<'a> RefUnwindSafe for ExtensionSubtable<'a>",1,["read_fonts::tables::gpos::ExtensionSubtable"]],["impl<'a> RefUnwindSafe for PairPos<'a>",1,["read_fonts::tables::gpos::PairPos"]],["impl<'a> RefUnwindSafe for PositionLookup<'a>",1,["read_fonts::tables::gpos::PositionLookup"]],["impl<'a> RefUnwindSafe for PositionSubtables<'a>",1,["read_fonts::tables::gpos::PositionSubtables"]],["impl<'a> RefUnwindSafe for SinglePos<'a>",1,["read_fonts::tables::gpos::SinglePos"]],["impl<'a> RefUnwindSafe for ExtensionSubtable<'a>",1,["read_fonts::tables::gsub::ExtensionSubtable"]],["impl<'a> RefUnwindSafe for SingleSubst<'a>",1,["read_fonts::tables::gsub::SingleSubst"]],["impl<'a> RefUnwindSafe for SubstitutionLookup<'a>",1,["read_fonts::tables::gsub::SubstitutionLookup"]],["impl<'a> RefUnwindSafe for SubstitutionSubtables<'a>",1,["read_fonts::tables::gsub::SubstitutionSubtables"]],["impl<'a> RefUnwindSafe for ChainedSequenceContext<'a>",1,["read_fonts::tables::layout::ChainedSequenceContext"]],["impl<'a> RefUnwindSafe for ClassDef<'a>",1,["read_fonts::tables::layout::ClassDef"]],["impl<'a> RefUnwindSafe for CoverageTable<'a>",1,["read_fonts::tables::layout::CoverageTable"]],["impl<'a> RefUnwindSafe for DeviceOrVariationIndex<'a>",1,["read_fonts::tables::layout::DeviceOrVariationIndex"]],["impl<'a> RefUnwindSafe for FeatureParams<'a>",1,["read_fonts::tables::layout::FeatureParams"]],["impl<'a> RefUnwindSafe for SequenceContext<'a>",1,["read_fonts::tables::layout::SequenceContext"]],["impl<'a> RefUnwindSafe for Loca<'a>",1,["read_fonts::tables::loca::Loca"]],["impl<'a> RefUnwindSafe for FdSelect<'a>",1,["read_fonts::tables::postscript::FdSelect"]],["impl<'a> RefUnwindSafe for Index<'a>",1,["read_fonts::tables::postscript::index::Index"]],["impl<'a> RefUnwindSafe for AxisValue<'a>",1,["read_fonts::tables::stat::AxisValue"]],["impl<'a> RefUnwindSafe for DeltaSetIndexMap<'a>",1,["read_fonts::tables::variations::DeltaSetIndexMap"]],["impl<'a> RefUnwindSafe for CollectionRef<'a>",1,["read_fonts::CollectionRef"]],["impl<'a> RefUnwindSafe for FontData<'a>",1,["read_fonts::font_data::FontData"]],["impl<'a> RefUnwindSafe for FontRef<'a>",1,["read_fonts::FontRef"]],["impl<'a> RefUnwindSafe for SegmentMaps<'a>",1,["read_fonts::tables::avar::SegmentMaps"]],["impl<'a> RefUnwindSafe for BitmapData<'a>",1,["read_fonts::tables::bitmap::BitmapData"]],["impl<'a> RefUnwindSafe for Cff<'a>",1,["read_fonts::tables::cff::Cff"]],["impl<'a> RefUnwindSafe for Cff2<'a>",1,["read_fonts::tables::cff2::Cff2"]],["impl<'a> RefUnwindSafe for Cmap12Iter<'a>",1,["read_fonts::tables::cmap::Cmap12Iter"]],["impl<'a> RefUnwindSafe for Cmap14Iter<'a>",1,["read_fonts::tables::cmap::Cmap14Iter"]],["impl<'a> RefUnwindSafe for Cmap4Iter<'a>",1,["read_fonts::tables::cmap::Cmap4Iter"]],["impl<'a> RefUnwindSafe for InstanceRecord<'a>",1,["read_fonts::tables::fvar::instance_record::InstanceRecord"]],["impl<'a> RefUnwindSafe for Decoder<'a>",1,["read_fonts::tables::glyf::bytecode::decode::Decoder"]],["impl<'a> RefUnwindSafe for InlineOperands<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::InlineOperands"]],["impl<'a> RefUnwindSafe for Instruction<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::Instruction"]],["impl<'a> RefUnwindSafe for BaseRecord<'a>",1,["read_fonts::tables::gpos::BaseRecord"]],["impl<'a> RefUnwindSafe for Class1Record<'a>",1,["read_fonts::tables::gpos::Class1Record"]],["impl<'a> RefUnwindSafe for ComponentRecord<'a>",1,["read_fonts::tables::gpos::ComponentRecord"]],["impl<'a> RefUnwindSafe for Mark2Record<'a>",1,["read_fonts::tables::gpos::Mark2Record"]],["impl<'a> RefUnwindSafe for CharIter<'a>",1,["read_fonts::tables::name::CharIter"]],["impl<'a> RefUnwindSafe for NameString<'a>",1,["read_fonts::tables::name::NameString"]],["impl<'a> RefUnwindSafe for PString<'a>",1,["read_fonts::tables::post::PString"]],["impl<'a> RefUnwindSafe for BlendState<'a>",1,["read_fonts::tables::postscript::blend::BlendState"]],["impl<'a> RefUnwindSafe for Latin1String<'a>",1,["read_fonts::tables::postscript::string::Latin1String"]],["impl<'a> RefUnwindSafe for DeltaRunIter<'a>",1,["read_fonts::tables::variations::DeltaRunIter"]],["impl<'a> RefUnwindSafe for PackedDeltas<'a>",1,["read_fonts::tables::variations::PackedDeltas"]],["impl<'a> RefUnwindSafe for PackedPointNumbers<'a>",1,["read_fonts::tables::variations::PackedPointNumbers"]],["impl<'a> RefUnwindSafe for PackedPointNumbersIter<'a>",1,["read_fonts::tables::variations::PackedPointNumbersIter"]],["impl<'a> RefUnwindSafe for Tuple<'a>",1,["read_fonts::tables::variations::Tuple"]],["impl<'a> RefUnwindSafe for TupleVariationHeaderIter<'a>",1,["read_fonts::tables::variations::TupleVariationHeaderIter"]],["impl<'a> RefUnwindSafe for VariationRegion<'a>",1,["read_fonts::tables::variations::VariationRegion"]],["impl<'a, P> RefUnwindSafe for PenSink<'a, P>
where\n P: RefUnwindSafe,
",1,["read_fonts::tables::postscript::charstring::PenSink"]],["impl<'a, T> RefUnwindSafe for ComputedArray<'a, T>
where\n <T as ReadArgs>::Args: RefUnwindSafe,
",1,["read_fonts::array::ComputedArray"]],["impl<'a, T> RefUnwindSafe for VarLenArray<'a, T>
where\n T: RefUnwindSafe,
",1,["read_fonts::array::VarLenArray"]],["impl<'a, T> RefUnwindSafe for TableRef<'a, T>
where\n T: RefUnwindSafe,
",1,["read_fonts::table_ref::TableRef"]],["impl<'a, T> RefUnwindSafe for TupleDeltaIter<'a, T>",1,["read_fonts::tables::variations::TupleDeltaIter"]],["impl<'a, T> RefUnwindSafe for TupleVariation<'a, T>",1,["read_fonts::tables::variations::TupleVariation"]],["impl<'a, T> RefUnwindSafe for TupleVariationData<'a, T>",1,["read_fonts::tables::variations::TupleVariationData"]],["impl<'a, T> RefUnwindSafe for TupleVariationIter<'a, T>",1,["read_fonts::tables::variations::TupleVariationIter"]],["impl<'a, T, Ext> RefUnwindSafe for Subtables<'a, T, Ext>",1,["read_fonts::tables::layout::Subtables"]],["impl<'a, T, O> RefUnwindSafe for ArrayOfNullableOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: RefUnwindSafe,\n <O as Scalar>::Raw: RefUnwindSafe,
",1,["read_fonts::offset_array::ArrayOfNullableOffsets"]],["impl<'a, T, O> RefUnwindSafe for ArrayOfOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: RefUnwindSafe,\n <O as Scalar>::Raw: RefUnwindSafe,
",1,["read_fonts::offset_array::ArrayOfOffsets"]]], "roxmltree":[["impl RefUnwindSafe for Error",1,["roxmltree::parse::Error"]],["impl RefUnwindSafe for NodeType",1,["roxmltree::NodeType"]],["impl RefUnwindSafe for NodeId",1,["roxmltree::NodeId"]],["impl RefUnwindSafe for ParsingOptions",1,["roxmltree::parse::ParsingOptions"]],["impl RefUnwindSafe for TextPos",1,["roxmltree::TextPos"]],["impl<'a, 'b> RefUnwindSafe for ExpandedName<'a, 'b>",1,["roxmltree::ExpandedName"]],["impl<'a, 'input> RefUnwindSafe for Attribute<'a, 'input>",1,["roxmltree::Attribute"]],["impl<'a, 'input> RefUnwindSafe for Attributes<'a, 'input>",1,["roxmltree::Attributes"]],["impl<'a, 'input> RefUnwindSafe for AxisIter<'a, 'input>",1,["roxmltree::AxisIter"]],["impl<'a, 'input> RefUnwindSafe for Children<'a, 'input>",1,["roxmltree::Children"]],["impl<'a, 'input> RefUnwindSafe for Descendants<'a, 'input>",1,["roxmltree::Descendants"]],["impl<'a, 'input> RefUnwindSafe for NamespaceIter<'a, 'input>",1,["roxmltree::NamespaceIter"]],["impl<'a, 'input> RefUnwindSafe for Node<'a, 'input>",1,["roxmltree::Node"]],["impl<'input> RefUnwindSafe for StringStorage<'input>",1,["roxmltree::StringStorage"]],["impl<'input> RefUnwindSafe for Document<'input>",1,["roxmltree::Document"]],["impl<'input> RefUnwindSafe for Namespace<'input>",1,["roxmltree::Namespace"]],["impl<'input> RefUnwindSafe for PI<'input>",1,["roxmltree::PI"]]], "rustc_hash":[["impl RefUnwindSafe for FxHasher",1,["rustc_hash::FxHasher"]]], diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index 1823c797a0..be24683832 100644 --- a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -2,6 +2,10 @@ "bitflags":[["impl UnwindSafe for ParseError",1,["bitflags::parser::ParseError"]],["impl<B> UnwindSafe for Iter<B>",1,["bitflags::iter::Iter"]],["impl<B> UnwindSafe for IterNames<B>",1,["bitflags::iter::IterNames"]],["impl<B> UnwindSafe for Flag<B>
where\n B: UnwindSafe,
",1,["bitflags::traits::Flag"]]], "bytemuck":[["impl UnwindSafe for CheckedCastError",1,["bytemuck::checked::CheckedCastError"]],["impl UnwindSafe for PodCastError",1,["bytemuck::PodCastError"]],["impl UnwindSafe for BoxBytes",1,["bytemuck::allocation::BoxBytes"]]], "cosmic_text":[["impl !UnwindSafe for Font",1,["cosmic_text::font::Font"]],["impl !UnwindSafe for FontSystem",1,["cosmic_text::font::system::FontSystem"]],["impl UnwindSafe for Action",1,["cosmic_text::edit::Action"]],["impl UnwindSafe for Affinity",1,["cosmic_text::cursor::Affinity"]],["impl UnwindSafe for Align",1,["cosmic_text::layout::Align"]],["impl UnwindSafe for FamilyOwned",1,["cosmic_text::attrs::FamilyOwned"]],["impl UnwindSafe for LineEnding",1,["cosmic_text::line_ending::LineEnding"]],["impl UnwindSafe for Motion",1,["cosmic_text::cursor::Motion"]],["impl UnwindSafe for Selection",1,["cosmic_text::edit::Selection"]],["impl UnwindSafe for Shaping",1,["cosmic_text::shape::Shaping"]],["impl UnwindSafe for SubpixelBin",1,["cosmic_text::glyph_cache::SubpixelBin"]],["impl UnwindSafe for Wrap",1,["cosmic_text::layout::Wrap"]],["impl UnwindSafe for AttrsList",1,["cosmic_text::attrs::AttrsList"]],["impl UnwindSafe for AttrsOwned",1,["cosmic_text::attrs::AttrsOwned"]],["impl UnwindSafe for Buffer",1,["cosmic_text::buffer::Buffer"]],["impl UnwindSafe for BufferLine",1,["cosmic_text::buffer_line::BufferLine"]],["impl UnwindSafe for CacheKey",1,["cosmic_text::glyph_cache::CacheKey"]],["impl UnwindSafe for CacheKeyFlags",1,["cosmic_text::glyph_cache::CacheKeyFlags"]],["impl UnwindSafe for Change",1,["cosmic_text::edit::Change"]],["impl UnwindSafe for ChangeItem",1,["cosmic_text::edit::ChangeItem"]],["impl UnwindSafe for Color",1,["cosmic_text::attrs::Color"]],["impl UnwindSafe for Cursor",1,["cosmic_text::cursor::Cursor"]],["impl UnwindSafe for FontMatchAttrs",1,["cosmic_text::attrs::FontMatchAttrs"]],["impl UnwindSafe for FontMatchKey",1,["cosmic_text::font::system::FontMatchKey"]],["impl UnwindSafe for LayoutCursor",1,["cosmic_text::cursor::LayoutCursor"]],["impl UnwindSafe for LayoutGlyph",1,["cosmic_text::layout::LayoutGlyph"]],["impl UnwindSafe for LayoutLine",1,["cosmic_text::layout::LayoutLine"]],["impl UnwindSafe for Metrics",1,["cosmic_text::buffer::Metrics"]],["impl UnwindSafe for PhysicalGlyph",1,["cosmic_text::layout::PhysicalGlyph"]],["impl UnwindSafe for Scroll",1,["cosmic_text::cursor::Scroll"]],["impl UnwindSafe for ShapeBuffer",1,["cosmic_text::shape::ShapeBuffer"]],["impl UnwindSafe for ShapeGlyph",1,["cosmic_text::shape::ShapeGlyph"]],["impl UnwindSafe for ShapeLine",1,["cosmic_text::shape::ShapeLine"]],["impl UnwindSafe for ShapeRunCache",1,["cosmic_text::shape_run_cache::ShapeRunCache"]],["impl UnwindSafe for ShapeRunKey",1,["cosmic_text::shape_run_cache::ShapeRunKey"]],["impl UnwindSafe for ShapeSpan",1,["cosmic_text::shape::ShapeSpan"]],["impl UnwindSafe for ShapeWord",1,["cosmic_text::shape::ShapeWord"]],["impl UnwindSafe for SwashCache",1,["cosmic_text::swash::SwashCache"]],["impl<'a> UnwindSafe for Attrs<'a>",1,["cosmic_text::attrs::Attrs"]],["impl<'a> UnwindSafe for LayoutRun<'a>",1,["cosmic_text::buffer::LayoutRun"]],["impl<'a> UnwindSafe for LineIter<'a>",1,["cosmic_text::line_ending::LineIter"]],["impl<'a, T> !UnwindSafe for BorrowedWithFontSystem<'a, T>",1,["cosmic_text::font::system::BorrowedWithFontSystem"]],["impl<'b> UnwindSafe for LayoutRunIter<'b>",1,["cosmic_text::buffer::LayoutRunIter"]],["impl<'buffer> !UnwindSafe for BufferRef<'buffer>",1,["cosmic_text::edit::BufferRef"]],["impl<'buffer> !UnwindSafe for Editor<'buffer>",1,["cosmic_text::edit::editor::Editor"]],["impl<'text> UnwindSafe for BidiParagraphs<'text>",1,["cosmic_text::bidi_para::BidiParagraphs"]]], +"crossbeam_deque":[["impl<T> !UnwindSafe for Injector<T>",1,["crossbeam_deque::deque::Injector"]],["impl<T> UnwindSafe for Steal<T>
where\n T: UnwindSafe,
",1,["crossbeam_deque::deque::Steal"]],["impl<T> UnwindSafe for Stealer<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_deque::deque::Stealer"]],["impl<T> UnwindSafe for Worker<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_deque::deque::Worker"]]], +"crossbeam_epoch":[["impl !UnwindSafe for Collector",1,["crossbeam_epoch::collector::Collector"]],["impl !UnwindSafe for Guard",1,["crossbeam_epoch::guard::Guard"]],["impl !UnwindSafe for LocalHandle",1,["crossbeam_epoch::collector::LocalHandle"]],["impl<'g, T: ?Sized> UnwindSafe for Shared<'g, T>
where\n T: RefUnwindSafe,
",1,["crossbeam_epoch::atomic::Shared"]],["impl<'g, T: ?Sized, P> UnwindSafe for CompareExchangeError<'g, T, P>
where\n P: UnwindSafe,\n T: RefUnwindSafe,
",1,["crossbeam_epoch::atomic::CompareExchangeError"]],["impl<T: ?Sized> UnwindSafe for Atomic<T>
where\n T: RefUnwindSafe,
",1,["crossbeam_epoch::atomic::Atomic"]],["impl<T: ?Sized> UnwindSafe for Owned<T>
where\n T: UnwindSafe,
",1,["crossbeam_epoch::atomic::Owned"]]], +"crossbeam_utils":[["impl UnwindSafe for Backoff",1,["crossbeam_utils::backoff::Backoff"]],["impl UnwindSafe for Parker",1,["crossbeam_utils::sync::parker::Parker"]],["impl UnwindSafe for Unparker",1,["crossbeam_utils::sync::parker::Unparker"]],["impl UnwindSafe for WaitGroup",1,["crossbeam_utils::sync::wait_group::WaitGroup"]],["impl<'a, T: ?Sized> UnwindSafe for ShardedLockReadGuard<'a, T>
where\n T: RefUnwindSafe,
",1,["crossbeam_utils::sync::sharded_lock::ShardedLockReadGuard"]],["impl<'a, T: ?Sized> UnwindSafe for ShardedLockWriteGuard<'a, T>",1,["crossbeam_utils::sync::sharded_lock::ShardedLockWriteGuard"]],["impl<'env> !UnwindSafe for Scope<'env>",1,["crossbeam_utils::thread::Scope"]],["impl<'scope, 'env> UnwindSafe for ScopedThreadBuilder<'scope, 'env>",1,["crossbeam_utils::thread::ScopedThreadBuilder"]],["impl<'scope, T> UnwindSafe for ScopedJoinHandle<'scope, T>",1,["crossbeam_utils::thread::ScopedJoinHandle"]],["impl<T> UnwindSafe for AtomicCell<T>"],["impl<T> UnwindSafe for CachePadded<T>
where\n T: UnwindSafe,
",1,["crossbeam_utils::cache_padded::CachePadded"]],["impl<T: ?Sized> UnwindSafe for ShardedLock<T>"]], +"either":[["impl<L, R> UnwindSafe for Either<L, R>
where\n L: UnwindSafe,\n R: UnwindSafe,
",1,["either::Either"]],["impl<L, R> UnwindSafe for IterEither<L, R>
where\n L: UnwindSafe,\n R: UnwindSafe,
",1,["either::iterator::IterEither"]]], "font_types":[["impl UnwindSafe for InvalidTag",1,["font_types::tag::InvalidTag"]],["impl UnwindSafe for PenCommand",1,["font_types::pen::PenCommand"]],["impl UnwindSafe for F26Dot6",1,["font_types::fixed::F26Dot6"]],["impl UnwindSafe for F2Dot14",1,["font_types::fixed::F2Dot14"]],["impl UnwindSafe for FWord",1,["font_types::fword::FWord"]],["impl UnwindSafe for Fixed",1,["font_types::fixed::Fixed"]],["impl UnwindSafe for GlyphId",1,["font_types::glyph_id::GlyphId"]],["impl UnwindSafe for LongDateTime",1,["font_types::longdatetime::LongDateTime"]],["impl UnwindSafe for MajorMinor",1,["font_types::version::MajorMinor"]],["impl UnwindSafe for NameId",1,["font_types::name_id::NameId"]],["impl UnwindSafe for Offset16",1,["font_types::offset::Offset16"]],["impl UnwindSafe for Offset24",1,["font_types::offset::Offset24"]],["impl UnwindSafe for Offset32",1,["font_types::offset::Offset32"]],["impl UnwindSafe for Tag",1,["font_types::tag::Tag"]],["impl UnwindSafe for UfWord",1,["font_types::fword::UfWord"]],["impl UnwindSafe for Uint24",1,["font_types::uint24::Uint24"]],["impl UnwindSafe for Version16Dot16",1,["font_types::version::Version16Dot16"]],["impl<T> UnwindSafe for BigEndian<T>
where\n <T as Scalar>::Raw: UnwindSafe,
",1,["font_types::raw::BigEndian"]],["impl<T> UnwindSafe for BoundingBox<T>
where\n T: UnwindSafe,
",1,["font_types::bbox::BoundingBox"]],["impl<T> UnwindSafe for Nullable<T>
where\n T: UnwindSafe,
",1,["font_types::offset::Nullable"]],["impl<T> UnwindSafe for Point<T>
where\n T: UnwindSafe,
",1,["font_types::point::Point"]]], "fontconfig_parser":[["impl !UnwindSafe for Error",1,["fontconfig_parser::error::Error"]],["impl UnwindSafe for BinaryOp",1,["fontconfig_parser::types::value::BinaryOp"]],["impl UnwindSafe for ConfigPart",1,["fontconfig_parser::types::document::ConfigPart"]],["impl UnwindSafe for Constant",1,["fontconfig_parser::types::constant::Constant"]],["impl UnwindSafe for DirPrefix",1,["fontconfig_parser::types::dir::DirPrefix"]],["impl UnwindSafe for EditBinding",1,["fontconfig_parser::types::match_::edit::EditBinding"]],["impl UnwindSafe for EditMode",1,["fontconfig_parser::types::match_::edit::EditMode"]],["impl UnwindSafe for Expression",1,["fontconfig_parser::types::value::Expression"]],["impl UnwindSafe for FontMatch",1,["fontconfig_parser::types::selectfont::FontMatch"]],["impl UnwindSafe for IntOrRange",1,["fontconfig_parser::types::IntOrRange"]],["impl UnwindSafe for ListOp",1,["fontconfig_parser::types::value::ListOp"]],["impl UnwindSafe for MatchTarget",1,["fontconfig_parser::types::match_::MatchTarget"]],["impl UnwindSafe for PrefixBehavior",1,["fontconfig_parser::types::dir::PrefixBehavior"]],["impl UnwindSafe for Property",1,["fontconfig_parser::types::property::Property"]],["impl UnwindSafe for PropertyKind",1,["fontconfig_parser::types::property::PropertyKind"]],["impl UnwindSafe for PropertyTarget",1,["fontconfig_parser::types::value::PropertyTarget"]],["impl UnwindSafe for TernaryOp",1,["fontconfig_parser::types::value::TernaryOp"]],["impl UnwindSafe for TestCompare",1,["fontconfig_parser::types::match_::test::TestCompare"]],["impl UnwindSafe for TestQual",1,["fontconfig_parser::types::match_::test::TestQual"]],["impl UnwindSafe for TestTarget",1,["fontconfig_parser::types::match_::test::TestTarget"]],["impl UnwindSafe for UnaryOp",1,["fontconfig_parser::types::value::UnaryOp"]],["impl UnwindSafe for Value",1,["fontconfig_parser::types::value::Value"]],["impl UnwindSafe for Alias",1,["fontconfig_parser::types::alias::Alias"]],["impl UnwindSafe for CacheDir",1,["fontconfig_parser::types::dir::CacheDir"]],["impl UnwindSafe for Config",1,["fontconfig_parser::types::config::Config"]],["impl UnwindSafe for Dir",1,["fontconfig_parser::types::dir::Dir"]],["impl UnwindSafe for DirData",1,["fontconfig_parser::types::document::DirData"]],["impl UnwindSafe for Edit",1,["fontconfig_parser::types::match_::edit::Edit"]],["impl UnwindSafe for FontConfig",1,["fontconfig_parser::types::document::FontConfig"]],["impl UnwindSafe for Include",1,["fontconfig_parser::types::dir::Include"]],["impl UnwindSafe for Match",1,["fontconfig_parser::types::match_::Match"]],["impl UnwindSafe for RemapDir",1,["fontconfig_parser::types::dir::RemapDir"]],["impl UnwindSafe for RemapDirData",1,["fontconfig_parser::types::document::RemapDirData"]],["impl UnwindSafe for SelectFont",1,["fontconfig_parser::types::selectfont::SelectFont"]],["impl UnwindSafe for Test",1,["fontconfig_parser::types::match_::test::Test"]]], "fontdb":[["impl !UnwindSafe for Source",1,["fontdb::Source"]],["impl !UnwindSafe for Database",1,["fontdb::Database"]],["impl !UnwindSafe for FaceInfo",1,["fontdb::FaceInfo"]],["impl UnwindSafe for Style",1,["fontdb::Style"]],["impl UnwindSafe for ID",1,["fontdb::ID"]],["impl UnwindSafe for Weight",1,["fontdb::Weight"]],["impl<'a> UnwindSafe for Family<'a>",1,["fontdb::Family"]],["impl<'a> UnwindSafe for Query<'a>",1,["fontdb::Query"]]], @@ -11,6 +15,8 @@ "memmap2":[["impl UnwindSafe for Advice",1,["memmap2::advice::Advice"]],["impl UnwindSafe for UncheckedAdvice",1,["memmap2::advice::UncheckedAdvice"]],["impl UnwindSafe for Mmap",1,["memmap2::Mmap"]],["impl UnwindSafe for MmapMut",1,["memmap2::MmapMut"]],["impl UnwindSafe for MmapOptions",1,["memmap2::MmapOptions"]],["impl UnwindSafe for MmapRaw",1,["memmap2::MmapRaw"]],["impl UnwindSafe for MmapRawDescriptor",1,["memmap2::MmapRawDescriptor"]],["impl UnwindSafe for RemapOptions",1,["memmap2::RemapOptions"]]], "proc_macro2":[["impl UnwindSafe for Delimiter",1,["proc_macro2::Delimiter"]],["impl UnwindSafe for Spacing",1,["proc_macro2::Spacing"]],["impl UnwindSafe for TokenTree",1,["proc_macro2::TokenTree"]],["impl UnwindSafe for DelimSpan",1,["proc_macro2::extra::DelimSpan"]],["impl UnwindSafe for Group",1,["proc_macro2::Group"]],["impl UnwindSafe for Ident",1,["proc_macro2::Ident"]],["impl UnwindSafe for LexError",1,["proc_macro2::LexError"]],["impl UnwindSafe for Literal",1,["proc_macro2::Literal"]],["impl UnwindSafe for Punct",1,["proc_macro2::Punct"]],["impl UnwindSafe for Span",1,["proc_macro2::Span"]],["impl UnwindSafe for TokenStream",1,["proc_macro2::TokenStream"]],["impl UnwindSafe for IntoIter",1,["proc_macro2::token_stream::IntoIter"]]], "rangemap":[["impl<'a, K, V> UnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::Iter"]],["impl<'a, K, V> UnwindSafe for Gaps<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::Gaps"]],["impl<'a, K, V> UnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::Iter"]],["impl<'a, K, V, R> UnwindSafe for Overlapping<'a, K, V, R>
where\n K: RefUnwindSafe,\n R: UnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::Overlapping"]],["impl<'a, K, V, R> UnwindSafe for Overlapping<'a, K, V, R>
where\n K: RefUnwindSafe,\n R: UnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::Overlapping"]],["impl<'a, K, V, StepFnsT> UnwindSafe for Gaps<'a, K, V, StepFnsT>
where\n K: UnwindSafe + RefUnwindSafe,\n StepFnsT: UnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::Gaps"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::Iter"]],["impl<'a, T> UnwindSafe for Gaps<'a, T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::Gaps"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::Iter"]],["impl<'a, T, R> UnwindSafe for Overlapping<'a, T, R>
where\n R: UnwindSafe,\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::Overlapping"]],["impl<'a, T, R> UnwindSafe for Overlapping<'a, T, R>
where\n R: UnwindSafe,\n T: RefUnwindSafe,
",1,["rangemap::set::Overlapping"]],["impl<'a, T, StepFnsT> UnwindSafe for Gaps<'a, T, StepFnsT>
where\n StepFnsT: UnwindSafe,\n T: UnwindSafe + RefUnwindSafe,
",1,["rangemap::inclusive_set::Gaps"]],["impl<K, V> UnwindSafe for IntoIter<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::IntoIter"]],["impl<K, V> UnwindSafe for IntoIter<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::IntoIter"]],["impl<K, V> UnwindSafe for RangeMap<K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::map::RangeMap"]],["impl<K, V, StepFnsT> UnwindSafe for RangeInclusiveMap<K, V, StepFnsT>
where\n K: RefUnwindSafe,\n StepFnsT: UnwindSafe,\n V: RefUnwindSafe,
",1,["rangemap::inclusive_map::RangeInclusiveMap"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::IntoIter"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::IntoIter"]],["impl<T> UnwindSafe for RangeSet<T>
where\n T: RefUnwindSafe,
",1,["rangemap::set::RangeSet"]],["impl<T, StepFnsT> UnwindSafe for RangeInclusiveSet<T, StepFnsT>
where\n StepFnsT: UnwindSafe,\n T: RefUnwindSafe,
",1,["rangemap::inclusive_set::RangeInclusiveSet"]]], +"rayon":[["impl<'a> !UnwindSafe for Drain<'a>",1,["rayon::string::Drain"]],["impl<'a, K, V> !UnwindSafe for IterMut<'a, K, V>",1,["rayon::collections::btree_map::IterMut"]],["impl<'a, K, V> !UnwindSafe for Drain<'a, K, V>",1,["rayon::collections::hash_map::Drain"]],["impl<'a, K, V> !UnwindSafe for IterMut<'a, K, V>",1,["rayon::collections::hash_map::IterMut"]],["impl<'a, K, V> UnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::btree_map::Iter"]],["impl<'a, K, V> UnwindSafe for Iter<'a, K, V>
where\n K: RefUnwindSafe,\n V: RefUnwindSafe,
",1,["rayon::collections::hash_map::Iter"]],["impl<'a, T> !UnwindSafe for Drain<'a, T>",1,["rayon::collections::binary_heap::Drain"]],["impl<'a, T> !UnwindSafe for Drain<'a, T>",1,["rayon::collections::hash_set::Drain"]],["impl<'a, T> !UnwindSafe for IterMut<'a, T>",1,["rayon::collections::linked_list::IterMut"]],["impl<'a, T> !UnwindSafe for Drain<'a, T>",1,["rayon::collections::vec_deque::Drain"]],["impl<'a, T> !UnwindSafe for IterMut<'a, T>",1,["rayon::collections::vec_deque::IterMut"]],["impl<'a, T> !UnwindSafe for IterMut<'a, T>",1,["rayon::option::IterMut"]],["impl<'a, T> !UnwindSafe for IterMut<'a, T>",1,["rayon::result::IterMut"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::binary_heap::Iter"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::btree_set::Iter"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::hash_set::Iter"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::linked_list::Iter"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::collections::vec_deque::Iter"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::option::Iter"]],["impl<'a, T> UnwindSafe for Iter<'a, T>
where\n T: RefUnwindSafe,
",1,["rayon::result::Iter"]],["impl<'ch> UnwindSafe for Bytes<'ch>",1,["rayon::str::Bytes"]],["impl<'ch> UnwindSafe for CharIndices<'ch>",1,["rayon::str::CharIndices"]],["impl<'ch> UnwindSafe for Chars<'ch>",1,["rayon::str::Chars"]],["impl<'ch> UnwindSafe for EncodeUtf16<'ch>",1,["rayon::str::EncodeUtf16"]],["impl<'ch> UnwindSafe for Lines<'ch>",1,["rayon::str::Lines"]],["impl<'ch> UnwindSafe for SplitAsciiWhitespace<'ch>",1,["rayon::str::SplitAsciiWhitespace"]],["impl<'ch> UnwindSafe for SplitWhitespace<'ch>",1,["rayon::str::SplitWhitespace"]],["impl<'ch, P> UnwindSafe for MatchIndices<'ch, P>
where\n P: UnwindSafe,
",1,["rayon::str::MatchIndices"]],["impl<'ch, P> UnwindSafe for Matches<'ch, P>
where\n P: UnwindSafe,
",1,["rayon::str::Matches"]],["impl<'ch, P> UnwindSafe for Split<'ch, P>
where\n P: UnwindSafe,
",1,["rayon::str::Split"]],["impl<'ch, P> UnwindSafe for SplitInclusive<'ch, P>
where\n P: UnwindSafe,
",1,["rayon::str::SplitInclusive"]],["impl<'ch, P> UnwindSafe for SplitTerminator<'ch, P>
where\n P: UnwindSafe,
",1,["rayon::str::SplitTerminator"]],["impl<'data, T> !UnwindSafe for ChunksExactMut<'data, T>",1,["rayon::slice::chunks::ChunksExactMut"]],["impl<'data, T> !UnwindSafe for ChunksMut<'data, T>",1,["rayon::slice::chunks::ChunksMut"]],["impl<'data, T> !UnwindSafe for IterMut<'data, T>",1,["rayon::slice::IterMut"]],["impl<'data, T> !UnwindSafe for RChunksExactMut<'data, T>",1,["rayon::slice::rchunks::RChunksExactMut"]],["impl<'data, T> !UnwindSafe for RChunksMut<'data, T>",1,["rayon::slice::rchunks::RChunksMut"]],["impl<'data, T> !UnwindSafe for Drain<'data, T>",1,["rayon::vec::Drain"]],["impl<'data, T> UnwindSafe for Chunks<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::chunks::Chunks"]],["impl<'data, T> UnwindSafe for ChunksExact<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::chunks::ChunksExact"]],["impl<'data, T> UnwindSafe for Iter<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::Iter"]],["impl<'data, T> UnwindSafe for RChunks<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::rchunks::RChunks"]],["impl<'data, T> UnwindSafe for RChunksExact<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::rchunks::RChunksExact"]],["impl<'data, T> UnwindSafe for Windows<'data, T>
where\n T: RefUnwindSafe,
",1,["rayon::slice::Windows"]],["impl<'data, T, P> !UnwindSafe for ChunkByMut<'data, T, P>",1,["rayon::slice::chunk_by::ChunkByMut"]],["impl<'data, T, P> !UnwindSafe for SplitInclusiveMut<'data, T, P>",1,["rayon::slice::SplitInclusiveMut"]],["impl<'data, T, P> !UnwindSafe for SplitMut<'data, T, P>",1,["rayon::slice::SplitMut"]],["impl<'data, T, P> UnwindSafe for ChunkBy<'data, T, P>
where\n P: UnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::chunk_by::ChunkBy"]],["impl<'data, T, P> UnwindSafe for Split<'data, T, P>
where\n P: UnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::Split"]],["impl<'data, T, P> UnwindSafe for SplitInclusive<'data, T, P>
where\n P: UnwindSafe,\n T: RefUnwindSafe,
",1,["rayon::slice::SplitInclusive"]],["impl<A, B> UnwindSafe for Chain<A, B>
where\n A: UnwindSafe,\n B: UnwindSafe,
",1,["rayon::iter::chain::Chain"]],["impl<A, B> UnwindSafe for Zip<A, B>
where\n A: UnwindSafe,\n B: UnwindSafe,
",1,["rayon::iter::zip::Zip"]],["impl<A, B> UnwindSafe for ZipEq<A, B>
where\n A: UnwindSafe,\n B: UnwindSafe,
",1,["rayon::iter::zip_eq::ZipEq"]],["impl<D, S> UnwindSafe for Split<D, S>
where\n D: UnwindSafe,\n S: UnwindSafe,
",1,["rayon::iter::splitter::Split"]],["impl<I> UnwindSafe for Chunks<I>
where\n I: UnwindSafe,
",1,["rayon::iter::chunks::Chunks"]],["impl<I> UnwindSafe for Cloned<I>
where\n I: UnwindSafe,
",1,["rayon::iter::cloned::Cloned"]],["impl<I> UnwindSafe for Copied<I>
where\n I: UnwindSafe,
",1,["rayon::iter::copied::Copied"]],["impl<I> UnwindSafe for Enumerate<I>
where\n I: UnwindSafe,
",1,["rayon::iter::enumerate::Enumerate"]],["impl<I> UnwindSafe for ExponentialBlocks<I>
where\n I: UnwindSafe,
",1,["rayon::iter::blocks::ExponentialBlocks"]],["impl<I> UnwindSafe for Flatten<I>
where\n I: UnwindSafe,
",1,["rayon::iter::flatten::Flatten"]],["impl<I> UnwindSafe for FlattenIter<I>
where\n I: UnwindSafe,
",1,["rayon::iter::flatten_iter::FlattenIter"]],["impl<I> UnwindSafe for Intersperse<I>
where\n I: UnwindSafe,\n <I as ParallelIterator>::Item: UnwindSafe,
",1,["rayon::iter::intersperse::Intersperse"]],["impl<I> UnwindSafe for MaxLen<I>
where\n I: UnwindSafe,
",1,["rayon::iter::len::MaxLen"]],["impl<I> UnwindSafe for MinLen<I>
where\n I: UnwindSafe,
",1,["rayon::iter::len::MinLen"]],["impl<I> UnwindSafe for PanicFuse<I>
where\n I: UnwindSafe,
",1,["rayon::iter::panic_fuse::PanicFuse"]],["impl<I> UnwindSafe for Rev<I>
where\n I: UnwindSafe,
",1,["rayon::iter::rev::Rev"]],["impl<I> UnwindSafe for Skip<I>
where\n I: UnwindSafe,
",1,["rayon::iter::skip::Skip"]],["impl<I> UnwindSafe for SkipAny<I>
where\n I: UnwindSafe,
",1,["rayon::iter::skip_any::SkipAny"]],["impl<I> UnwindSafe for StepBy<I>
where\n I: UnwindSafe,
",1,["rayon::iter::step_by::StepBy"]],["impl<I> UnwindSafe for Take<I>
where\n I: UnwindSafe,
",1,["rayon::iter::take::Take"]],["impl<I> UnwindSafe for TakeAny<I>
where\n I: UnwindSafe,
",1,["rayon::iter::take_any::TakeAny"]],["impl<I> UnwindSafe for UniformBlocks<I>
where\n I: UnwindSafe,
",1,["rayon::iter::blocks::UniformBlocks"]],["impl<I> UnwindSafe for WhileSome<I>
where\n I: UnwindSafe,
",1,["rayon::iter::while_some::WhileSome"]],["impl<I, F> UnwindSafe for FlatMap<I, F>
where\n F: UnwindSafe,\n I: UnwindSafe,
",1,["rayon::iter::flat_map::FlatMap"]],["impl<I, F> UnwindSafe for FlatMapIter<I, F>
where\n F: UnwindSafe,\n I: UnwindSafe,
",1,["rayon::iter::flat_map_iter::FlatMapIter"]],["impl<I, F> UnwindSafe for Inspect<I, F>
where\n F: UnwindSafe,\n I: UnwindSafe,
",1,["rayon::iter::inspect::Inspect"]],["impl<I, F> UnwindSafe for Map<I, F>
where\n F: UnwindSafe,\n I: UnwindSafe,
",1,["rayon::iter::map::Map"]],["impl<I, F> UnwindSafe for Update<I, F>
where\n F: UnwindSafe,\n I: UnwindSafe,
",1,["rayon::iter::update::Update"]],["impl<I, ID, F> UnwindSafe for Fold<I, ID, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n ID: UnwindSafe,
",1,["rayon::iter::fold::Fold"]],["impl<I, ID, F> UnwindSafe for FoldChunks<I, ID, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n ID: UnwindSafe,
",1,["rayon::iter::fold_chunks::FoldChunks"]],["impl<I, INIT, F> UnwindSafe for MapInit<I, INIT, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n INIT: UnwindSafe,
",1,["rayon::iter::map_with::MapInit"]],["impl<I, J> UnwindSafe for Interleave<I, J>
where\n I: UnwindSafe,\n J: UnwindSafe,
",1,["rayon::iter::interleave::Interleave"]],["impl<I, J> UnwindSafe for InterleaveShortest<I, J>
where\n I: UnwindSafe,\n J: UnwindSafe,
",1,["rayon::iter::interleave_shortest::InterleaveShortest"]],["impl<I, P> UnwindSafe for Filter<I, P>
where\n I: UnwindSafe,\n P: UnwindSafe,
",1,["rayon::iter::filter::Filter"]],["impl<I, P> UnwindSafe for FilterMap<I, P>
where\n I: UnwindSafe,\n P: UnwindSafe,
",1,["rayon::iter::filter_map::FilterMap"]],["impl<I, P> UnwindSafe for Positions<I, P>
where\n I: UnwindSafe,\n P: UnwindSafe,
",1,["rayon::iter::positions::Positions"]],["impl<I, P> UnwindSafe for SkipAnyWhile<I, P>
where\n I: UnwindSafe,\n P: UnwindSafe,
",1,["rayon::iter::skip_any_while::SkipAnyWhile"]],["impl<I, P> UnwindSafe for TakeAnyWhile<I, P>
where\n I: UnwindSafe,\n P: UnwindSafe,
",1,["rayon::iter::take_any_while::TakeAnyWhile"]],["impl<I, T, F> UnwindSafe for MapWith<I, T, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n T: UnwindSafe,
",1,["rayon::iter::map_with::MapWith"]],["impl<I, U, F> UnwindSafe for FoldChunksWith<I, U, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n U: UnwindSafe,
",1,["rayon::iter::fold_chunks_with::FoldChunksWith"]],["impl<I, U, F> UnwindSafe for FoldWith<I, U, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n U: UnwindSafe,
",1,["rayon::iter::fold::FoldWith"]],["impl<I, U, F> UnwindSafe for TryFoldWith<I, U, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n <U as Try>::Output: UnwindSafe,
",1,["rayon::iter::try_fold::TryFoldWith"]],["impl<I, U, ID, F> UnwindSafe for TryFold<I, U, ID, F>
where\n F: UnwindSafe,\n I: UnwindSafe,\n ID: UnwindSafe,\n U: UnwindSafe,
",1,["rayon::iter::try_fold::TryFold"]],["impl<Iter> UnwindSafe for IterBridge<Iter>
where\n Iter: UnwindSafe,
",1,["rayon::iter::par_bridge::IterBridge"]],["impl<K, V> UnwindSafe for IntoIter<K, V>
where\n K: UnwindSafe,\n V: UnwindSafe,
",1,["rayon::collections::btree_map::IntoIter"]],["impl<K, V> UnwindSafe for IntoIter<K, V>
where\n K: UnwindSafe,\n V: UnwindSafe,
",1,["rayon::collections::hash_map::IntoIter"]],["impl<S, B> UnwindSafe for WalkTree<S, B>
where\n B: UnwindSafe,\n S: UnwindSafe,
",1,["rayon::iter::walk_tree::WalkTree"]],["impl<S, B> UnwindSafe for WalkTreePostfix<S, B>
where\n B: UnwindSafe,\n S: UnwindSafe,
",1,["rayon::iter::walk_tree::WalkTreePostfix"]],["impl<S, B> UnwindSafe for WalkTreePrefix<S, B>
where\n B: UnwindSafe,\n S: UnwindSafe,
",1,["rayon::iter::walk_tree::WalkTreePrefix"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::collections::binary_heap::IntoIter"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::collections::btree_set::IntoIter"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::collections::hash_set::IntoIter"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::collections::linked_list::IntoIter"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::collections::vec_deque::IntoIter"]],["impl<T> UnwindSafe for Empty<T>
where\n T: UnwindSafe,
",1,["rayon::iter::empty::Empty"]],["impl<T> UnwindSafe for MultiZip<T>
where\n T: UnwindSafe,
",1,["rayon::iter::multizip::MultiZip"]],["impl<T> UnwindSafe for Once<T>
where\n T: UnwindSafe,
",1,["rayon::iter::once::Once"]],["impl<T> UnwindSafe for Repeat<T>
where\n T: UnwindSafe,
",1,["rayon::iter::repeat::Repeat"]],["impl<T> UnwindSafe for RepeatN<T>
where\n T: UnwindSafe,
",1,["rayon::iter::repeat::RepeatN"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::option::IntoIter"]],["impl<T> UnwindSafe for Iter<T>
where\n T: UnwindSafe,
",1,["rayon::range::Iter"]],["impl<T> UnwindSafe for Iter<T>
where\n T: UnwindSafe,
",1,["rayon::range_inclusive::Iter"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::result::IntoIter"]],["impl<T> UnwindSafe for IntoIter<T>
where\n T: UnwindSafe,
",1,["rayon::vec::IntoIter"]],["impl<T, const N: usize> UnwindSafe for IntoIter<T, N>
where\n T: UnwindSafe,
",1,["rayon::array::IntoIter"]]], +"rayon_core":[["impl !UnwindSafe for Configuration",1,["rayon_core::Configuration"]],["impl !UnwindSafe for ThreadBuilder",1,["rayon_core::registry::ThreadBuilder"]],["impl !UnwindSafe for ThreadPool",1,["rayon_core::thread_pool::ThreadPool"]],["impl !UnwindSafe for ThreadPoolBuildError",1,["rayon_core::ThreadPoolBuildError"]],["impl UnwindSafe for Yield",1,["rayon_core::thread_pool::Yield"]],["impl UnwindSafe for FnContext",1,["rayon_core::FnContext"]],["impl<'a> !UnwindSafe for BroadcastContext<'a>",1,["rayon_core::broadcast::BroadcastContext"]],["impl<'scope> !UnwindSafe for Scope<'scope>",1,["rayon_core::scope::Scope"]],["impl<'scope> !UnwindSafe for ScopeFifo<'scope>",1,["rayon_core::scope::ScopeFifo"]],["impl<S = DefaultSpawn> !UnwindSafe for ThreadPoolBuilder<S>",1,["rayon_core::ThreadPoolBuilder"]]], "read_fonts":[["impl UnwindSafe for ReadError",1,["read_fonts::read::ReadError"]],["impl UnwindSafe for BitmapDataFormat",1,["read_fonts::tables::bitmap::BitmapDataFormat"]],["impl UnwindSafe for BitmapMetrics",1,["read_fonts::tables::bitmap::BitmapMetrics"]],["impl UnwindSafe for MapVariant",1,["read_fonts::tables::cmap::MapVariant"]],["impl UnwindSafe for PlatformId",1,["read_fonts::tables::cmap::PlatformId"]],["impl UnwindSafe for CompositeMode",1,["read_fonts::tables::colr::CompositeMode"]],["impl UnwindSafe for Extend",1,["read_fonts::tables::colr::Extend"]],["impl UnwindSafe for GlyphClassDef",1,["read_fonts::tables::gdef::GlyphClassDef"]],["impl UnwindSafe for Opcode",1,["read_fonts::tables::glyf::bytecode::opcode::Opcode"]],["impl UnwindSafe for Anchor",1,["read_fonts::tables::glyf::Anchor"]],["impl UnwindSafe for ToPathError",1,["read_fonts::tables::glyf::ToPathError"]],["impl UnwindSafe for ToPathStyle",1,["read_fonts::tables::glyf::ToPathStyle"]],["impl UnwindSafe for DeltaFormat",1,["read_fonts::tables::layout::DeltaFormat"]],["impl UnwindSafe for Encoding",1,["read_fonts::tables::name::Encoding"]],["impl UnwindSafe for Entry",1,["read_fonts::tables::postscript::dict::Entry"]],["impl UnwindSafe for Operator",1,["read_fonts::tables::postscript::dict::Operator"]],["impl UnwindSafe for Token",1,["read_fonts::tables::postscript::dict::Token"]],["impl UnwindSafe for Error",1,["read_fonts::tables::postscript::Error"]],["impl UnwindSafe for Number",1,["read_fonts::tables::postscript::stack::Number"]],["impl UnwindSafe for TableRecord",1,["read_fonts::TableRecord"]],["impl UnwindSafe for AxisValueMap",1,["read_fonts::tables::avar::AxisValueMap"]],["impl UnwindSafe for BaseLangSysRecord",1,["read_fonts::tables::base::BaseLangSysRecord"]],["impl UnwindSafe for BaseScriptRecord",1,["read_fonts::tables::base::BaseScriptRecord"]],["impl UnwindSafe for FeatMinMaxRecord",1,["read_fonts::tables::base::FeatMinMaxRecord"]],["impl UnwindSafe for BdtComponent",1,["read_fonts::tables::bitmap::BdtComponent"]],["impl UnwindSafe for BigGlyphMetrics",1,["read_fonts::tables::bitmap::BigGlyphMetrics"]],["impl UnwindSafe for BitmapFlags",1,["read_fonts::tables::bitmap::BitmapFlags"]],["impl UnwindSafe for BitmapLocation",1,["read_fonts::tables::bitmap::BitmapLocation"]],["impl UnwindSafe for BitmapSize",1,["read_fonts::tables::bitmap::BitmapSize"]],["impl UnwindSafe for GlyphIdOffsetPair",1,["read_fonts::tables::bitmap::GlyphIdOffsetPair"]],["impl UnwindSafe for SbitLineMetrics",1,["read_fonts::tables::bitmap::SbitLineMetrics"]],["impl UnwindSafe for SmallGlyphMetrics",1,["read_fonts::tables::bitmap::SmallGlyphMetrics"]],["impl UnwindSafe for ConstantMapGroup",1,["read_fonts::tables::cmap::ConstantMapGroup"]],["impl UnwindSafe for EncodingRecord",1,["read_fonts::tables::cmap::EncodingRecord"]],["impl UnwindSafe for SequentialMapGroup",1,["read_fonts::tables::cmap::SequentialMapGroup"]],["impl UnwindSafe for SubHeader",1,["read_fonts::tables::cmap::SubHeader"]],["impl UnwindSafe for UnicodeRange",1,["read_fonts::tables::cmap::UnicodeRange"]],["impl UnwindSafe for UvsMapping",1,["read_fonts::tables::cmap::UvsMapping"]],["impl UnwindSafe for VariationSelector",1,["read_fonts::tables::cmap::VariationSelector"]],["impl UnwindSafe for BaseGlyph",1,["read_fonts::tables::colr::BaseGlyph"]],["impl UnwindSafe for BaseGlyphPaint",1,["read_fonts::tables::colr::BaseGlyphPaint"]],["impl UnwindSafe for Clip",1,["read_fonts::tables::colr::Clip"]],["impl UnwindSafe for ColorIndex",1,["read_fonts::tables::colr::ColorIndex"]],["impl UnwindSafe for ColorStop",1,["read_fonts::tables::colr::ColorStop"]],["impl UnwindSafe for Layer",1,["read_fonts::tables::colr::Layer"]],["impl UnwindSafe for VarColorIndex",1,["read_fonts::tables::colr::VarColorIndex"]],["impl UnwindSafe for VarColorStop",1,["read_fonts::tables::colr::VarColorStop"]],["impl UnwindSafe for ColorRecord",1,["read_fonts::tables::cpal::ColorRecord"]],["impl UnwindSafe for PaletteType",1,["read_fonts::tables::cpal::PaletteType"]],["impl UnwindSafe for CvtDelta",1,["read_fonts::tables::cvar::CvtDelta"]],["impl UnwindSafe for VariationAxisRecord",1,["read_fonts::tables::fvar::VariationAxisRecord"]],["impl UnwindSafe for GaspRange",1,["read_fonts::tables::gasp::GaspRange"]],["impl UnwindSafe for GaspRangeBehavior",1,["read_fonts::tables::gasp::GaspRangeBehavior"]],["impl UnwindSafe for DecodeError",1,["read_fonts::tables::glyf::bytecode::decode::DecodeError"]],["impl UnwindSafe for Component",1,["read_fonts::tables::glyf::Component"]],["impl UnwindSafe for CompositeGlyphFlags",1,["read_fonts::tables::glyf::CompositeGlyphFlags"]],["impl UnwindSafe for CurvePoint",1,["read_fonts::tables::glyf::CurvePoint"]],["impl UnwindSafe for PointFlags",1,["read_fonts::tables::glyf::PointFlags"]],["impl UnwindSafe for PointMarker",1,["read_fonts::tables::glyf::PointMarker"]],["impl UnwindSafe for SimpleGlyphFlags",1,["read_fonts::tables::glyf::SimpleGlyphFlags"]],["impl UnwindSafe for Transform",1,["read_fonts::tables::glyf::Transform"]],["impl UnwindSafe for Class2Record",1,["read_fonts::tables::gpos::Class2Record"]],["impl UnwindSafe for EntryExitRecord",1,["read_fonts::tables::gpos::EntryExitRecord"]],["impl UnwindSafe for MarkRecord",1,["read_fonts::tables::gpos::MarkRecord"]],["impl UnwindSafe for PairValueRecord",1,["read_fonts::tables::gpos::PairValueRecord"]],["impl UnwindSafe for ValueFormat",1,["read_fonts::tables::gpos::ValueFormat"]],["impl UnwindSafe for ValueRecord",1,["read_fonts::tables::gpos::value_record::ValueRecord"]],["impl UnwindSafe for GlyphDelta",1,["read_fonts::tables::gvar::GlyphDelta"]],["impl UnwindSafe for GvarFlags",1,["read_fonts::tables::gvar::GvarFlags"]],["impl UnwindSafe for U16Or32",1,["read_fonts::tables::gvar::U16Or32"]],["impl UnwindSafe for MacStyle",1,["read_fonts::tables::head::MacStyle"]],["impl UnwindSafe for LongMetric",1,["read_fonts::tables::hmtx::LongMetric"]],["impl UnwindSafe for ClassRangeRecord",1,["read_fonts::tables::layout::ClassRangeRecord"]],["impl UnwindSafe for FeatureRecord",1,["read_fonts::tables::layout::FeatureRecord"]],["impl UnwindSafe for FeatureTableSubstitutionRecord",1,["read_fonts::tables::layout::FeatureTableSubstitutionRecord"]],["impl UnwindSafe for FeatureVariationRecord",1,["read_fonts::tables::layout::FeatureVariationRecord"]],["impl UnwindSafe for LangSysRecord",1,["read_fonts::tables::layout::LangSysRecord"]],["impl UnwindSafe for LookupFlag",1,["read_fonts::tables::layout::lookupflag::LookupFlag"]],["impl UnwindSafe for RangeRecord",1,["read_fonts::tables::layout::RangeRecord"]],["impl UnwindSafe for ScriptRecord",1,["read_fonts::tables::layout::ScriptRecord"]],["impl UnwindSafe for SequenceLookupRecord",1,["read_fonts::tables::layout::SequenceLookupRecord"]],["impl UnwindSafe for ValueRecord",1,["read_fonts::tables::mvar::ValueRecord"]],["impl UnwindSafe for LangTagRecord",1,["read_fonts::tables::name::LangTagRecord"]],["impl UnwindSafe for MacRomanMapping",1,["read_fonts::tables::name::MacRomanMapping"]],["impl UnwindSafe for NameRecord",1,["read_fonts::tables::name::NameRecord"]],["impl UnwindSafe for SelectionFlags",1,["read_fonts::tables::os2::SelectionFlags"]],["impl UnwindSafe for Blues",1,["read_fonts::tables::postscript::dict::Blues"]],["impl UnwindSafe for StemSnaps",1,["read_fonts::tables::postscript::dict::StemSnaps"]],["impl UnwindSafe for FdSelectRange3",1,["read_fonts::tables::postscript::FdSelectRange3"]],["impl UnwindSafe for FdSelectRange4",1,["read_fonts::tables::postscript::FdSelectRange4"]],["impl UnwindSafe for Stack",1,["read_fonts::tables::postscript::stack::Stack"]],["impl UnwindSafe for StringId",1,["read_fonts::tables::postscript::string::StringId"]],["impl UnwindSafe for HeaderFlags",1,["read_fonts::tables::sbix::HeaderFlags"]],["impl UnwindSafe for AxisRecord",1,["read_fonts::tables::stat::AxisRecord"]],["impl UnwindSafe for AxisValueRecord",1,["read_fonts::tables::stat::AxisValueRecord"]],["impl UnwindSafe for AxisValueTableFlags",1,["read_fonts::tables::stat::AxisValueTableFlags"]],["impl UnwindSafe for DeltaSetIndex",1,["read_fonts::tables::variations::DeltaSetIndex"]],["impl UnwindSafe for EntryFormat",1,["read_fonts::tables::variations::EntryFormat"]],["impl UnwindSafe for FloatItemDelta",1,["read_fonts::tables::variations::FloatItemDelta"]],["impl UnwindSafe for RegionAxisCoordinates",1,["read_fonts::tables::variations::RegionAxisCoordinates"]],["impl UnwindSafe for TupleIndex",1,["read_fonts::tables::variations::TupleIndex"]],["impl UnwindSafe for TupleVariationCount",1,["read_fonts::tables::variations::TupleVariationCount"]],["impl<'a> UnwindSafe for FileRef<'a>",1,["read_fonts::FileRef"]],["impl<'a> UnwindSafe for BaseCoord<'a>",1,["read_fonts::tables::base::BaseCoord"]],["impl<'a> UnwindSafe for BitmapContent<'a>",1,["read_fonts::tables::bitmap::BitmapContent"]],["impl<'a> UnwindSafe for IndexSubtable<'a>",1,["read_fonts::tables::bitmap::IndexSubtable"]],["impl<'a> UnwindSafe for CmapSubtable<'a>",1,["read_fonts::tables::cmap::CmapSubtable"]],["impl<'a> UnwindSafe for ClipBox<'a>",1,["read_fonts::tables::colr::ClipBox"]],["impl<'a> UnwindSafe for Paint<'a>",1,["read_fonts::tables::colr::Paint"]],["impl<'a> UnwindSafe for CaretValue<'a>",1,["read_fonts::tables::gdef::CaretValue"]],["impl<'a> UnwindSafe for Glyph<'a>",1,["read_fonts::tables::glyf::Glyph"]],["impl<'a> UnwindSafe for AnchorTable<'a>",1,["read_fonts::tables::gpos::AnchorTable"]],["impl<'a> UnwindSafe for ExtensionSubtable<'a>",1,["read_fonts::tables::gpos::ExtensionSubtable"]],["impl<'a> UnwindSafe for PairPos<'a>",1,["read_fonts::tables::gpos::PairPos"]],["impl<'a> UnwindSafe for PositionLookup<'a>",1,["read_fonts::tables::gpos::PositionLookup"]],["impl<'a> UnwindSafe for PositionSubtables<'a>",1,["read_fonts::tables::gpos::PositionSubtables"]],["impl<'a> UnwindSafe for SinglePos<'a>",1,["read_fonts::tables::gpos::SinglePos"]],["impl<'a> UnwindSafe for ExtensionSubtable<'a>",1,["read_fonts::tables::gsub::ExtensionSubtable"]],["impl<'a> UnwindSafe for SingleSubst<'a>",1,["read_fonts::tables::gsub::SingleSubst"]],["impl<'a> UnwindSafe for SubstitutionLookup<'a>",1,["read_fonts::tables::gsub::SubstitutionLookup"]],["impl<'a> UnwindSafe for SubstitutionSubtables<'a>",1,["read_fonts::tables::gsub::SubstitutionSubtables"]],["impl<'a> UnwindSafe for ChainedSequenceContext<'a>",1,["read_fonts::tables::layout::ChainedSequenceContext"]],["impl<'a> UnwindSafe for ClassDef<'a>",1,["read_fonts::tables::layout::ClassDef"]],["impl<'a> UnwindSafe for CoverageTable<'a>",1,["read_fonts::tables::layout::CoverageTable"]],["impl<'a> UnwindSafe for DeviceOrVariationIndex<'a>",1,["read_fonts::tables::layout::DeviceOrVariationIndex"]],["impl<'a> UnwindSafe for FeatureParams<'a>",1,["read_fonts::tables::layout::FeatureParams"]],["impl<'a> UnwindSafe for SequenceContext<'a>",1,["read_fonts::tables::layout::SequenceContext"]],["impl<'a> UnwindSafe for Loca<'a>",1,["read_fonts::tables::loca::Loca"]],["impl<'a> UnwindSafe for FdSelect<'a>",1,["read_fonts::tables::postscript::FdSelect"]],["impl<'a> UnwindSafe for Index<'a>",1,["read_fonts::tables::postscript::index::Index"]],["impl<'a> UnwindSafe for AxisValue<'a>",1,["read_fonts::tables::stat::AxisValue"]],["impl<'a> UnwindSafe for DeltaSetIndexMap<'a>",1,["read_fonts::tables::variations::DeltaSetIndexMap"]],["impl<'a> UnwindSafe for CollectionRef<'a>",1,["read_fonts::CollectionRef"]],["impl<'a> UnwindSafe for FontData<'a>",1,["read_fonts::font_data::FontData"]],["impl<'a> UnwindSafe for FontRef<'a>",1,["read_fonts::FontRef"]],["impl<'a> UnwindSafe for SegmentMaps<'a>",1,["read_fonts::tables::avar::SegmentMaps"]],["impl<'a> UnwindSafe for BitmapData<'a>",1,["read_fonts::tables::bitmap::BitmapData"]],["impl<'a> UnwindSafe for Cff<'a>",1,["read_fonts::tables::cff::Cff"]],["impl<'a> UnwindSafe for Cff2<'a>",1,["read_fonts::tables::cff2::Cff2"]],["impl<'a> UnwindSafe for Cmap12Iter<'a>",1,["read_fonts::tables::cmap::Cmap12Iter"]],["impl<'a> UnwindSafe for Cmap14Iter<'a>",1,["read_fonts::tables::cmap::Cmap14Iter"]],["impl<'a> UnwindSafe for Cmap4Iter<'a>",1,["read_fonts::tables::cmap::Cmap4Iter"]],["impl<'a> UnwindSafe for InstanceRecord<'a>",1,["read_fonts::tables::fvar::instance_record::InstanceRecord"]],["impl<'a> UnwindSafe for Decoder<'a>",1,["read_fonts::tables::glyf::bytecode::decode::Decoder"]],["impl<'a> UnwindSafe for InlineOperands<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::InlineOperands"]],["impl<'a> UnwindSafe for Instruction<'a>",1,["read_fonts::tables::glyf::bytecode::instruction::Instruction"]],["impl<'a> UnwindSafe for BaseRecord<'a>",1,["read_fonts::tables::gpos::BaseRecord"]],["impl<'a> UnwindSafe for Class1Record<'a>",1,["read_fonts::tables::gpos::Class1Record"]],["impl<'a> UnwindSafe for ComponentRecord<'a>",1,["read_fonts::tables::gpos::ComponentRecord"]],["impl<'a> UnwindSafe for Mark2Record<'a>",1,["read_fonts::tables::gpos::Mark2Record"]],["impl<'a> UnwindSafe for CharIter<'a>",1,["read_fonts::tables::name::CharIter"]],["impl<'a> UnwindSafe for NameString<'a>",1,["read_fonts::tables::name::NameString"]],["impl<'a> UnwindSafe for PString<'a>",1,["read_fonts::tables::post::PString"]],["impl<'a> UnwindSafe for BlendState<'a>",1,["read_fonts::tables::postscript::blend::BlendState"]],["impl<'a> UnwindSafe for Latin1String<'a>",1,["read_fonts::tables::postscript::string::Latin1String"]],["impl<'a> UnwindSafe for DeltaRunIter<'a>",1,["read_fonts::tables::variations::DeltaRunIter"]],["impl<'a> UnwindSafe for PackedDeltas<'a>",1,["read_fonts::tables::variations::PackedDeltas"]],["impl<'a> UnwindSafe for PackedPointNumbers<'a>",1,["read_fonts::tables::variations::PackedPointNumbers"]],["impl<'a> UnwindSafe for PackedPointNumbersIter<'a>",1,["read_fonts::tables::variations::PackedPointNumbersIter"]],["impl<'a> UnwindSafe for Tuple<'a>",1,["read_fonts::tables::variations::Tuple"]],["impl<'a> UnwindSafe for TupleVariationHeaderIter<'a>",1,["read_fonts::tables::variations::TupleVariationHeaderIter"]],["impl<'a> UnwindSafe for VariationRegion<'a>",1,["read_fonts::tables::variations::VariationRegion"]],["impl<'a, P> !UnwindSafe for PenSink<'a, P>",1,["read_fonts::tables::postscript::charstring::PenSink"]],["impl<'a, T> UnwindSafe for ComputedArray<'a, T>
where\n <T as ReadArgs>::Args: UnwindSafe,
",1,["read_fonts::array::ComputedArray"]],["impl<'a, T> UnwindSafe for VarLenArray<'a, T>
where\n T: RefUnwindSafe,
",1,["read_fonts::array::VarLenArray"]],["impl<'a, T> UnwindSafe for TableRef<'a, T>
where\n T: UnwindSafe,
",1,["read_fonts::table_ref::TableRef"]],["impl<'a, T> UnwindSafe for TupleDeltaIter<'a, T>",1,["read_fonts::tables::variations::TupleDeltaIter"]],["impl<'a, T> UnwindSafe for TupleVariation<'a, T>",1,["read_fonts::tables::variations::TupleVariation"]],["impl<'a, T> UnwindSafe for TupleVariationData<'a, T>",1,["read_fonts::tables::variations::TupleVariationData"]],["impl<'a, T> UnwindSafe for TupleVariationIter<'a, T>",1,["read_fonts::tables::variations::TupleVariationIter"]],["impl<'a, T, Ext> UnwindSafe for Subtables<'a, T, Ext>",1,["read_fonts::tables::layout::Subtables"]],["impl<'a, T, O> UnwindSafe for ArrayOfNullableOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: UnwindSafe,\n <O as Scalar>::Raw: RefUnwindSafe,
",1,["read_fonts::offset_array::ArrayOfNullableOffsets"]],["impl<'a, T, O> UnwindSafe for ArrayOfOffsets<'a, T, O>
where\n <T as ReadArgs>::Args: UnwindSafe,\n <O as Scalar>::Raw: RefUnwindSafe,
",1,["read_fonts::offset_array::ArrayOfOffsets"]]], "roxmltree":[["impl UnwindSafe for Error",1,["roxmltree::parse::Error"]],["impl UnwindSafe for NodeType",1,["roxmltree::NodeType"]],["impl UnwindSafe for NodeId",1,["roxmltree::NodeId"]],["impl UnwindSafe for ParsingOptions",1,["roxmltree::parse::ParsingOptions"]],["impl UnwindSafe for TextPos",1,["roxmltree::TextPos"]],["impl<'a, 'b> UnwindSafe for ExpandedName<'a, 'b>",1,["roxmltree::ExpandedName"]],["impl<'a, 'input> UnwindSafe for Attribute<'a, 'input>",1,["roxmltree::Attribute"]],["impl<'a, 'input> UnwindSafe for Attributes<'a, 'input>",1,["roxmltree::Attributes"]],["impl<'a, 'input> UnwindSafe for AxisIter<'a, 'input>",1,["roxmltree::AxisIter"]],["impl<'a, 'input> UnwindSafe for Children<'a, 'input>",1,["roxmltree::Children"]],["impl<'a, 'input> UnwindSafe for Descendants<'a, 'input>",1,["roxmltree::Descendants"]],["impl<'a, 'input> UnwindSafe for NamespaceIter<'a, 'input>",1,["roxmltree::NamespaceIter"]],["impl<'a, 'input> UnwindSafe for Node<'a, 'input>",1,["roxmltree::Node"]],["impl<'input> UnwindSafe for StringStorage<'input>",1,["roxmltree::StringStorage"]],["impl<'input> UnwindSafe for Document<'input>",1,["roxmltree::Document"]],["impl<'input> UnwindSafe for Namespace<'input>",1,["roxmltree::Namespace"]],["impl<'input> UnwindSafe for PI<'input>",1,["roxmltree::PI"]]], "rustc_hash":[["impl UnwindSafe for FxHasher",1,["rustc_hash::FxHasher"]]], diff --git a/trait.impl/crossbeam_epoch/atomic/trait.CompareAndSetOrdering.js b/trait.impl/crossbeam_epoch/atomic/trait.CompareAndSetOrdering.js new file mode 100644 index 0000000000..7fa1035e73 --- /dev/null +++ b/trait.impl/crossbeam_epoch/atomic/trait.CompareAndSetOrdering.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"crossbeam_epoch":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/crossbeam_epoch/atomic/trait.Pointable.js b/trait.impl/crossbeam_epoch/atomic/trait.Pointable.js new file mode 100644 index 0000000000..7fa1035e73 --- /dev/null +++ b/trait.impl/crossbeam_epoch/atomic/trait.Pointable.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"crossbeam_epoch":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/crossbeam_epoch/atomic/trait.Pointer.js b/trait.impl/crossbeam_epoch/atomic/trait.Pointer.js new file mode 100644 index 0000000000..7fa1035e73 --- /dev/null +++ b/trait.impl/crossbeam_epoch/atomic/trait.Pointer.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"crossbeam_epoch":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/crossbeam_utils/atomic/consume/trait.AtomicConsume.js b/trait.impl/crossbeam_utils/atomic/consume/trait.AtomicConsume.js new file mode 100644 index 0000000000..aad66a381a --- /dev/null +++ b/trait.impl/crossbeam_utils/atomic/consume/trait.AtomicConsume.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"crossbeam_utils":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/either/into_either/trait.IntoEither.js b/trait.impl/either/into_either/trait.IntoEither.js new file mode 100644 index 0000000000..f6bc39da67 --- /dev/null +++ b/trait.impl/either/into_either/trait.IntoEither.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"either":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/par_bridge/trait.ParallelBridge.js b/trait.impl/rayon/iter/par_bridge/trait.ParallelBridge.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/par_bridge/trait.ParallelBridge.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.FromParallelIterator.js b/trait.impl/rayon/iter/trait.FromParallelIterator.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.FromParallelIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.IndexedParallelIterator.js b/trait.impl/rayon/iter/trait.IndexedParallelIterator.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.IndexedParallelIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.IntoParallelIterator.js b/trait.impl/rayon/iter/trait.IntoParallelIterator.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.IntoParallelIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.IntoParallelRefIterator.js b/trait.impl/rayon/iter/trait.IntoParallelRefIterator.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.IntoParallelRefIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.IntoParallelRefMutIterator.js b/trait.impl/rayon/iter/trait.IntoParallelRefMutIterator.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.IntoParallelRefMutIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.ParallelDrainFull.js b/trait.impl/rayon/iter/trait.ParallelDrainFull.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.ParallelDrainFull.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.ParallelDrainRange.js b/trait.impl/rayon/iter/trait.ParallelDrainRange.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.ParallelDrainRange.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.ParallelExtend.js b/trait.impl/rayon/iter/trait.ParallelExtend.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.ParallelExtend.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/iter/trait.ParallelIterator.js b/trait.impl/rayon/iter/trait.ParallelIterator.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/iter/trait.ParallelIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/slice/trait.ParallelSlice.js b/trait.impl/rayon/slice/trait.ParallelSlice.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/slice/trait.ParallelSlice.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/slice/trait.ParallelSliceMut.js b/trait.impl/rayon/slice/trait.ParallelSliceMut.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/slice/trait.ParallelSliceMut.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/rayon/str/trait.ParallelString.js b/trait.impl/rayon/str/trait.ParallelString.js new file mode 100644 index 0000000000..d2551eb268 --- /dev/null +++ b/trait.impl/rayon/str/trait.ParallelString.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"rayon":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/std/os/unix/thread/trait.JoinHandleExt.js b/trait.impl/std/os/unix/thread/trait.JoinHandleExt.js new file mode 100644 index 0000000000..77a3079cdb --- /dev/null +++ b/trait.impl/std/os/unix/thread/trait.JoinHandleExt.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"crossbeam_utils":[["impl<T> JoinHandleExt for ScopedJoinHandle<'_, T>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/type.impl/crossbeam_epoch/struct.CompareExchangeError.js b/type.impl/crossbeam_epoch/struct.CompareExchangeError.js new file mode 100644 index 0000000000..1f6e3b8c44 --- /dev/null +++ b/type.impl/crossbeam_epoch/struct.CompareExchangeError.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"crossbeam_epoch":[["
source§

impl<T, P: Pointer<T> + Debug> Debug for CompareExchangeError<'_, T, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","crossbeam_epoch::atomic::CompareAndSetError"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file