pub struct PackageDebugInfo { /* private fields */ }Expand description
Trusted package-owned debug information decoded from well-known debug sections.
Implementations§
Source§impl PackageDebugInfo
impl PackageDebugInfo
Sourcepub fn with_source_debug(
source_graph: DebugSourceGraphSection,
source_map: DebugSourceMapSection,
) -> PackageDebugInfo
pub fn with_source_debug( source_graph: DebugSourceGraphSection, source_map: DebugSourceMapSection, ) -> PackageDebugInfo
Creates debug info with source/debug graph and map sections.
Sourcepub fn with_source_graph(
self,
source_graph: DebugSourceGraphSection,
) -> PackageDebugInfo
pub fn with_source_graph( self, source_graph: DebugSourceGraphSection, ) -> PackageDebugInfo
Sets the source/debug graph section.
Sourcepub fn with_source_map(
self,
source_map: DebugSourceMapSection,
) -> PackageDebugInfo
pub fn with_source_map( self, source_map: DebugSourceMapSection, ) -> PackageDebugInfo
Sets the source/debug map section.
Sourcepub fn with_error_messages(
self,
error_messages: DebugErrorMessagesSection,
) -> PackageDebugInfo
pub fn with_error_messages( self, error_messages: DebugErrorMessagesSection, ) -> PackageDebugInfo
Sets the assertion error messages section.
Sourcepub fn types(&self) -> Option<&DebugTypesSection>
pub fn types(&self) -> Option<&DebugTypesSection>
Returns the type definitions section, if present.
Sourcepub fn sources(&self) -> Option<&DebugSourcesSection>
pub fn sources(&self) -> Option<&DebugSourcesSection>
Returns the source file table section, if present.
Sourcepub fn functions(&self) -> Option<&DebugFunctionsSection>
pub fn functions(&self) -> Option<&DebugFunctionsSection>
Returns the function metadata section, if present.
Sourcepub fn source_graph(&self) -> Option<&DebugSourceGraphSection>
pub fn source_graph(&self) -> Option<&DebugSourceGraphSection>
Returns the source/debug graph section, if present.
Sourcepub fn source_map(&self) -> Option<&DebugSourceMapSection>
pub fn source_map(&self) -> Option<&DebugSourceMapSection>
Returns the source/debug map section, if present.
Sourcepub fn error_messages(&self) -> Option<&DebugErrorMessagesSection>
pub fn error_messages(&self) -> Option<&DebugErrorMessagesSection>
Returns the assertion error messages section, if present.
Sourcepub fn merge_source_debug<'a>(
inputs: impl IntoIterator<Item = (usize, &'a PackageDebugInfo)>,
root_map: &MastForestRootMap,
) -> Result<PackageDebugInfo, PackageDebugInfoMergeError>
pub fn merge_source_debug<'a>( inputs: impl IntoIterator<Item = (usize, &'a PackageDebugInfo)>, root_map: &MastForestRootMap, ) -> Result<PackageDebugInfo, PackageDebugInfoMergeError>
Merges package-owned source/debug metadata after a miden_core::mast::MastForest merge.
miden_core::mast::MastForest::merge remains execution-only. This helper applies the
returned node mappings to package source/debug sections so callers can merge
(MastForest, PackageDebugInfo) pairs without reattaching debug metadata to the forest.
This also merges the type, source-file, and function tables referenced by source-map inline-call rows.
Sourcepub fn source_node(
&self,
source_node: DebugSourceNodeId,
) -> Option<&DebugSourceNode>
pub fn source_node( &self, source_node: DebugSourceNodeId, ) -> Option<&DebugSourceNode>
Returns a source/debug occurrence by ID.
Sourcepub fn unique_source_root_for_exec_node(
&self,
exec_node: MastNodeId,
) -> Result<Option<DebugSourceNodeId>, DebugSourceGraphLookupError>
pub fn unique_source_root_for_exec_node( &self, exec_node: MastNodeId, ) -> Result<Option<DebugSourceNodeId>, DebugSourceGraphLookupError>
Returns the unique source/debug root that points at exec_node.
Returns Ok(None) if no source graph is present, or if no root points at exec_node.
Sourcepub fn child_source_node(
&self,
parent: DebugSourceNodeId,
child_index: usize,
) -> Result<Option<(DebugSourceNodeId, &DebugSourceNode)>, DebugSourceGraphLookupError>
pub fn child_source_node( &self, parent: DebugSourceNodeId, child_index: usize, ) -> Result<Option<(DebugSourceNodeId, &DebugSourceNode)>, DebugSourceGraphLookupError>
Returns parent’s source/debug child at child_index, if present.
Returns Ok(None) if no source graph is present, or if child_index is out of range.
Sourcepub fn asm_ops_for_source_node(
&self,
source_node: DebugSourceNodeId,
) -> impl Iterator<Item = &DebugSourceAsmOp>
pub fn asm_ops_for_source_node( &self, source_node: DebugSourceNodeId, ) -> impl Iterator<Item = &DebugSourceAsmOp>
Returns assembly operation rows for a source/debug occurrence.
Sourcepub fn first_asm_op_for_source_node(
&self,
source_node: DebugSourceNodeId,
) -> Option<&DebugSourceAsmOp>
pub fn first_asm_op_for_source_node( &self, source_node: DebugSourceNodeId, ) -> Option<&DebugSourceAsmOp>
Returns the first assembly operation row for source_node, if present.
Sourcepub fn asm_op_for_operation(
&self,
source_node: DebugSourceNodeId,
op_idx: u32,
) -> Option<&DebugSourceAsmOp>
pub fn asm_op_for_operation( &self, source_node: DebugSourceNodeId, op_idx: u32, ) -> Option<&DebugSourceAsmOp>
Returns the assembly operation row for source_node at or before op_idx, if present.
Sourcepub fn debug_vars_for_source_node(
&self,
source_node: DebugSourceNodeId,
) -> impl Iterator<Item = &DebugSourceVar>
pub fn debug_vars_for_source_node( &self, source_node: DebugSourceNodeId, ) -> impl Iterator<Item = &DebugSourceVar>
Returns debug variable rows for a source/debug occurrence.
Sourcepub fn debug_vars_for_operation(
&self,
source_node: DebugSourceNodeId,
op_idx: u32,
) -> impl Iterator<Item = &DebugSourceVar>
pub fn debug_vars_for_operation( &self, source_node: DebugSourceNodeId, op_idx: u32, ) -> impl Iterator<Item = &DebugSourceVar>
Returns debug variable rows for source_node at op_idx.
Sourcepub fn inline_calls_for_source_node(
&self,
source_node: DebugSourceNodeId,
) -> impl Iterator<Item = &DebugSourceInlineCall>
pub fn inline_calls_for_source_node( &self, source_node: DebugSourceNodeId, ) -> impl Iterator<Item = &DebugSourceInlineCall>
Returns inline-call rows for a source/debug occurrence.
Sourcepub fn inline_calls_for_operation(
&self,
source_node: DebugSourceNodeId,
op_idx: u32,
) -> impl Iterator<Item = &DebugSourceInlineCall>
pub fn inline_calls_for_operation( &self, source_node: DebugSourceNodeId, op_idx: u32, ) -> impl Iterator<Item = &DebugSourceInlineCall>
Returns inline-call rows for source_node at op_idx.
Trait Implementations§
Source§impl Clone for PackageDebugInfo
impl Clone for PackageDebugInfo
Source§fn clone(&self) -> PackageDebugInfo
fn clone(&self) -> PackageDebugInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PackageDebugInfo
impl Debug for PackageDebugInfo
Source§impl Default for PackageDebugInfo
impl Default for PackageDebugInfo
Source§fn default() -> PackageDebugInfo
fn default() -> PackageDebugInfo
Source§impl Deserializable for PackageDebugInfo
impl Deserializable for PackageDebugInfo
Source§fn read_from<R>(
source: &mut R,
) -> Result<PackageDebugInfo, DeserializationError>where
R: ByteReader,
fn read_from<R>(
source: &mut R,
) -> Result<PackageDebugInfo, DeserializationError>where
R: ByteReader,
source, attempts to deserialize these bytes
into Self, and returns the result. Read moreSource§fn min_serialized_size() -> usize
fn min_serialized_size() -> usize
Source§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§fn read_from_bytes_with_budget(
bytes: &[u8],
budget: usize,
) -> Result<Self, DeserializationError>
fn read_from_bytes_with_budget( bytes: &[u8], budget: usize, ) -> Result<Self, DeserializationError>
Self from bytes with a byte budget limit. Read moreimpl Eq for PackageDebugInfo
Source§impl PartialEq for PackageDebugInfo
impl PartialEq for PackageDebugInfo
Source§impl Serializable for PackageDebugInfo
impl Serializable for PackageDebugInfo
Source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
self into bytes and writes these bytes into the target.Source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
impl StructuralPartialEq for PackageDebugInfo
Auto Trait Implementations§
impl Freeze for PackageDebugInfo
impl RefUnwindSafe for PackageDebugInfo
impl Send for PackageDebugInfo
impl Sync for PackageDebugInfo
impl Unpin for PackageDebugInfo
impl UnsafeUnpin for PackageDebugInfo
impl UnwindSafe for PackageDebugInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more