pub struct InkTraitMessage<'a> { /* private fields */ }Expand description
A checked ink! message of an ink! trait definition.
Implementations§
Source§impl<'a> InkTraitMessage<'a>
impl<'a> InkTraitMessage<'a>
Sourcepub fn get_cfg_attrs(&self, span: Span) -> Vec<TokenStream>
pub fn get_cfg_attrs(&self, span: Span) -> Vec<TokenStream>
Returns a list of cfg attributes if any.
Sourcepub fn receiver(&self) -> Receiver
pub fn receiver(&self) -> Receiver
Returns the self receiver of the ink! trait message.
Returns Ref for &self messages and RefMut for &mut self messages.
Sourcepub fn inputs(&self) -> InputsIter<'_> ⓘ
pub fn inputs(&self) -> InputsIter<'_> ⓘ
Returns an iterator over the inputs of the ink! trait message.
Sourcepub fn local_id(&self) -> u32
pub fn local_id(&self) -> u32
Returns a local ID unique to the ink! trait definition of the ink! trait message.
§Note
It is a compile error if two ink! trait messages share the same local ID. Although the above scenario is very unlikely since the local ID is computed solely by the identifier of the ink! message.
Sourcepub fn mutates(&self) -> bool
pub fn mutates(&self) -> bool
Returns true if the ink! message may mutate the contract storage.
Sourcepub fn normalized_name(&self) -> String
pub fn normalized_name(&self) -> String
Returns the “normalized” function name
§Note
This returns the name override (if provided), otherwise the identifier is returned.
Trait Implementations§
Source§impl<'a> Clone for InkTraitMessage<'a>
impl<'a> Clone for InkTraitMessage<'a>
Source§fn clone(&self) -> InkTraitMessage<'a>
fn clone(&self) -> InkTraitMessage<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for InkTraitMessage<'a>
impl<'a> Debug for InkTraitMessage<'a>
Source§impl<'a> From<&'a InkTraitMessage<'a>> for InputsIter<'a>
impl<'a> From<&'a InkTraitMessage<'a>> for InputsIter<'a>
Source§fn from(message: &'a InkTraitMessage<'_>) -> Self
fn from(message: &'a InkTraitMessage<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for InkTraitMessage<'a>
impl<'a> RefUnwindSafe for InkTraitMessage<'a>
impl<'a> !Send for InkTraitMessage<'a>
impl<'a> !Sync for InkTraitMessage<'a>
impl<'a> Unpin for InkTraitMessage<'a>
impl<'a> UnwindSafe for InkTraitMessage<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more