pub struct ItemEvent {
pub attrs: Vec<Attribute>,
pub event_token: event,
pub name: SolIdent,
pub paren_token: Paren,
pub parameters: Punctuated<EventParameter, Comma>,
pub anonymous: Option<anonymous>,
pub semi_token: Semi,
}
Fields§
§attrs: Vec<Attribute>
§event_token: event
§name: SolIdent
§paren_token: Paren
§parameters: Punctuated<EventParameter, Comma>
§anonymous: Option<anonymous>
§semi_token: Semi
Implementations§
Source§impl ItemEvent
impl ItemEvent
Sourcepub const fn is_anonymous(&self) -> bool
pub const fn is_anonymous(&self) -> bool
Returns true
if the event is anonymous.
Sourcepub fn max_indexed(&self) -> usize
pub fn max_indexed(&self) -> usize
Returns the maximum amount of indexed parameters this event can have.
This is 4
if the event is anonymous, otherwise 3
.
Sourcepub fn exceeds_max_indexed(&self) -> bool
pub fn exceeds_max_indexed(&self) -> bool
Returns true
if the event has more indexed parameters than allowed by
Solidity.
See Self::max_indexed
.
Sourcepub fn assert_valid(&self) -> Result<()>
pub fn assert_valid(&self) -> Result<()>
Asserts that the event has a valid amount of indexed parameters.
pub fn params(&self) -> ParameterList
pub fn param_types( &self, ) -> impl ExactSizeIterator<Item = &Type> + DoubleEndedIterator + Clone
pub fn param_types_mut( &mut self, ) -> impl ExactSizeIterator<Item = &mut Type> + DoubleEndedIterator
pub fn param_types_and_names( &self, ) -> impl ExactSizeIterator<Item = (&Type, Option<&SolIdent>)> + DoubleEndedIterator
pub fn param_type_strings( &self, ) -> impl ExactSizeIterator<Item = String> + DoubleEndedIterator + Clone + '_
pub fn non_indexed_params(&self) -> impl Iterator<Item = &EventParameter>
pub fn indexed_params(&self) -> impl Iterator<Item = &EventParameter>
pub fn as_type(&self) -> Type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ItemEvent
impl RefUnwindSafe for ItemEvent
impl !Send for ItemEvent
impl !Sync for ItemEvent
impl Unpin for ItemEvent
impl UnwindSafe for ItemEvent
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
Mutably borrows from an owned value. Read more