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: u32

Row 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: Token

Metadata 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: usize

Byte 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: CilTypeRef

Weak 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: EventList

Thread-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

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§

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.