[][src]Enum ink_lang_ir::InkItem

pub enum InkItem {
    Storage(Storage),
    Event(Event),
    ImplBlock(ItemImpl),
}

An ink! specific item.

Variants

Storage(Storage)

The ink! storage struct definition.

Event(Event)

An ink! event definition.

ImplBlock(ItemImpl)

An ink! implementation block.

Implementations

impl InkItem[src]

pub fn is_ink_item(item: &Item) -> Result<bool, Error>[src]

Returns true if the given syn::Item is eventually an ink! item.

Errors

If invalid or malformed ink! attributes are encountered for the given item.

impl InkItem[src]

pub fn filter_map_storage_item(&self) -> Option<&Storage>[src]

Returns Some if self is the ink! storage struct definition.

Otherwise, returns None.

pub fn is_storage_item(&self) -> bool[src]

Returns true if the ink! specific item is the storage struct definition.

pub fn filter_map_event_item(&self) -> Option<&Event>[src]

Returns Some if self is an ink! event struct definition.

Otherwise, returns None.

pub fn is_event_item(&self) -> bool[src]

Returns true if the ink! specific item is an event struct definition.

pub fn filter_map_impl_block(&self) -> Option<&ItemImpl>[src]

Returns Some if self is an ink! implementation block.

Otherwise, returns None.

pub fn is_impl_block(&self) -> bool[src]

Returns true if the ink! specific item is an implementation block.

Trait Implementations

impl Debug for InkItem[src]

impl Eq for InkItem[src]

impl From<Event> for InkItem[src]

impl From<ItemImpl> for InkItem[src]

impl From<Storage> for InkItem[src]

impl PartialEq<InkItem> for InkItem[src]

impl StructuralEq for InkItem[src]

impl StructuralPartialEq for InkItem[src]

impl ToTokens for InkItem[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.

Auto Trait Implementations

impl RefUnwindSafe for InkItem

impl !Send for InkItem

impl !Sync for InkItem

impl Unpin for InkItem

impl UnwindSafe for InkItem

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.