pub trait Callable {
    fn kind(&self) -> CallableKind;
    fn ident(&self) -> &Ident;
    fn user_provided_selector(&self) -> Option<&Selector>;
    fn is_payable(&self) -> bool;
    fn has_wildcard_selector(&self) -> bool;
    fn visibility(&self) -> Visibility;
    fn inputs(&self) -> InputsIter<'_>Notable traits for InputsIter<'a>impl<'a> Iterator for InputsIter<'a>    type Item = &'a PatType;;
    fn inputs_span(&self) -> Span;
    fn statements(&self) -> &[Stmt];
}
Expand description

An ink! callable.

This is either an ink! message or an ink! constructor. Used to share common behavior between different callable types.

Required Methods

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 payable.

Note

Flagging as payable is done using the #[ink(payable)] attribute.

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

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.

Implementors