Struct syn_solidity::EventParameter
source · 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 is_abi_dynamic(&self) -> bool
pub fn is_abi_dynamic(&self) -> bool
Returns true if the event parameter is a dynamically sized type.
sourcepub fn indexed_as_hash(&self) -> bool
pub fn indexed_as_hash(&self) -> 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.
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§fn eq(&self, other: &EventParameter) -> bool
fn eq(&self, other: &EventParameter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Spanned for EventParameter
impl Spanned for EventParameter
impl Eq for EventParameter
impl StructuralEq for EventParameter
impl StructuralPartialEq for EventParameter
Auto Trait Implementations§
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