Struct ModuleReadGuard

Source
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>

Source§

fn id(&self) -> Id

Returns the globally unique identifier of the compilation unit to which this object belongs.
Source§

impl<'a, H: TaskHandle> ModuleRead<H> for ModuleReadGuard<'a, H>

Source§

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

Returns true if the underlying access guard has been revoked. Read more
Source§

fn text(&self) -> ModuleText<'_>

Gets access to the script module’s source code text. Read more
Source§

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>>

Looks up syntax constructions within the specified span (source code range) based on the options filter. Read more
Source§

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>

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.