pub struct TraversalStream { /* private fields */ }Expand description
Dispenses activations for one traversal of a kernel.
The stream holds the comprehension’s tuples addressed by position
(IndexedTuples): opening evaluated every source, and each
activation computes its own tuple, so len, seek, and
activation(index) cost the same at any index, and an order’s
selection over a large product holds only the selected positions.
Implementations§
Source§impl TraversalStream
impl TraversalStream
Sourcepub fn seek(&mut self, index: usize)
pub fn seek(&mut self, index: usize)
Move the dispense position. Every strategy is a decidable permutation, so seeking costs nothing beyond the index.
Sourcepub fn engine(&self) -> Engine
pub fn engine(&self) -> Engine
The engine this stream’s activations run on: the engine of the kernel that opened the traversal.
Sourcepub fn body_program(&self) -> Result<Arc<dyn KernelProgram>, String>
pub fn body_program(&self) -> Result<Arc<dyn KernelProgram>, String>
The body’s program on this stream’s engine — the one every activation is a kernel over, compiled once and shared, which is what makes activation cost no compile.
Sourcepub fn advance(&mut self) -> Result<Option<Activation<Box<dyn Kernel>>>, String>
pub fn advance(&mut self) -> Result<Option<Activation<Box<dyn Kernel>>>, String>
The next activation, or None when exhausted.
Sourcepub fn activation(
&self,
index: usize,
) -> Result<Activation<Box<dyn Kernel>>, String>
pub fn activation( &self, index: usize, ) -> Result<Activation<Box<dyn Kernel>>, String>
Build the activation at index without moving the dispense
position. Fibers partition a traversal by calling this over
disjoint index ranges.
The kernel is on the stream’s engine — the one the kernel that opened the traversal runs on.
Sourcepub fn activation_on(
&self,
index: usize,
engine: Engine,
) -> Result<Activation<Box<dyn Kernel>>, String>
pub fn activation_on( &self, index: usize, engine: Engine, ) -> Result<Activation<Box<dyn Kernel>>, String>
Self::activation on engine (engines.md §3.6): a fresh
kernel over the body’s program for that engine, compiled once
per engine and shared by every activation after, driven through
the Kernel trait with the same elements, cascade, and cursor
narrowing. An engine that cannot run the body says so by name.
Auto Trait Implementations§
impl !RefUnwindSafe for TraversalStream
impl !UnwindSafe for TraversalStream
impl Freeze for TraversalStream
impl Send for TraversalStream
impl Sync for TraversalStream
impl Unpin for TraversalStream
impl UnsafeUnpin for TraversalStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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