Struct StandAloneSig

pub struct StandAloneSig {
    pub rid: u32,
    pub token: Token,
    pub offset: usize,
    pub signature: u32,
    pub custom_attributes: CustomAttributeValueList,
}
Expand description

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

Fields§

§rid: u32

The 1-based row identifier within the StandAloneSig table.

This value corresponds to the logical position of the standalone signature entry within the StandAloneSig table and is used to construct the metadata token.

§token: Token

The metadata token for this StandAloneSig entry.

Constructed as 0x11000000 | rid, this token uniquely identifies the standalone signature entry within the metadata system and enables efficient signature reference operations.

§offset: usize

The byte offset of this entry within the metadata stream.

Indicates the physical location of the standalone signature entry in the original metadata stream, useful for debugging and low-level metadata analysis.

§signature: u32

Index into the Blob heap containing the signature data.

This field points to the signature blob that contains the actual signature information including calling conventions, parameter types, return types, and other signature-specific data. The blob format depends on the signature type.

§custom_attributes: CustomAttributeValueList

Custom attributes applied to this standalone signature.

Contains a collection of custom attributes that provide additional metadata and annotations for the standalone signature. These attributes can include compiler-generated information, security attributes, and other metadata relevant to signature usage and interpretation.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.