[−][src]Struct ink_lang_ir::ItemImpl
An ink! implementation block.
Note
- This can be either an inherent implementation block that implements some constructors, messages or internal functions for the storage struct; OR it can be a trait implementation for the storage struct.
- We try to support all fields that are supported by the underlying
syn
implementation forsyn::ItemImpl
even though they are not really required to represent ink!. This is done for consistency withsyn
.
Implementations
impl ItemImpl
[src]
pub fn attrs(&self) -> &[Attribute]
[src]
Returns all non-ink! specific attributes of the implementation block.
pub fn self_type(&self) -> &Type
[src]
Returns the Self
type of the implementation block.
pub fn trait_path(&self) -> Option<&Path>
[src]
Returns the trait type path if this is a trait implementation block.
Returns None
if this is an inherent implementation block.
pub fn trait_ident(&self) -> Option<&Ident>
[src]
Returns the trait identifier if this is a trait implementation block.
Returns None
if this is an inherent implementation block.
pub fn namespace(&self) -> Option<&Namespace>
[src]
Returns the namespace of the implementation block if any has been provided.
pub fn iter_messages(&self) -> IterMessages<'_>ⓘNotable traits for IterMessages<'a>
impl<'a> Iterator for IterMessages<'a> type Item = CallableWithSelector<'a, Message>;
[src]
Notable traits for IterMessages<'a>
impl<'a> Iterator for IterMessages<'a> type Item = CallableWithSelector<'a, Message>;
Returns an iterator yielding the ink! messages of the implementation block.
pub fn iter_constructors(&self) -> IterConstructors<'_>ⓘNotable traits for IterConstructors<'a>
impl<'a> Iterator for IterConstructors<'a> type Item = CallableWithSelector<'a, Constructor>;
[src]
Notable traits for IterConstructors<'a>
impl<'a> Iterator for IterConstructors<'a> type Item = CallableWithSelector<'a, Constructor>;
Returns an iterator yielding the ink! messages of the implementation block.
pub fn items(&self) -> &[ImplItem]
[src]
Returns a slice over the shared references of the items of the impl.
Trait Implementations
impl Debug for ItemImpl
[src]
impl Eq for ItemImpl
[src]
impl From<ItemImpl> for InkItem
[src]
impl PartialEq<ItemImpl> for ItemImpl
[src]
impl StructuralEq for ItemImpl
[src]
impl StructuralPartialEq for ItemImpl
[src]
impl ToTokens for ItemImpl
[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.
fn to_token_stream(&self) -> TokenStream
[src]
fn into_token_stream(self) -> TokenStream
[src]
impl TryFrom<ItemImpl> for ItemImpl
[src]
Auto Trait Implementations
impl RefUnwindSafe for ItemImpl
impl !Send for ItemImpl
impl !Sync for ItemImpl
impl Unpin for ItemImpl
impl UnwindSafe for ItemImpl
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,
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.
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>,