pub struct DebugFunctionInfo {
pub name_idx: u32,
pub linkage_name_idx: Option<u32>,
pub file_idx: u32,
pub line: LineNumber,
pub column: ColumnNumber,
pub type_idx: Option<DebugTypeIdx>,
pub mast_root: Option<Word>,
pub variables: Vec<DebugVariableInfo>,
pub inlined_calls: Vec<DebugInlinedCallInfo>,
}Expand description
Debug information for a function.
Links source-level function information to the compiled MAST representation, including local variables and inlined call sites.
Fields§
§name_idx: u32Name of the function (index into string table)
linkage_name_idx: Option<u32>Linkage name / mangled name (index into string table, optional)
file_idx: u32File containing this function (index into file table)
line: LineNumberLine number where the function starts (1-indexed)
column: ColumnNumberColumn number where the function starts (1-indexed)
type_idx: Option<DebugTypeIdx>Type of this function (index into type table, optional)
mast_root: Option<Word>MAST root digest of this function (if known). This links the debug info to the compiled code.
variables: Vec<DebugVariableInfo>Local variables declared in this function
inlined_calls: Vec<DebugInlinedCallInfo>Inline call sites within this function
Implementations§
Source§impl DebugFunctionInfo
impl DebugFunctionInfo
Sourcepub fn new(
name_idx: u32,
file_idx: u32,
line: LineNumber,
column: ColumnNumber,
) -> Self
pub fn new( name_idx: u32, file_idx: u32, line: LineNumber, column: ColumnNumber, ) -> Self
Creates a new function info.
Sourcepub fn with_linkage_name(self, linkage_name_idx: u32) -> Self
pub fn with_linkage_name(self, linkage_name_idx: u32) -> Self
Sets the linkage name.
Sourcepub fn with_type(self, type_idx: DebugTypeIdx) -> Self
pub fn with_type(self, type_idx: DebugTypeIdx) -> Self
Sets the type index.
Sourcepub fn with_mast_root(self, mast_root: Word) -> Self
pub fn with_mast_root(self, mast_root: Word) -> Self
Sets the MAST root digest.
Sourcepub fn add_variable(&mut self, variable: DebugVariableInfo)
pub fn add_variable(&mut self, variable: DebugVariableInfo)
Adds a variable to this function.
Sourcepub fn add_inlined_call(&mut self, call: DebugInlinedCallInfo)
pub fn add_inlined_call(&mut self, call: DebugInlinedCallInfo)
Adds an inlined call site.
Trait Implementations§
Source§impl Clone for DebugFunctionInfo
impl Clone for DebugFunctionInfo
Source§fn clone(&self) -> DebugFunctionInfo
fn clone(&self) -> DebugFunctionInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DebugFunctionInfo
impl Debug for DebugFunctionInfo
Source§impl Deserializable for DebugFunctionInfo
impl Deserializable for DebugFunctionInfo
Source§fn read_from<R: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>
source, attempts to deserialize these bytes
into Self, and returns the result. Read more§fn min_serialized_size() -> usize
fn min_serialized_size() -> usize
§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§impl<'de> Deserialize<'de> for DebugFunctionInfo
impl<'de> Deserialize<'de> for DebugFunctionInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DebugFunctionInfo
impl PartialEq for DebugFunctionInfo
Source§impl Serializable for DebugFunctionInfo
impl Serializable for DebugFunctionInfo
Source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
self into bytes and writes these bytes into the target.§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Source§impl Serialize for DebugFunctionInfo
impl Serialize for DebugFunctionInfo
impl Eq for DebugFunctionInfo
impl StructuralPartialEq for DebugFunctionInfo
Auto Trait Implementations§
impl Freeze for DebugFunctionInfo
impl RefUnwindSafe for DebugFunctionInfo
impl Send for DebugFunctionInfo
impl Sync for DebugFunctionInfo
impl Unpin for DebugFunctionInfo
impl UnsafeUnpin for DebugFunctionInfo
impl UnwindSafe for DebugFunctionInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§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 more§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