Struct ink_lang_ir::Message[][src]

pub struct Message { /* fields omitted */ }
Expand description

An ink! message definition.

Example

Inherent implementation message:

impl MyStorage {
    #[ink(message)]
    pub fn my_message(&self, input: i32) -> bool {
        /* message implementation goes here */
    }
}

Trait implementation message:

impl MyTrait for MyStorage {
    #[ink(message)]
    fn my_message(&mut self, input: bool) -> i32 {
        /* message implementation goes here */
    }
}

Implementations

Returns a slice of all non-ink! attributes of the ink! message.

Returns the self receiver of the ink! message.

Returns the return type of the ink! message if any.

Returns a local ID unique to the ink! message with respect to its implementation block.

Note

It is a compile error if two ink! trait messages share the same local ID. Although the above scenario is very unlikely since the local ID is computed solely by the identifier of the ink! message.

Trait Implementations

Returns the kind of the ink! callable.

Returns the identifier of the ink! callable.

Returns the selector of the ink! callable if any has been manually set.

Returns true if the ink! callable is flagged as a wildcard selector.

Returns true if the ink! callable is flagged as payable. Read more

Returns the visibility of the ink! callable.

Returns an iterator yielding all input parameters of the ink! callable.

Returns the span of the inputs of the ink! callable.

Returns a slice over shared references to the statements of the callable.

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

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. Read more

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.