pub struct EventParameter {
pub attrs: Vec<Attribute>,
pub ty: Type,
pub indexed: Option<indexed>,
pub name: Option<SolIdent>,
}
Expand description
An event parameter.
<ty> [indexed] [name]
Fields§
§attrs: Vec<Attribute>
§ty: Type
§indexed: Option<indexed>
§name: Option<SolIdent>
Implementations§
Source§impl EventParameter
impl EventParameter
Sourcepub fn as_param(&self) -> VariableDeclaration
pub fn as_param(&self) -> VariableDeclaration
Convert to a parameter declaration.
Sourcepub const fn is_indexed(&self) -> bool
pub const fn is_indexed(&self) -> bool
Returns true
if the parameter is indexed.
Sourcepub const fn is_non_indexed(&self) -> bool
pub const fn is_non_indexed(&self) -> bool
Returns true
if the event parameter is stored in the event data
section.
Sourcepub fn indexed_as_hash(
&self,
custom_is_value_type: impl Fn(&SolPath) -> bool,
) -> bool
pub fn indexed_as_hash( &self, custom_is_value_type: impl Fn(&SolPath) -> bool, ) -> bool
Returns true
if the event parameter is indexed and dynamically sized.
These types are hashed, and then stored in the topics as specified in
the Solidity spec.
custom_is_value_type
accounts for custom value types.
Trait Implementations§
Source§impl Clone for EventParameter
impl Clone for EventParameter
Source§fn clone(&self) -> EventParameter
fn clone(&self) -> EventParameter
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EventParameter
impl Debug for EventParameter
Source§impl Display for EventParameter
impl Display for EventParameter
Source§impl Hash for EventParameter
impl Hash for EventParameter
Source§impl Parse for EventParameter
impl Parse for EventParameter
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for EventParameter
impl PartialEq for EventParameter
Source§impl Spanned for EventParameter
impl Spanned for EventParameter
impl Eq for EventParameter
impl StructuralPartialEq for EventParameter
Auto Trait Implementations§
impl Freeze for EventParameter
impl RefUnwindSafe for EventParameter
impl !Send for EventParameter
impl !Sync for EventParameter
impl Unpin for EventParameter
impl UnwindSafe for EventParameter
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