pub struct PolydatKernelScope { /* private fields */ }Expand description
Wrapper around a (canonical, parent) PolydatKernel pair that
implements KernelScope.
canonicalis the comprehension’s prototype kernel — built once at scope-synthesis time, materialized fresh per iteration viafor_iteration.parentis the enclosing scope’s kernel — provides the outer scope chain thatmaterialize_subscopewires into every iteration’s child.
scope(coords) converts the algebra-layer Tuple to a
polydat [(String, Value)] bindings slice and calls
PolydatKernel::for_iteration(&canonical, &parent, &bindings).
Implementations§
Source§impl PolydatKernelScope
impl PolydatKernelScope
Sourcepub fn new(canonical: Arc<PolydatKernel>, parent: Arc<PolydatKernel>) -> Self
pub fn new(canonical: Arc<PolydatKernel>, parent: Arc<PolydatKernel>) -> Self
Construct the scope wrapper from the comprehension’s canonical kernel and the enclosing parent kernel.
Sourcepub fn canonical(&self) -> &Arc<PolydatKernel> ⓘ
pub fn canonical(&self) -> &Arc<PolydatKernel> ⓘ
Access the canonical kernel — useful when the consumer
needs to share metadata (input manifest, scope
coordinates) without invoking scope.
Sourcepub fn parent(&self) -> &Arc<PolydatKernel> ⓘ
pub fn parent(&self) -> &Arc<PolydatKernel> ⓘ
Access the parent kernel.
Trait Implementations§
Source§impl Clone for PolydatKernelScope
impl Clone for PolydatKernelScope
Source§fn clone(&self) -> PolydatKernelScope
fn clone(&self) -> PolydatKernelScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolydatKernelScope
impl Debug for PolydatKernelScope
Source§impl KernelScope for PolydatKernelScope
impl KernelScope for PolydatKernelScope
Source§type Scoped = Arc<PolydatKernel>
type Scoped = Arc<PolydatKernel>
Each scope produces a fresh Arc<PolydatKernel> — the
per-iteration child kernel. Consumers can clone the Arc
cheaply if they need multiple references.
Auto Trait Implementations§
impl !RefUnwindSafe for PolydatKernelScope
impl !UnwindSafe for PolydatKernelScope
impl Freeze for PolydatKernelScope
impl Send for PolydatKernelScope
impl Sync for PolydatKernelScope
impl Unpin for PolydatKernelScope
impl UnsafeUnpin for PolydatKernelScope
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> 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> ⓘ
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