ContractMetadata

Struct ContractMetadata 

Source
pub struct ContractMetadata {
Show 19 fields pub name: String, pub is_abstract: bool, pub is_library: bool, pub methods: Vec<FunctionMetadata>, pub events: Vec<EventMetadata>, pub uses_storage: bool, pub state_variables: Vec<StateVariableMetadata>, pub structs: Vec<StructMetadata>, pub enums: Vec<EnumMetadata>, pub contract_types: Vec<String>, pub selector_registry: Arc<SelectorRegistry>, pub documentation: NatspecDoc, pub has_using_for_star: bool, pub has_using_function_list: bool, pub using_for_libraries: Vec<String>, pub has_type_definitions: bool, pub type_aliases: HashMap<String, String>, pub flatten_warnings: Vec<String>, pub super_method_map: HashMap<String, String>,
}

Fields§

§name: String§is_abstract: bool

Whether this contract was declared abstract.

§is_library: bool

Whether this contract was declared as a library.

§methods: Vec<FunctionMetadata>§events: Vec<EventMetadata>§uses_storage: bool§state_variables: Vec<StateVariableMetadata>§structs: Vec<StructMetadata>§enums: Vec<EnumMetadata>§contract_types: Vec<String>

All contract/interface type names visible to this compilation unit.

This is used during IR lowering to recognize Solidity-style contract casts like IERC20(token).transfer(...) without accidentally treating unknown function calls as casts.

§selector_registry: Arc<SelectorRegistry>

Registry of known function selectors for contract/interface types visible to this compilation unit (shared across contracts via Arc).

§documentation: NatspecDoc

Natspec documentation for the contract

§has_using_for_star: bool

Whether this contract contains using X for * directives.

§has_using_function_list: bool

Whether this contract contains using { f, g } for Y directives.

§using_for_libraries: Vec<String>

Library names referenced by using X for Y directives.

§has_type_definitions: bool

Whether this contract contains type X is Y definitions.

§type_aliases: HashMap<String, String>

User-defined value type aliases (type X is Y). Maps type name to underlying Solidity type string.

§flatten_warnings: Vec<String>

Warnings collected during inheritance flattening (e.g. virtual/override checks).

§super_method_map: HashMap<String, String>

Mapping from original method name to the renamed super-method name. Populated during inheritance flattening so super.method() can resolve.

Trait Implementations§

Source§

impl Clone for ContractMetadata

Source§

fn clone(&self) -> ContractMetadata

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ContractMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.