Struct ink_lang_ir::Constructor [−][src]
pub struct Constructor { /* fields omitted */ }
Expand description
An ink! constructor definition.
Example
Inherent implementation constructor:
impl MyStorage {
#[ink(constructor)]
pub fn new(init_value: i32) -> Self {
/* contract initialization goes here */
}
}
Trait implementation constructor:
impl MyTrait for MyStorage {
#[ink(constructor)]
fn new(init_value: i32) -> Self {
/* contract initialization goes here */
}
}
Implementations
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;
Notable traits for InputsIter<'a>
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.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Constructor
impl !Send for Constructor
impl !Sync for Constructor
impl Unpin for Constructor
impl UnwindSafe for Constructor
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