[][src]Struct ink_lang_ir::Event

pub struct Event {
    pub anonymous: bool,
    // some fields omitted
}

An ink! event struct definition.

Example

#[ink(event)]
pub struct Transaction {
    #[ink(topic)]
    from: AccountId,
    #[ink(topic)]
    to: AccountId,
    value: Balance,
}

Fields

anonymous: bool

Implementations

impl Event[src]

pub fn ident(&self) -> &Ident[src]

Returns the identifier of the event struct.

pub fn fields(&self) -> EventFieldsIter<'_>[src]

Returns an iterator yielding all the #[ink(topic)] annotated fields of the event struct.

pub fn attrs(&self) -> &[Attribute][src]

Returns all non-ink! attributes.

Trait Implementations

impl Debug for Event[src]

impl Eq for Event[src]

impl From<Event> for InkItem[src]

impl PartialEq<Event> for Event[src]

impl StructuralEq for Event[src]

impl StructuralPartialEq for Event[src]

impl ToTokens for Event[src]

fn to_tokens(&self, tokens: &mut TokenStream)[src]

We mainly implement this trait for this ink! type to have a derived Spanned implementation for it.

impl TryFrom<ItemStruct> for Event[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Event

impl !Send for Event

impl !Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Spanned for T where
    T: Spanned + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.