1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Owned `LocalConstant` table representation
//!
//! This module provides the [`LocalConstant`] struct that represents
//! the high-level, resolved form of `LocalConstant` table entries with
//! all heap references resolved to actual string and binary data.
use crate;
/// High-level representation of a `LocalConstant` table entry
///
/// This structure provides the resolved form of `LocalConstant` table data
/// with all heap indices resolved to their actual values. The name field
/// contains the resolved string data from the #Strings heap, and the
/// signature field contains the parsed type signature from the #Blob heap.
///
/// # Usage Examples
///
/// ```rust,ignore
/// use dotscope::metadata::tables::LocalConstant;
/// use dotscope::metadata::signatures::TypeSignature;
///
/// // Access constant information with parsed signature
/// println!("Constant '{}' with type: {:?}", constant.name, constant.signature.base);
///
/// // Check the constant's type
/// match &constant.signature.base {
/// TypeSignature::I4 => println!("Integer constant"),
/// TypeSignature::String => println!("String constant"),
/// TypeSignature::R8 => println!("Double constant"),
/// _ => println!("Other type constant"),
/// }
///
/// // Check for custom modifiers
/// if !constant.signature.modifiers.is_empty() {
/// println!("Constant has {} custom modifiers", constant.signature.modifiers.len());
/// }
/// ```