Struct ink_ir::ItemImpl

source ·
pub struct ItemImpl { /* private fields */ }
Expand description

An ink! implementation block.

Note

  • This can be either an inherent implementation block that implements some constructors, messages or internal functions for the storage struct; OR it can be a trait implementation for the storage struct.
  • We try to support all fields that are supported by the underlying syn implementation for syn::ItemImpl even though they are not really required to represent ink!. This is done for consistency with syn.

Implementations§

Returns all non-ink! specific attributes of the implementation block.

Returns the Self type of the implementation block.

Returns the trait type path if this is a trait implementation block.

Returns None if this is an inherent implementation block.

Returns the trait identifier if this is a trait implementation block.

Returns None if this is an inherent implementation block.

Returns the namespace of the implementation block if any has been provided.

Returns an iterator yielding the ink! messages of the implementation block.

Returns an iterator yielding the ink! messages of the implementation block.

Returns a slice over the shared references of the items of the impl.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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

Convert self directly into a TokenStream object. Read more
Convert self directly into a TokenStream object. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.