Struct ink_lang_ir::Message[][src]

pub struct Message { /* fields omitted */ }

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]

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.

impl TryFrom<ImplItemMethod> for Message[src]

type Error = Error

The type returned in the event of a conversion error.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Spanned for T where
    T: Spanned + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.