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 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 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.
fn inputs(&self) -> InputsIter<'_>ⓘNotable traits for InputsIter<'a>impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
fn inputs(&self) -> InputsIter<'_>ⓘNotable traits for InputsIter<'a>impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
Returns an iterator yielding all input parameters of the ink! callable.
Returns the span of the inputs of the ink! callable.
Auto Trait Implementations
impl RefUnwindSafe for Message
impl UnwindSafe for Message
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more