Struct ink_lang_ir::Message [−][src]
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
impl Message
[src]
pub fn attrs(&self) -> &[Attribute]
[src]
Returns a slice of all non-ink! attributes of the ink! message.
pub fn receiver(&self) -> Receiver
[src]
Returns the self
receiver of the ink! message.
pub fn output(&self) -> Option<&Type>
[src]
Returns the return type of the ink! message if any.
Trait Implementations
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 Debug for Message
[src]
impl Eq for Message
[src]
impl<'a> From<&'a Message> for InputsIter<'a>
[src]
impl PartialEq<Message> for Message
[src]
impl StructuralEq for Message
[src]
impl StructuralPartialEq for Message
[src]
impl ToTokens for Message
[src]
fn to_tokens(&self, tokens: &mut TokenStream)
[src]
We mainly implement this trait for this ink! type to have a derived
Spanned
implementation for it.
pub fn to_token_stream(&self) -> TokenStream
[src]
pub fn into_token_stream(self) -> TokenStream
[src]
impl TryFrom<ImplItemMethod> for Message
[src]
Auto Trait Implementations
impl RefUnwindSafe for Message
impl !Send for Message
impl !Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Spanned for T where
T: Spanned + ?Sized,
[src]
T: Spanned + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,