Struct TypeSpec
pub struct TypeSpec {
pub rid: u32,
pub token: Token,
pub offset: usize,
pub signature: SignatureTypeSpec,
}Expand description
Represents an owned TypeSpec table entry with resolved references and parsed signatures.
The TypeSpec table defines type specifications through signatures, providing the foundation
for complex type definitions including generic types, arrays, pointers, and type modifiers.
This struct contains fully resolved and owned data from the raw table entries.
§Fields Overview
rid: The 1-based row identifier within theTypeSpectabletoken: The metadata token for thisTypeSpecentryoffset: Byte offset of the signature within the blob heapsignature: Fully parsed type specification signature
§Type Specifications
TypeSpec entries define types through their signatures and are used for:
- Generic type instantiations (e.g.,
List<T>) - Array types with specific dimensions
- Pointer and reference types
- Modified types (e.g.,
const,volatile)
§Usage in Metadata
TypeSpec entries are referenced by:
crate::metadata::tables::MethodDefRaw- Method signaturescrate::metadata::tables::Field- Field type specificationscrate::metadata::tables::MemberRef- Member references- Other tables requiring complex type definitions
Fields§
§rid: u32The 1-based row identifier within the TypeSpec table.
This identifier uniquely identifies the TypeSpec entry within the table
and is used for cross-references from other metadata tables.
token: TokenThe metadata token for this TypeSpec entry.
Tokens provide a consistent way to reference metadata entries across different contexts and are used in IL instructions and other metadata.
offset: usizeByte offset of the type signature within the blob heap.
This offset points to the location in the blob heap where the type specification signature is stored in its binary encoded form.
signature: SignatureTypeSpecThe fully parsed type specification signature.
Contains the complete type definition including generic parameters, array dimensions, pointer levels, and type modifiers. This signature defines the exact type being specified.
Auto Trait Implementations§
impl Freeze for TypeSpec
impl RefUnwindSafe for TypeSpec
impl Send for TypeSpec
impl Sync for TypeSpec
impl Unpin for TypeSpec
impl UnsafeUnpin for TypeSpec
impl UnwindSafe for TypeSpec
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> Downcast for T
impl<T> Downcast for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.