pub struct Activation<K = PolydatKernel> {
pub index: u64,
pub coords: Vec<(String, Value)>,
pub kernel: K,
pub cursor: Option<CursorSlice>,
}Expand description
One child scope of a traversal: the tuple it was activated for, a
fresh kernel over the body’s program, and its cursor slice if the
body declares a cursor. The kernel is the interpreter’s by default;
TraversalStream::activation_on builds one on any engine behind
the Kernel trait (engine parity, step 8).
Fields§
§index: u64Position of this activation’s tuple in the traversal’s dispense order.
coords: Vec<(String, Value)>The tuple, in element order.
kernel: KA fresh kernel over the body’s shared program.
cursor: Option<CursorSlice>The narrowest cursor slice, when the body declares a cursor.
Implementations§
Source§impl<K> Activation<K>
impl<K> Activation<K>
Source§impl Activation<Box<dyn Kernel>>
impl Activation<Box<dyn Kernel>>
Source§impl Activation
impl Activation
Sourcepub fn cycle(&mut self, i: u64) -> &mut PolydatKernel
pub fn cycle(&mut self, i: u64) -> &mut PolydatKernel
Position the kernel at cycle i and return it ready to pull.
The body’s cycle coordinate is the local index; the cursor’s
ordinal slot receives the absolute ordinal.
Sourcepub fn for_each_cycle(&mut self, f: impl FnMut(u64, &mut PolydatKernel))
pub fn for_each_cycle(&mut self, f: impl FnMut(u64, &mut PolydatKernel))
Run f once per cycle, in order.
Trait Implementations§
Source§impl Debug for Activation
impl Debug for Activation
Auto Trait Implementations§
impl<K = PolydatKernel> !RefUnwindSafe for Activation<K>
impl<K = PolydatKernel> !UnwindSafe for Activation<K>
impl<K> Freeze for Activation<K>where
K: Freeze,
impl<K> Send for Activation<K>where
K: Send,
impl<K> Sync for Activation<K>where
K: Sync,
impl<K> Unpin for Activation<K>where
K: Unpin,
impl<K> UnsafeUnpin for Activation<K>where
K: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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