pub struct SourceBundleDebugSession<'data> { /* private fields */ }
Expand description

Debug session for SourceBundle objects.

Implementations§

source§

impl<'data> SourceBundleDebugSession<'data>

source

pub fn files(&self) -> SourceBundleFileIterator<'_>

Returns an iterator over all source files in this debug file.

source

pub fn functions(&self) -> SourceBundleFunctionIterator<'_>

Returns an iterator over all functions in this debug file.

source

pub fn source_by_path( &self, path: &str, ) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>

See DebugSession::source_by_path for more information.

source

pub fn source_by_url( &self, url: &str, ) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>

Like source_by_path but looks up by URL.

source

pub fn source_by_debug_id( &self, debug_id: DebugId, ty: SourceFileType, ) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>

Looks up some source by debug ID and file type.

Lookups by DebugId require knowledge of the file that is supposed to be looked up as multiple files (one per type) can share the same debug ID. Special care needs to be taken about SourceFileType::IndexedRamBundle and SourceFileType::SourceMap which are different file types despite the name of it.

§Note on Abstractions

This method is currently not exposed via a standardized debug session as it’s primarily used for the JavaScript processing system which uses different abstractions.

Trait Implementations§

source§

impl<'slf, 'data: 'slf> AsSelf<'slf> for SourceBundleDebugSession<'data>

§

type Ref = SourceBundleDebugSession<'slf>

The Self type with 'slf lifetimes, returned by as_self.
source§

fn as_self(&'slf self) -> &Self::Ref

Returns a reference to self with downcasted lifetime.
source§

impl<'data, 'session> DebugSession<'session> for SourceBundleDebugSession<'data>

§

type Error = SourceBundleError

The error returned when reading debug information fails.
§

type FunctionIterator = Empty<Result<Function<'session>, SourceBundleError>>

An iterator over all functions in this debug file.
§

type FileIterator = SourceBundleFileIterator<'session>

An iterator over all source files referenced by this debug file.
source§

fn functions(&'session self) -> Self::FunctionIterator

Returns an iterator over all functions in this debug file. Read more
source§

fn files(&'session self) -> Self::FileIterator

Returns an iterator over all source files referenced by this debug file.
source§

fn source_by_path( &self, path: &str, ) -> Result<Option<SourceFileDescriptor<'_>>, Self::Error>

Looks up a file’s source by its full canonicalized path. Read more

Auto Trait Implementations§

§

impl<'data> !Freeze for SourceBundleDebugSession<'data>

§

impl<'data> !RefUnwindSafe for SourceBundleDebugSession<'data>

§

impl<'data> Send for SourceBundleDebugSession<'data>

§

impl<'data> Sync for SourceBundleDebugSession<'data>

§

impl<'data> Unpin for SourceBundleDebugSession<'data>

§

impl<'data> UnwindSafe for SourceBundleDebugSession<'data>

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<I, T> ExtractContext<I, ()> for T

source§

fn extract_context(self, _original_input: I)

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. 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<I> RecreateContext<I> for I

source§

fn recreate_context(_original_input: I, tail: I) -> I

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more
source§

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

§

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

§

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.