pub struct ModuleReadGuard<'a, H: TaskHandle = TriggerHandle> { /* private fields */ }
Expand description
An object that grants non-exclusive access to the ScriptModule content.
Created by the read and try_read functions.
Implements the ModuleRead trait, which provides content read functions.
Trait Implementations§
Source§impl<'a, H: TaskHandle> Identifiable for ModuleReadGuard<'a, H>
impl<'a, H: TaskHandle> Identifiable for ModuleReadGuard<'a, H>
Source§impl<'a, H: TaskHandle> ModuleRead<H> for ModuleReadGuard<'a, H>
impl<'a, H: TaskHandle> ModuleRead<H> for ModuleReadGuard<'a, H>
Source§fn package(&self) -> &'static PackageMeta
fn package(&self) -> &'static PackageMeta
Returns the metadata object of the script package under which the
underlying ScriptModule is being
analyzed. Read more
Source§fn is_interrupted(&self) -> bool
fn is_interrupted(&self) -> bool
Returns true if the underlying access guard has been revoked. Read more
Source§fn text(&self) -> ModuleText<'_>
fn text(&self) -> ModuleText<'_>
Gets access to the script module’s source code text. Read more
Source§fn diagnostics(
&self,
depth: DiagnosticsDepth,
) -> ModuleResult<ModuleDiagnostics>
fn diagnostics( &self, depth: DiagnosticsDepth, ) -> ModuleResult<ModuleDiagnostics>
Computes script module diagnostics (errors and warnings). Read more
Source§fn symbols(
&self,
span: impl ToSpan,
options: LookupOptions,
) -> ModuleResult<Vec<ModuleSymbol>>
fn symbols( &self, span: impl ToSpan, options: LookupOptions, ) -> ModuleResult<Vec<ModuleSymbol>>
Looks up syntax constructions within the specified
span
(source code
range) based on the options
filter. Read moreSource§fn content_origin(&self) -> ScriptOrigin
fn content_origin(&self) -> ScriptOrigin
Returns a range of the source code without the header and footer
comments. Read more
Source§fn compile(&self) -> ModuleResult<ScriptFn>
fn compile(&self) -> ModuleResult<ScriptFn>
Compiles the source code into the Ad Astra assembly, making it available
for execution. To execute the resulting ScriptFn object, use the
ScriptFn::run function. Read more
Auto Trait Implementations§
impl<'a, H> Freeze for ModuleReadGuard<'a, H>
impl<'a, H = TriggerHandle> !RefUnwindSafe for ModuleReadGuard<'a, H>
impl<'a, H> Send for ModuleReadGuard<'a, H>
impl<'a, H> Sync for ModuleReadGuard<'a, H>
impl<'a, H> Unpin for ModuleReadGuard<'a, H>
impl<'a, H = TriggerHandle> !UnwindSafe for ModuleReadGuard<'a, H>
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