[−][src]Trait ink_lang_ir::Callable
An ink! callable.
This is either an ink! message or an ink! constructor. Used to share common behavior between different callable types.
Required methods
fn kind(&self) -> CallableKind
Returns the kind of the ink! callable.
fn ident(&self) -> &Ident
Returns the identifier of the ink! callable.
fn user_provided_selector(&self) -> Option<&Selector>
Returns the selector of the ink! callable if any has been manually set.
fn is_payable(&self) -> bool
Returns true
if the ink! callable is flagged as payable.
Note
Flagging as payable is done using the #[ink(payable)]
attribute.
fn visibility(&self) -> Visibility
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;
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.
fn inputs_span(&self) -> Span
Returns the span of the inputs of the ink! callable.
fn statements(&self) -> &[Stmt]
Returns a slice over shared references to the statements of the callable.
Implementors
impl Callable for Constructor
[src]
fn kind(&self) -> CallableKind
[src]
fn ident(&self) -> &Ident
[src]
fn user_provided_selector(&self) -> Option<&Selector>
[src]
fn is_payable(&self) -> bool
[src]
fn visibility(&self) -> Visibility
[src]
fn inputs(&self) -> InputsIter<'_>ⓘNotable traits for InputsIter<'a>
impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
[src]
Notable traits for InputsIter<'a>
impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
fn inputs_span(&self) -> Span
[src]
fn statements(&self) -> &[Stmt]
[src]
impl Callable for Message
[src]
fn kind(&self) -> CallableKind
[src]
fn ident(&self) -> &Ident
[src]
fn user_provided_selector(&self) -> Option<&Selector>
[src]
fn is_payable(&self) -> bool
[src]
fn visibility(&self) -> Visibility
[src]
fn inputs(&self) -> InputsIter<'_>ⓘNotable traits for InputsIter<'a>
impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
[src]
Notable traits for InputsIter<'a>
impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
fn inputs_span(&self) -> Span
[src]
fn statements(&self) -> &[Stmt]
[src]
impl<'a, C> Callable for CallableWithSelector<'a, C> where
C: Callable,
[src]
C: Callable,
fn kind(&self) -> CallableKind
[src]
fn ident(&self) -> &Ident
[src]
fn user_provided_selector(&self) -> Option<&Selector>
[src]
fn is_payable(&self) -> bool
[src]
fn visibility(&self) -> Visibility
[src]
fn inputs(&self) -> InputsIter<'_>ⓘNotable traits for InputsIter<'a>
impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;
[src]
Notable traits for InputsIter<'a>
impl<'a> Iterator for InputsIter<'a> type Item = &'a PatType;