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 (engine parity, step 8): 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 (SRD 113 §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 Freeze for Traversal
impl Send for Traversal
impl Sync for Traversal
impl Unpin for Traversal
impl UnsafeUnpin for Traversal
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