Struct EventMapEntry
pub struct EventMapEntry {
pub rid: u32,
pub token: Token,
pub offset: usize,
pub parent: CilTypeRef,
pub events: EventList,
}Expand description
Resolved EventMap entry with owned data and resolved cross-references
Represents a fully processed EventMap table entry where all heap references
have been resolved and cross-table relationships have been established. Each
entry defines the ownership relationship between a type and a contiguous range
of events.
EventMap entries are used to efficiently associate events with their declaring
types and enable enumeration of all events owned by a particular type. The
relationship is established through contiguous ranges in the Event table.
Fields§
§rid: u32Row identifier within the EventMap metadata table
The 1-based index of this EventMap row. Used for metadata token generation
and cross-referencing with other metadata structures.
token: TokenMetadata token for this EventMap row
Combines the table identifier (0x12 for EventMap) with the row ID to create
a unique token. Format: 0x12000000 | rid
offset: usizeByte offset of this row within the metadata tables stream
Physical location of the raw EventMap data within the metadata binary format.
Used for debugging and low-level metadata analysis.
parent: CilTypeRefWeak reference to the parent type that owns the events
Points to the CilType that declares
the events in this range. Uses a weak reference to prevent circular ownership
between types and their event maps.
events: EventListThread-safe collection of events belonging to the parent type
Contains all Event instances that are
owned by the parent type. Events are stored in a thread-safe collection
that supports concurrent access and modification.
Implementations§
§impl EventMapEntry
impl EventMapEntry
pub fn apply(&self) -> Result<()>
pub fn apply(&self) -> Result<()>
Apply this EventMap entry to update the parent type with its events
Transfers all events from this EventMap entry to the parent type’s event
collection, establishing the ownership relationship. This method is called
during metadata loading to populate type definitions with their associated
events.
§Returns
Returns Ok(()) on successful event assignment, or an error if:
- The parent type reference is no longer valid (type was dropped)
- Event assignment to the parent type fails
§Errors
Returns crate::Error if the parent type reference is invalid or if
event assignment fails due to metadata inconsistencies.
Auto Trait Implementations§
impl Freeze for EventMapEntry
impl RefUnwindSafe for EventMapEntry
impl Send for EventMapEntry
impl Sync for EventMapEntry
impl Unpin for EventMapEntry
impl UnwindSafe for EventMapEntry
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
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 more