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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
//! # `StandAloneSig` Owned Implementation
//!
//! This module provides the owned variant of `StandAloneSig` table entries with resolved
//! references and complete metadata context for application use.
use crate;
/// Owned representation of a `StandAloneSig` table entry with complete metadata context.
///
/// This structure represents a fully processed entry from the `StandAloneSig` metadata table
/// (ID 0x11), which contains standalone signatures that are not directly associated with
/// specific methods, fields, or properties. It contains resolved signature data and
/// complete contextual information for signature analysis and usage.
///
/// ## Purpose
///
/// The `StandAloneSig` table serves multiple signature scenarios:
/// - **Method Signatures**: Standalone method pointer and delegate signatures
/// - **Local Variable Signatures**: Method local variable type declarations
/// - **Dynamic Signatures**: Runtime signature generation and manipulation
/// - **CIL Instruction Support**: Signatures referenced by CIL instructions
///
/// ## Owned vs Raw
///
/// This owned variant provides:
/// - Resolved signature blob data with parsed type information
/// - Complete custom attribute collections with resolved values
/// - Validated signature structure and type references
/// - Integration with the broader metadata resolution system
/// - High-level access methods for signature analysis operations
///
/// ## Signature Types
///
/// `StandAloneSig` entries can contain various signature types:
/// - **Method Signatures**: Function pointer signatures with calling conventions
/// - **Local Variable Signatures**: Local variable type declarations
/// - **Field Signatures**: Standalone field type specifications
/// - **Generic Signatures**: Generic type and method instantiation signatures
///
/// ## See Also
///
/// - [`StandAloneSigRaw`](crate::metadata::tables::StandAloneSigRaw) - Raw unresolved variant
/// - [ECMA-335 §II.22.39](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) - `StandAloneSig` table specification
/// Represents the different types of signatures that can appear in a `StandAloneSig` entry.
///
/// According to ECMA-335, standalone signatures can contain:
/// - **Local Variable Signatures**: Used by method bodies to declare local variables
/// - **Method Signatures**: Used for `calli` instructions and function pointers
/// - **Field Signatures**: Standalone field type specifications (rare)
///
/// The signature type is determined by examining the first byte of the signature blob.