Struct FieldPtr
pub struct FieldPtr {
pub rid: u32,
pub token: Token,
pub offset: usize,
pub field: u32,
}Expand description
Represents a field pointer with resolved references and owned data.
A field pointer provides indirection for field access, mapping logical field indexes to physical Field table entries. This indirection is used when the logical field order (as seen in source code) differs from the physical storage order in metadata tables.
§Indirection Context
Field pointers are used in optimization scenarios:
- Field reordering: Physical layout optimization for cache efficiency
- Metadata compression: Strategic field organization to reduce metadata size
- Incremental compilation: Stable references during development iterations
- Edit-and-continue: Adding fields without breaking existing references
- Platform optimization: Field ordering based on target platform characteristics
§ECMA-335 Reference
See ECMA-335, Partition II, §22.18 for the complete FieldPtr table specification.
Fields§
§rid: u32The row identifier in the FieldPtr table.
This 1-based index uniquely identifies this field pointer within the FieldPtr table.
The RID represents the logical field index used for indirection.
token: TokenThe metadata token for this field pointer.
A crate::metadata::token::Token that uniquely identifies this field pointer across the entire assembly.
The token encodes both the table type (FieldPtr) and the row ID.
offset: usizeThe byte offset of this field pointer in the metadata tables stream.
This offset points to the start of this pointer’s row data within the metadata tables stream, used for binary parsing and navigation.
field: u32Index into the Field table for the actual field definition.
A 1-based index pointing to the physical Field table entry that this pointer references. This provides the indirection from logical field index (RID) to physical field location.
§Indirection Mapping
- Logical index: The RID of this
FieldPtrentry - Physical index: This field value pointing to Field table
- Resolution:
FieldPtr[logical_index].field → Field[physical_index]
Auto Trait Implementations§
impl Freeze for FieldPtr
impl RefUnwindSafe for FieldPtr
impl Send for FieldPtr
impl Sync for FieldPtr
impl Unpin for FieldPtr
impl UnsafeUnpin for FieldPtr
impl UnwindSafe for FieldPtr
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.