Struct ink_lang_ir::InkTrait[][src]

pub struct InkTrait { /* fields omitted */ }

A checked ink! trait definition.

Implementations

impl InkTrait[src]

pub fn compute_verify_hash<C, M>(
    trait_name: &Ident,
    constructors: C,
    messages: M
) -> [u8; 32] where
    C: Iterator<Item = (Ident, usize)>,
    M: Iterator<Item = (Ident, usize, bool)>, 
[src]

Returns the hash to verify that the trait definition has been checked.

pub fn verify_hash(&self) -> [u8; 32][src]

Returns the hash to verify that the trait definition has been checked.

impl InkTrait[src]

pub fn new(attr: TokenStream2, input: TokenStream2) -> Result<Self>[src]

Returns Ok if the trait matches all requirements for an ink! trait definition.

pub fn span(&self) -> Span[src]

Returns span of the ink! trait definition.

pub fn attrs(&self) -> &[Attribute][src]

Returns the attributes of the ink! trait definition.

pub fn ident(&self) -> &Ident[src]

Returns the identifier of the ink! trait definition.

pub fn iter_items(&self) -> IterInkTraitItems<'_>

Notable traits for IterInkTraitItems<'a>

impl<'a> Iterator for IterInkTraitItems<'a> type Item = InkTraitItem<'a>;
[src]

Returns an iterator yielding the ink! specific items of the ink! trait definition.

Trait Implementations

impl Debug for InkTrait[src]

impl Eq for InkTrait[src]

impl PartialEq<InkTrait> for InkTrait[src]

impl StructuralEq for InkTrait[src]

impl StructuralPartialEq for InkTrait[src]

impl TryFrom<ItemTrait> for InkTrait[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for InkTrait

impl !Send for InkTrait

impl !Sync for InkTrait

impl Unpin for InkTrait

impl UnwindSafe for InkTrait

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, 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.