[−][src]Struct ink_lang_ir::Event
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.
fn to_token_stream(&self) -> TokenStream
[src]
fn into_token_stream(self) -> TokenStream
[src]
impl TryFrom<ItemStruct> for Event
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Spanned for T where
T: Spanned + ?Sized,
[src]
T: Spanned + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,