cairo_lang_starknet/plugin/
aux_data.rs

1use cairo_lang_defs::plugin::GeneratedFileAuxData;
2
3use super::events::EventData;
4
5/// Contract related auxiliary data of the Starknet plugin.
6#[derive(Debug, PartialEq, Eq)]
7pub struct StarkNetContractAuxData {
8    /// A list of contracts that were processed by the plugin.
9    pub contract_name: smol_str::SmolStr,
10}
11impl GeneratedFileAuxData for StarkNetContractAuxData {
12    fn as_any(&self) -> &dyn std::any::Any {
13        self
14    }
15    fn eq(&self, other: &dyn GeneratedFileAuxData) -> bool {
16        if let Some(other) = other.as_any().downcast_ref::<Self>() { self == other } else { false }
17    }
18}
19/// Contract related auxiliary data of the Starknet plugin.
20#[derive(Debug, PartialEq, Eq)]
21pub struct StarkNetEventAuxData {
22    pub event_data: EventData,
23}
24impl GeneratedFileAuxData for StarkNetEventAuxData {
25    fn as_any(&self) -> &dyn std::any::Any {
26        self
27    }
28    fn eq(&self, other: &dyn GeneratedFileAuxData) -> bool {
29        if let Some(other) = other.as_any().downcast_ref::<Self>() { self == other } else { false }
30    }
31}