pub struct SourceBundleDebugSession<'data> { /* private fields */ }
Expand description
Debug session for SourceBundle objects.
Implementations§
source§impl<'data> SourceBundleDebugSession<'data>
impl<'data> SourceBundleDebugSession<'data>
sourcepub fn files(&self) -> SourceBundleFileIterator<'_> ⓘ
pub fn files(&self) -> SourceBundleFileIterator<'_> ⓘ
Returns an iterator over all source files in this debug file.
sourcepub fn functions(&self) -> SourceBundleFunctionIterator<'_>
pub fn functions(&self) -> SourceBundleFunctionIterator<'_>
Returns an iterator over all functions in this debug file.
sourcepub fn source_by_path(
&self,
path: &str,
) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>
pub fn source_by_path( &self, path: &str, ) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>
See DebugSession::source_by_path for more information.
sourcepub fn source_by_url(
&self,
url: &str,
) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>
pub fn source_by_url( &self, url: &str, ) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>
Like source_by_path
but looks up by URL.
sourcepub fn source_by_debug_id(
&self,
debug_id: DebugId,
ty: SourceFileType,
) -> Result<Option<SourceFileDescriptor<'_>>, SourceBundleError>
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.