Enum ink_lang_ir::ImplItem [−][src]
An item within an ink! implementation block.
Can be either
- an ink!
ir::Constructor
- an ink!
ir::Message
- or any other non-ink! item.
Note
Based on syn::ImplItem
with special variants for ink! impl items.
Variants
Constructor(Constructor)
A #[ink(constructor)]
marked inherent function.
Message(Message)
A #[ink(message)]
marked method.
Other(ImplItem)
Any other implementation block item.
Implementations
impl ImplItem
[src]
pub fn is_message(&self) -> bool
[src]
Returns true
if the impl block item is an ink! message.
pub fn filter_map_message(&self) -> Option<&Message>
[src]
Returns Some
if self
is an ink! message.
Otherwise, returns None
.
pub fn is_constructor(&self) -> bool
[src]
Returns true
if the impl block item is an ink! message.
pub fn filter_map_constructor(&self) -> Option<&Constructor>
[src]
Returns Some
if self
is an ink! constructor.
Otherwise, returns None
.
pub fn is_other_item(&self) -> bool
[src]
Returns true
if the impl block item is a non ink! specific item.
pub fn filter_map_other_item(&self) -> Option<&ImplItem>
[src]
Returns Some
if self
is a not an ink! specific item.
Otherwise, returns None
.
Trait Implementations
impl Debug for ImplItem
[src]
impl Eq for ImplItem
[src]
impl PartialEq<ImplItem> for ImplItem
[src]
impl StructuralEq for ImplItem
[src]
impl StructuralPartialEq for ImplItem
[src]
impl ToTokens for ImplItem
[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<ImplItem> for ImplItem
[src]
Auto Trait Implementations
impl RefUnwindSafe for ImplItem
impl !Send for ImplItem
impl !Sync for ImplItem
impl Unpin for ImplItem
impl UnwindSafe for ImplItem
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>,