Struct InterfaceImpl
pub struct InterfaceImpl {
pub rid: u32,
pub token: Token,
pub offset: usize,
pub class: CilTypeRc,
pub interface: CilTypeRc,
pub custom_attributes: CustomAttributeValueList,
}Expand description
Owned InterfaceImpl table entry with resolved type references and owned data.
This structure represents an interface implementation relationship with all coded indexes resolved to their target type structures. It defines which types implement which interfaces, forming the foundation of .NET’s interface-based inheritance system.
§Interface Implementation Types
The structure handles two distinct relationship patterns:
- Class implements interface: Standard interface implementation by concrete types
- Interface extends interface: Interface inheritance (incorrectly placed in
InterfaceImplby compiler)
Fields§
§rid: u32Row identifier within the InterfaceImpl table.
Unique identifier for this interface implementation entry, used for internal table management and cross-references.
token: TokenMetadata token identifying this InterfaceImpl entry.
The token enables efficient lookup and reference to this interface implementation from other metadata structures and runtime systems.
offset: usizeByte offset of this entry within the raw table data.
Used for efficient table navigation and binary metadata processing.
class: CilTypeRcResolved reference to the type that implements the interface.
Points to the class or interface that declares implementation of the target interface. In cases of interface inheritance, this may also be an interface type.
interface: CilTypeRcResolved reference to the interface being implemented.
Points to the interface type that is being implemented or extended. This may be a generic interface instantiation for parameterized interface implementations.
custom_attributes: CustomAttributeValueListCustom attributes applied to this interface implementation.
Collection of custom attributes that provide additional metadata about the interface implementation relationship, such as explicit implementation attributes.
Implementations§
§impl InterfaceImpl
impl InterfaceImpl
pub fn apply(&self) -> Result<()>
pub fn apply(&self) -> Result<()>
Applies the interface implementation relationship to the type system.
This method establishes the interface implementation relationship by updating the implementing type’s interface list or base type. It handles both standard interface implementation and interface inheritance patterns.
§Returns
Ok(())- Interface implementation applied successfullyErr(_)- Reserved for future error conditions (currently infallible)
§Errors
This function never returns an error; it always returns Ok(()).
Auto Trait Implementations§
impl Freeze for InterfaceImpl
impl RefUnwindSafe for InterfaceImpl
impl Send for InterfaceImpl
impl Sync for InterfaceImpl
impl Unpin for InterfaceImpl
impl UnwindSafe for InterfaceImpl
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