pub struct ScopeModule<M> { /* private fields */ }Expand description
Closed, immutable module-matter artifact.
Produced by super::SubcontextBuilder::finalize; consumed
by super::ScopeKernel::spawn. The artifact carries no
live reference to its parent — it can be stored, hashed,
inspected, or moved freely.
Implementations§
Source§impl<M> ScopeModule<M>
impl<M> ScopeModule<M>
Sourcepub fn imports(&self) -> &[ImportSpec]
pub fn imports(&self) -> &[ImportSpec]
The imports the module declares.
Sourcepub fn exports(&self) -> &[ExportSpec]
pub fn exports(&self) -> &[ExportSpec]
The exports the module declares.
Sourcepub fn program(&self) -> &Arc<PolydatProgram> ⓘ
pub fn program(&self) -> &Arc<PolydatProgram> ⓘ
The body’s compiled program.
Sourcepub fn contract(&self) -> &ScopeContract<M>
pub fn contract(&self) -> &ScopeContract<M>
The contract the module was built against.
Sourcepub fn context(&self) -> &SourceContext
pub fn context(&self) -> &SourceContext
Where the module comes from.
Sourcepub fn consumers(&self) -> &[RegisteredPullConsumer]
pub fn consumers(&self) -> &[RegisteredPullConsumer]
The pull consumers registered on the module’s outputs.
Sourcepub fn diagnostics(&self) -> &[String]
pub fn diagnostics(&self) -> &[String]
Diagnostics the build recorded.
Sourcepub fn write_throughs(&self) -> &[WriteThroughBinding]
pub fn write_throughs(&self) -> &[WriteThroughBinding]
Rule 2 write-through bindings produced by the builder for
child exports that collide with a parent shared export.
Trait Implementations§
Auto Trait Implementations§
impl<M> !RefUnwindSafe for ScopeModule<M>
impl<M> !UnwindSafe for ScopeModule<M>
impl<M> Freeze for ScopeModule<M>
impl<M> Send for ScopeModule<M>
impl<M> Sync for ScopeModule<M>
impl<M> Unpin for ScopeModule<M>
impl<M> UnsafeUnpin for ScopeModule<M>
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