Enum ink_lang_ir::InkItem
source · [−]Expand description
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
sourceimpl InkItem
impl InkItem
sourcepub fn filter_map_storage_item(&self) -> Option<&Storage>
pub fn filter_map_storage_item(&self) -> Option<&Storage>
Returns Some
if self
is the ink! storage struct definition.
Otherwise, returns None
.
sourcepub fn is_storage_item(&self) -> bool
pub fn is_storage_item(&self) -> bool
Returns true
if the ink! specific item is the storage struct definition.
sourcepub fn filter_map_event_item(&self) -> Option<&Event>
pub fn filter_map_event_item(&self) -> Option<&Event>
Returns Some
if self
is an ink! event struct definition.
Otherwise, returns None
.
sourcepub fn is_event_item(&self) -> bool
pub fn is_event_item(&self) -> bool
Returns true
if the ink! specific item is an event struct definition.
sourcepub fn filter_map_impl_block(&self) -> Option<&ItemImpl>
pub fn filter_map_impl_block(&self) -> Option<&ItemImpl>
Returns Some
if self
is an ink! implementation block.
Otherwise, returns None
.
sourcepub fn is_impl_block(&self) -> bool
pub fn is_impl_block(&self) -> bool
Returns true
if the ink! specific item is an implementation block.
Trait Implementations
sourceimpl ToTokens for InkItem
impl ToTokens for InkItem
sourcefn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
We mainly implement this trait for this ink! type to have a derived
Spanned
implementation for it.
sourcefn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
sourcefn into_token_stream(self) -> TokenStream
fn into_token_stream(self) -> TokenStream
impl Eq for InkItem
impl StructuralEq for InkItem
impl StructuralPartialEq for InkItem
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
sourcefn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more