pub struct ScopeFixture { /* private fields */ }Expand description
Init-time accumulator for consumer-declared pulls.
Holds an Arc<PolydatProgram> clone of the per-template canonical
kernel’s program (SRD 16 §“Per-Scope Canonical Kernel Cache”).
The program carries every fact this fixture needs at
registration time — the output map, input definitions, and
auto-extern-provisioned externs — so no per-fiber state is
touched until the sealed PullPlan is resolved at cycle
time. Each consumer registers names via register_pull;
the fixture deduplicates by name and yields a stable
PullHandle for each unique registration.
Implementations§
Source§impl ScopeFixture
impl ScopeFixture
Sourcepub fn new(program: Arc<PolydatProgram>) -> Self
pub fn new(program: Arc<PolydatProgram>) -> Self
Open a new fixture against a per-template canonical program. The Arc clone is cheap; the activity construction loop typically already holds the program for adapter dispatch and bind-plan synthesis.
Sourcepub fn program(&self) -> &Arc<PolydatProgram> ⓘ
pub fn program(&self) -> &Arc<PolydatProgram> ⓘ
The program this fixture is scoped against. Useful for consumers that need to inspect the manifest (e.g. type- aware strict parsing).
Sourcepub fn register_pull(&mut self, name: &str) -> Result<PullHandle, String>
pub fn register_pull(&mut self, name: &str) -> Result<PullHandle, String>
Register a name. Resolves it against the program’s output
map (folded constants) first, then against find_input
(extern slots, capture inputs, coordinates).
Returns a memoized handle. Re-registering the same name returns the existing handle — registrations are idempotent.
Errors when the program does not know the name. The Polydat compiler is responsible for provisioning every name referenced anywhere in the op template (op fields and params; SRD 16 §“Auto-Extern Generation”). An unknown name here therefore signals a workload bug — typically a reference to a binding that was never declared, or a typo that the compiler should have already caught.
Auto Trait Implementations§
impl !RefUnwindSafe for ScopeFixture
impl !UnwindSafe for ScopeFixture
impl Freeze for ScopeFixture
impl Send for ScopeFixture
impl Sync for ScopeFixture
impl Unpin for ScopeFixture
impl UnsafeUnpin for ScopeFixture
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