pub struct Traversal {
pub span: Span,
pub source_text: String,
pub comprehension: Comprehension,
pub elements: Vec<(String, PortType)>,
pub cascade: Vec<(String, PortType)>,
pub program: Arc<PolydatProgram>,
pub body: Arc<BodySource>,
}Expand description
A compiled traversal: one for statement and the child program its
body lowered to.
Fields§
§span: SpanLexical position of the for statement in its parent.
source_text: StringThe text after for, as written.
comprehension: ComprehensionThe comprehension traversed, with a producer reference already resolved to the producer’s comprehension.
elements: Vec<(String, PortType)>Element names and their compile-time types, in tuple order.
cascade: Vec<(String, PortType)>Outer wires the body references, with the parent’s types. Bound from the parent at activation.
program: Arc<PolydatProgram>The body’s program on the interpreter. Compiled once; every interpreter activation shares it.
body: Arc<BodySource>The body as the parent compiled it, for activations on the other engines (engines.md §3.6): compiled once per engine, on the first activation that asks.
Implementations§
Source§impl Traversal
impl Traversal
Sourcepub fn program_on(
&self,
engine: Engine,
) -> Result<Arc<dyn KernelProgram>, KernelError>
pub fn program_on( &self, engine: Engine, ) -> Result<Arc<dyn KernelProgram>, KernelError>
The body’s program on engine, compiled on the first call for
that engine and shared by every activation after it, as the
interpreter’s program is (for_traversal.md §5.1, §5.2), its own for
statements included: an activation on any engine opens them.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Traversal
impl !UnwindSafe for Traversal
impl Forget for Traversal
impl Freeze for Traversalwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<LiteralValue>: Freeze,
PhantomData<ProductMeasure>: Freeze,
PhantomData<f64>: Freeze,
PhantomData<Comprehension>: Freeze,
*const Comprehension is !null: Freeze,
PhantomData<(String, PortType)>: Freeze,
*const ArcInner<PolydatProgram> is !null: Freeze,
PhantomData<ArcInner<PolydatProgram>>: Freeze,
*const ArcInner<BodySource> is !null: Freeze,
PhantomData<ArcInner<BodySource>>: Freeze,
impl Move for Traversal
impl Send for Traversalwhere
RawVecInner: Send,
RawTable<usize>: Send,
BoxRaw<Comprehension>: Send,
Arc<PolydatProgram>: Send,
Arc<BodySource>: Send,
impl Sync for Traversalwhere
RawVecInner: Sync,
RawTable<usize>: Sync,
BoxRaw<Comprehension>: Sync,
Arc<PolydatProgram>: Sync,
Arc<BodySource>: Sync,
impl Unpin for Traversalwhere
*const u8 is !null: Unpin,
Box<Comprehension>: Unpin,
Arc<PolydatProgram>: Unpin,
Arc<BodySource>: Unpin,
impl UnsafeUnpin for Traversalwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<LiteralValue>: UnsafeUnpin,
PhantomData<ProductMeasure>: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
PhantomData<Comprehension>: UnsafeUnpin,
*const Comprehension is !null: UnsafeUnpin,
PhantomData<(String, PortType)>: UnsafeUnpin,
*const ArcInner<PolydatProgram> is !null: UnsafeUnpin,
PhantomData<ArcInner<PolydatProgram>>: UnsafeUnpin,
*const ArcInner<BodySource> is !null: UnsafeUnpin,
PhantomData<ArcInner<BodySource>>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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